All of lore.kernel.org
 help / color / mirror / Atom feed
* [U-Boot] [PATCH 1/3] fdt: Add board specific dts inclusion
@ 2012-07-04 20:25 Stephan Linz
  2012-07-04 20:25 ` [U-Boot] [PATCH 2/3] microblaze: Wire up dts configuration Stephan Linz
                   ` (2 more replies)
  0 siblings, 3 replies; 9+ messages in thread
From: Stephan Linz @ 2012-07-04 20:25 UTC (permalink / raw)
  To: u-boot

Some architectures, for example Microblaze, doesn't need a
splitted device tree because every Microblaze hw design is
different. The individuell Microblaze device tree will be
auto generated by FPGA design tools and could be used directly
with dtc.

The auto generated dts for Microblaze can not processed by CPP.
Unfortunately that is the default procedure in U-Boot to merge
a splitted device tree (substitution of ARCH_CPU_DTS).

Microblaze will never use the ARCH_CPU_DTS substitution and we
introduce the new board specific substitution variable BOARD_DTS
that points into vendor/board/dts subdir with the file name
of CONFIG_DEFAULT_DEVICE_TREE. The common dts file in vendor/dts
subdir (defined by CONFIG_DEFAULT_DEVICE_TREE) contain a single
include line that can processed by CPP:

    /include/ BOARD_DTS

Signed-off-by: Stephan Linz <linz@li-pro.net>
---
 dts/Makefile |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)

diff --git a/dts/Makefile b/dts/Makefile
index 914e479..b1f47a1 100644
--- a/dts/Makefile
+++ b/dts/Makefile
@@ -36,7 +36,8 @@ $(error Your architecture does not have device tree support enabled. \
 Please define CONFIG_ARCH_DEVICE_TREE))
 
 # We preprocess the device tree file provide a useful define
-DTS_CPPFLAGS := -DARCH_CPU_DTS=\"$(SRCTREE)/arch/$(ARCH)/dts/$(CONFIG_ARCH_DEVICE_TREE).dtsi\"
+DTS_CPPFLAGS := -DARCH_CPU_DTS=\"$(SRCTREE)/arch/$(ARCH)/dts/$(CONFIG_ARCH_DEVICE_TREE).dtsi\" \
+		-DBOARD_DTS=\"$(SRCTREE)/board/$(VENDOR)/$(BOARD)/dts/$(DEVICE_TREE).dts\"
 
 all:	$(obj).depend $(LIB)
 
-- 
1.7.0.4

^ permalink raw reply related	[flat|nested] 9+ messages in thread

* [U-Boot] [PATCH 2/3] microblaze: Wire up dts configuration
  2012-07-04 20:25 [U-Boot] [PATCH 1/3] fdt: Add board specific dts inclusion Stephan Linz
@ 2012-07-04 20:25 ` Stephan Linz
  2012-07-10  8:03   ` Michal Simek
  2012-07-04 20:25 ` [U-Boot] [PATCH 3/3] microblaze: Wire up OF support for emaclite Stephan Linz
  2012-07-09  7:42 ` [U-Boot] [PATCH 1/3] fdt: Add board specific dts inclusion Michal Simek
  2 siblings, 1 reply; 9+ messages in thread
From: Stephan Linz @ 2012-07-04 20:25 UTC (permalink / raw)
  To: u-boot

    - enable OF control and embedded OF
    - set default device tree file name to 'microblaze'
    - add CPP to dtc proxy: board/xilinx/dts/microblaze.dts
    - add an empty but processable dts for microblaze-generic

Signed-off-by: Stephan Linz <linz@li-pro.net>
---
 board/xilinx/dts/microblaze.dts                    |    1 +
 board/xilinx/microblaze-generic/dts/microblaze.dts |    7 +++++++
 include/configs/microblaze-generic.h               |    5 +++++
 3 files changed, 13 insertions(+), 0 deletions(-)
 create mode 100644 board/xilinx/dts/microblaze.dts
 create mode 100644 board/xilinx/microblaze-generic/dts/microblaze.dts

diff --git a/board/xilinx/dts/microblaze.dts b/board/xilinx/dts/microblaze.dts
new file mode 100644
index 0000000..bf984b0
--- /dev/null
+++ b/board/xilinx/dts/microblaze.dts
@@ -0,0 +1 @@
+/include/ BOARD_DTS
diff --git a/board/xilinx/microblaze-generic/dts/microblaze.dts b/board/xilinx/microblaze-generic/dts/microblaze.dts
new file mode 100644
index 0000000..2033309
--- /dev/null
+++ b/board/xilinx/microblaze-generic/dts/microblaze.dts
@@ -0,0 +1,7 @@
+/dts-v1/;
+/ {
+	#address-cells = <1>;
+	#size-cells = <1>;
+	aliases {
+	} ;
+} ;
diff --git a/include/configs/microblaze-generic.h b/include/configs/microblaze-generic.h
index 2fd2279..386189f 100644
--- a/include/configs/microblaze-generic.h
+++ b/include/configs/microblaze-generic.h
@@ -31,6 +31,11 @@
 #define	CONFIG_MICROBLAZE	1
 #define	MICROBLAZE_V5		1
 
+/* Open Firmware DTS */
+#define CONFIG_OF_CONTROL	1
+#define CONFIG_OF_EMBED		1
+#define CONFIG_DEFAULT_DEVICE_TREE microblaze
+
 /* linear flash memory */
 #ifdef XILINX_FLASH_START
 #define	FLASH
-- 
1.7.0.4

^ permalink raw reply related	[flat|nested] 9+ messages in thread

* [U-Boot] [PATCH 3/3] microblaze: Wire up OF support for emaclite
  2012-07-04 20:25 [U-Boot] [PATCH 1/3] fdt: Add board specific dts inclusion Stephan Linz
  2012-07-04 20:25 ` [U-Boot] [PATCH 2/3] microblaze: Wire up dts configuration Stephan Linz
@ 2012-07-04 20:25 ` Stephan Linz
  2012-07-09 21:42   ` Simon Glass
  2012-07-09  7:42 ` [U-Boot] [PATCH 1/3] fdt: Add board specific dts inclusion Michal Simek
  2 siblings, 1 reply; 9+ messages in thread
From: Stephan Linz @ 2012-07-04 20:25 UTC (permalink / raw)
  To: u-boot

    - expand the condition with CONFIG_OF_CONTROL

Signed-off-by: Stephan Linz <linz@li-pro.net>
---
 include/configs/microblaze-generic.h |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/include/configs/microblaze-generic.h b/include/configs/microblaze-generic.h
index 386189f..01e3421 100644
--- a/include/configs/microblaze-generic.h
+++ b/include/configs/microblaze-generic.h
@@ -79,7 +79,7 @@
 
 /* ethernet */
 #undef CONFIG_SYS_ENET
-#if defined(XILINX_EMACLITE_BASEADDR)
+#if defined(XILINX_EMACLITE_BASEADDR) || defined(CONFIG_OF_CONTROL)
 # define CONFIG_XILINX_EMACLITE	1
 # define CONFIG_SYS_ENET
 #endif
-- 
1.7.0.4

^ permalink raw reply related	[flat|nested] 9+ messages in thread

* [U-Boot] [PATCH 1/3] fdt: Add board specific dts inclusion
  2012-07-04 20:25 [U-Boot] [PATCH 1/3] fdt: Add board specific dts inclusion Stephan Linz
  2012-07-04 20:25 ` [U-Boot] [PATCH 2/3] microblaze: Wire up dts configuration Stephan Linz
  2012-07-04 20:25 ` [U-Boot] [PATCH 3/3] microblaze: Wire up OF support for emaclite Stephan Linz
@ 2012-07-09  7:42 ` Michal Simek
  2012-07-09 21:37   ` Simon Glass
  2 siblings, 1 reply; 9+ messages in thread
From: Michal Simek @ 2012-07-09  7:42 UTC (permalink / raw)
  To: u-boot

On 07/04/2012 10:25 PM, Stephan Linz wrote:
> Some architectures, for example Microblaze, doesn't need a
> splitted device tree because every Microblaze hw design is
> different. The individuell Microblaze device tree will be
> auto generated by FPGA design tools and could be used directly
> with dtc.
>
> The auto generated dts for Microblaze can not processed by CPP.
> Unfortunately that is the default procedure in U-Boot to merge
> a splitted device tree (substitution of ARCH_CPU_DTS).
>
> Microblaze will never use the ARCH_CPU_DTS substitution and we
> introduce the new board specific substitution variable BOARD_DTS
> that points into vendor/board/dts subdir with the file name
> of CONFIG_DEFAULT_DEVICE_TREE. The common dts file in vendor/dts
> subdir (defined by CONFIG_DEFAULT_DEVICE_TREE) contain a single
> include line that can processed by CPP:
>
>      /include/ BOARD_DTS
>
> Signed-off-by: Stephan Linz<linz@li-pro.net>
> ---
>   dts/Makefile |    3 ++-
>   1 files changed, 2 insertions(+), 1 deletions(-)
>
> diff --git a/dts/Makefile b/dts/Makefile
> index 914e479..b1f47a1 100644
> --- a/dts/Makefile
> +++ b/dts/Makefile
> @@ -36,7 +36,8 @@ $(error Your architecture does not have device tree support enabled. \
>   Please define CONFIG_ARCH_DEVICE_TREE))
>
>   # We preprocess the device tree file provide a useful define
> -DTS_CPPFLAGS := -DARCH_CPU_DTS=\"$(SRCTREE)/arch/$(ARCH)/dts/$(CONFIG_ARCH_DEVICE_TREE).dtsi\"
> +DTS_CPPFLAGS := -DARCH_CPU_DTS=\"$(SRCTREE)/arch/$(ARCH)/dts/$(CONFIG_ARCH_DEVICE_TREE).dtsi\" \
> +		-DBOARD_DTS=\"$(SRCTREE)/board/$(VENDOR)/$(BOARD)/dts/$(DEVICE_TREE).dts\"
>
>   all:	$(obj).depend $(LIB)
>

Ok. Have tested this.
Simon can you give your ACK for this patch?

Tested-by: Michal Simek <monstr@monstr.eu>

I think I can add this one to my microblaze custodian tree.

Thanks,
Michal



-- 
Michal Simek, Ing. (M.Eng)
w: www.monstr.eu p: +42-0-721842854
Maintainer of Linux kernel 2.6 Microblaze Linux - http://www.monstr.eu/fdt/
Microblaze U-BOOT custodian

^ permalink raw reply	[flat|nested] 9+ messages in thread

* [U-Boot] [PATCH 1/3] fdt: Add board specific dts inclusion
  2012-07-09  7:42 ` [U-Boot] [PATCH 1/3] fdt: Add board specific dts inclusion Michal Simek
@ 2012-07-09 21:37   ` Simon Glass
  2012-07-10  8:03     ` Michal Simek
  0 siblings, 1 reply; 9+ messages in thread
From: Simon Glass @ 2012-07-09 21:37 UTC (permalink / raw)
  To: u-boot

On Mon, Jul 9, 2012 at 12:42 AM, Michal Simek <monstr@monstr.eu> wrote:

> On 07/04/2012 10:25 PM, Stephan Linz wrote:
>
>> Some architectures, for example Microblaze, doesn't need a
>> splitted device tree because every Microblaze hw design is
>> different. The individuell Microblaze device tree will be
>> auto generated by FPGA design tools and could be used directly
>> with dtc.
>>
>> The auto generated dts for Microblaze can not processed by CPP.
>> Unfortunately that is the default procedure in U-Boot to merge
>> a splitted device tree (substitution of ARCH_CPU_DTS).
>>
>> Microblaze will never use the ARCH_CPU_DTS substitution and we
>> introduce the new board specific substitution variable BOARD_DTS
>> that points into vendor/board/dts subdir with the file name
>> of CONFIG_DEFAULT_DEVICE_TREE. The common dts file in vendor/dts
>> subdir (defined by CONFIG_DEFAULT_DEVICE_TREE) contain a single
>> include line that can processed by CPP:
>>
>>      /include/ BOARD_DTS
>>
>> Signed-off-by: Stephan Linz<linz@li-pro.net>
>> ---
>>   dts/Makefile |    3 ++-
>>   1 files changed, 2 insertions(+), 1 deletions(-)
>>
>> diff --git a/dts/Makefile b/dts/Makefile
>> index 914e479..b1f47a1 100644
>> --- a/dts/Makefile
>> +++ b/dts/Makefile
>> @@ -36,7 +36,8 @@ $(error Your architecture does not have device tree
>> support enabled. \
>>   Please define CONFIG_ARCH_DEVICE_TREE))
>>
>>   # We preprocess the device tree file provide a useful define
>> -DTS_CPPFLAGS := -DARCH_CPU_DTS=\"$(SRCTREE)/**arch/$(ARCH)/dts/$(CONFIG_
>> **ARCH_DEVICE_TREE).dtsi\"
>> +DTS_CPPFLAGS := -DARCH_CPU_DTS=\"$(SRCTREE)/**arch/$(ARCH)/dts/$(CONFIG_
>> **ARCH_DEVICE_TREE).dtsi\" \
>> +               -DBOARD_DTS=\"$(SRCTREE)/**board/$(VENDOR)/$(BOARD)/dts/$
>> **(DEVICE_TREE).dts\"
>>
>>   all:  $(obj).depend $(LIB)
>>
>>
> Ok. Have tested this.
> Simon can you give your ACK for this patch?
>

Weill I think for now it is reasonable.

Acked-by: Simon Glass <sjg@chromium.org>


>
> Tested-by: Michal Simek <monstr@monstr.eu>
>
> I think I can add this one to my microblaze custodian tree.
>
> Thanks,
> Michal
>
>
>
> --
> Michal Simek, Ing. (M.Eng)
> w: www.monstr.eu p: +42-0-721842854
> Maintainer of Linux kernel 2.6 Microblaze Linux -
> http://www.monstr.eu/fdt/
> Microblaze U-BOOT custodian
>

^ permalink raw reply	[flat|nested] 9+ messages in thread

* [U-Boot] [PATCH 3/3] microblaze: Wire up OF support for emaclite
  2012-07-04 20:25 ` [U-Boot] [PATCH 3/3] microblaze: Wire up OF support for emaclite Stephan Linz
@ 2012-07-09 21:42   ` Simon Glass
  2012-07-10  8:04     ` Michal Simek
  0 siblings, 1 reply; 9+ messages in thread
From: Simon Glass @ 2012-07-09 21:42 UTC (permalink / raw)
  To: u-boot

On Wed, Jul 4, 2012 at 1:25 PM, Stephan Linz <linz@li-pro.net> wrote:

>     - expand the condition with CONFIG_OF_CONTROL
>
> Signed-off-by: Stephan Linz <linz@li-pro.net>
>

Acked-by: Simon Glass <sjg@chromium.org>


> ---
>  include/configs/microblaze-generic.h |    2 +-
>  1 files changed, 1 insertions(+), 1 deletions(-)
>
> diff --git a/include/configs/microblaze-generic.h
> b/include/configs/microblaze-generic.h
> index 386189f..01e3421 100644
> --- a/include/configs/microblaze-generic.h
> +++ b/include/configs/microblaze-generic.h
> @@ -79,7 +79,7 @@
>
>  /* ethernet */
>  #undef CONFIG_SYS_ENET
> -#if defined(XILINX_EMACLITE_BASEADDR)
> +#if defined(XILINX_EMACLITE_BASEADDR) || defined(CONFIG_OF_CONTROL)
>  # define CONFIG_XILINX_EMACLITE        1
>  # define CONFIG_SYS_ENET
>  #endif
> --
> 1.7.0.4
>
>

^ permalink raw reply	[flat|nested] 9+ messages in thread

* [U-Boot] [PATCH 1/3] fdt: Add board specific dts inclusion
  2012-07-09 21:37   ` Simon Glass
@ 2012-07-10  8:03     ` Michal Simek
  0 siblings, 0 replies; 9+ messages in thread
From: Michal Simek @ 2012-07-10  8:03 UTC (permalink / raw)
  To: u-boot

On 07/09/2012 11:37 PM, Simon Glass wrote:
> On Mon, Jul 9, 2012 at 12:42 AM, Michal Simek <monstr at monstr.eu <mailto:monstr@monstr.eu>> wrote:
>
>     On 07/04/2012 10:25 PM, Stephan Linz wrote:
>
>         Some architectures, for example Microblaze, doesn't need a
>         splitted device tree because every Microblaze hw design is
>         different. The individuell Microblaze device tree will be
>         auto generated by FPGA design tools and could be used directly
>         with dtc.
>
>         The auto generated dts for Microblaze can not processed by CPP.
>         Unfortunately that is the default procedure in U-Boot to merge
>         a splitted device tree (substitution of ARCH_CPU_DTS).
>
>         Microblaze will never use the ARCH_CPU_DTS substitution and we
>         introduce the new board specific substitution variable BOARD_DTS
>         that points into vendor/board/dts subdir with the file name
>         of CONFIG_DEFAULT_DEVICE_TREE. The common dts file in vendor/dts
>         subdir (defined by CONFIG_DEFAULT_DEVICE_TREE) contain a single
>         include line that can processed by CPP:
>
>               /include/ BOARD_DTS
>
>         Signed-off-by: Stephan Linz<linz at li-pro.net <mailto:linz@li-pro.net>>
>         ---
>            dts/Makefile |    3 ++-
>            1 files changed, 2 insertions(+), 1 deletions(-)
>
>         diff --git a/dts/Makefile b/dts/Makefile
>         index 914e479..b1f47a1 100644
>         --- a/dts/Makefile
>         +++ b/dts/Makefile
>         @@ -36,7 +36,8 @@ $(error Your architecture does not have device tree support enabled. \
>            Please define CONFIG_ARCH_DEVICE_TREE))
>
>            # We preprocess the device tree file provide a useful define
>         -DTS_CPPFLAGS := -DARCH_CPU_DTS=\"$(SRCTREE)/__arch/$(ARCH)/dts/$(CONFIG___ARCH_DEVICE_TREE).dtsi\"
>         +DTS_CPPFLAGS := -DARCH_CPU_DTS=\"$(SRCTREE)/__arch/$(ARCH)/dts/$(CONFIG___ARCH_DEVICE_TREE).dtsi\" \
>         +               -DBOARD_DTS=\"$(SRCTREE)/__board/$(VENDOR)/$(BOARD)/dts/$__(DEVICE_TREE).dts\"
>
>            all:  $(obj).depend $(LIB)
>
>
>     Ok. Have tested this.
>     Simon can you give your ACK for this patch?
>
>
> Weill I think for now it is reasonable.
>
> Acked-by: Simon Glass <sjg at chromium.org <mailto:sjg@chromium.org>>

Thanks. Applied to microblaze custodian tree.

Michal

-- 
Michal Simek, Ing. (M.Eng)
w: www.monstr.eu p: +42-0-721842854
Maintainer of Linux kernel 2.6 Microblaze Linux - http://www.monstr.eu/fdt/
Microblaze U-BOOT custodian

^ permalink raw reply	[flat|nested] 9+ messages in thread

* [U-Boot] [PATCH 2/3] microblaze: Wire up dts configuration
  2012-07-04 20:25 ` [U-Boot] [PATCH 2/3] microblaze: Wire up dts configuration Stephan Linz
@ 2012-07-10  8:03   ` Michal Simek
  0 siblings, 0 replies; 9+ messages in thread
From: Michal Simek @ 2012-07-10  8:03 UTC (permalink / raw)
  To: u-boot

On 07/04/2012 10:25 PM, Stephan Linz wrote:
>      - enable OF control and embedded OF
>      - set default device tree file name to 'microblaze'
>      - add CPP to dtc proxy: board/xilinx/dts/microblaze.dts
>      - add an empty but processable dts for microblaze-generic
>
> Signed-off-by: Stephan Linz<linz@li-pro.net>
> ---
>   board/xilinx/dts/microblaze.dts                    |    1 +
>   board/xilinx/microblaze-generic/dts/microblaze.dts |    7 +++++++
>   include/configs/microblaze-generic.h               |    5 +++++
>   3 files changed, 13 insertions(+), 0 deletions(-)
>   create mode 100644 board/xilinx/dts/microblaze.dts
>   create mode 100644 board/xilinx/microblaze-generic/dts/microblaze.dts
>
> diff --git a/board/xilinx/dts/microblaze.dts b/board/xilinx/dts/microblaze.dts
> new file mode 100644
> index 0000000..bf984b0
> --- /dev/null
> +++ b/board/xilinx/dts/microblaze.dts
> @@ -0,0 +1 @@
> +/include/ BOARD_DTS
> diff --git a/board/xilinx/microblaze-generic/dts/microblaze.dts b/board/xilinx/microblaze-generic/dts/microblaze.dts
> new file mode 100644
> index 0000000..2033309
> --- /dev/null
> +++ b/board/xilinx/microblaze-generic/dts/microblaze.dts
> @@ -0,0 +1,7 @@
> +/dts-v1/;
> +/ {
> +	#address-cells =<1>;
> +	#size-cells =<1>;
> +	aliases {
> +	} ;
> +} ;
> diff --git a/include/configs/microblaze-generic.h b/include/configs/microblaze-generic.h
> index 2fd2279..386189f 100644
> --- a/include/configs/microblaze-generic.h
> +++ b/include/configs/microblaze-generic.h
> @@ -31,6 +31,11 @@
>   #define	CONFIG_MICROBLAZE	1
>   #define	MICROBLAZE_V5		1
>
> +/* Open Firmware DTS */
> +#define CONFIG_OF_CONTROL	1
> +#define CONFIG_OF_EMBED		1
> +#define CONFIG_DEFAULT_DEVICE_TREE microblaze
> +
>   /* linear flash memory */
>   #ifdef XILINX_FLASH_START
>   #define	FLASH


Applied to microblaze custodian tree.

Thanks,
Michal


-- 
Michal Simek, Ing. (M.Eng)
w: www.monstr.eu p: +42-0-721842854
Maintainer of Linux kernel 2.6 Microblaze Linux - http://www.monstr.eu/fdt/
Microblaze U-BOOT custodian

^ permalink raw reply	[flat|nested] 9+ messages in thread

* [U-Boot] [PATCH 3/3] microblaze: Wire up OF support for emaclite
  2012-07-09 21:42   ` Simon Glass
@ 2012-07-10  8:04     ` Michal Simek
  0 siblings, 0 replies; 9+ messages in thread
From: Michal Simek @ 2012-07-10  8:04 UTC (permalink / raw)
  To: u-boot

On 07/09/2012 11:42 PM, Simon Glass wrote:
> On Wed, Jul 4, 2012 at 1:25 PM, Stephan Linz <linz at li-pro.net <mailto:linz@li-pro.net>> wrote:
>
>          - expand the condition with CONFIG_OF_CONTROL
>
>     Signed-off-by: Stephan Linz <linz at li-pro.net <mailto:linz@li-pro.net>>
>
>
> Acked-by: Simon Glass <sjg at chromium.org <mailto:sjg@chromium.org>>

Will be added to Microblaze tree when emaclite dts patch is applied.

Thanks,
Michal


-- 
Michal Simek, Ing. (M.Eng)
w: www.monstr.eu p: +42-0-721842854
Maintainer of Linux kernel 2.6 Microblaze Linux - http://www.monstr.eu/fdt/
Microblaze U-BOOT custodian

^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2012-07-10  8:04 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-07-04 20:25 [U-Boot] [PATCH 1/3] fdt: Add board specific dts inclusion Stephan Linz
2012-07-04 20:25 ` [U-Boot] [PATCH 2/3] microblaze: Wire up dts configuration Stephan Linz
2012-07-10  8:03   ` Michal Simek
2012-07-04 20:25 ` [U-Boot] [PATCH 3/3] microblaze: Wire up OF support for emaclite Stephan Linz
2012-07-09 21:42   ` Simon Glass
2012-07-10  8:04     ` Michal Simek
2012-07-09  7:42 ` [U-Boot] [PATCH 1/3] fdt: Add board specific dts inclusion Michal Simek
2012-07-09 21:37   ` Simon Glass
2012-07-10  8:03     ` Michal Simek

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.