fdt: Add board specific dts inclusion
PATCH 1/3 fdt: Add board specific dts inclusion
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
--- dts/Makefile | 3 ++- 1 files changed, 2 insertions(+), 1 deletions(-)
dts/Makefile +2 -1
@@ -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)
Signature · 1 line
1.7.0.4
PATCH 2/3 microblaze: Wire up dts configuration
- 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
--- 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
board/xilinx/dts/microblaze.dts new file +1 -0
@@ -0,0 +1 @@ +/include/ BOARD_DTS
board/xilinx/microblaze-generic/dts/microblaze.dts new file +7 -0
@@ -0,0 +1,7 @@ +/dts-v1/; +/ { + #address-cells = <1>; + #size-cells = <1>; + aliases { + } ; +} ;
include/configs/microblaze-generic.h +5 -0
@@ -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
Signature · 1 line
1.7.0.4
Michal Simek
AppliedPATCH 2/3 microblaze: Wire up dts configuration
Quoted 40 lines · Stephan Linz
- 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-genericSigned-off-by Stephan Linz<[email protected]>--- 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 100644board/xilinx/microblaze-generic/dts/microblaze.dtsboard/xilinx/dts/microblaze.dts new file +1
-0@@ -0,0 +1 @@ +/include/ BOARD_DTSboard/xilinx/microblaze-generic/dts/microblaze.dts new file +7
-0@@ -0,0 +1,7 @@ +/dts-v1/; +/ { + #address-cells =<1>; + #size-cells =<1>; + aliases { + } ; +} ;include/configs/microblaze-generic.h +0
-0@@ -31,6 +31,11 @@#define CONFIG_MICROBLAZE 1
include/configs/microblaze-generic.h line 41
Quoted 10 lines
include/configs/microblaze-generic.h +5
-0#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
Signature · 4 lines
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
PATCH 3/3 microblaze: Wire up OF support for emaclite
In reply to Stephan Linz - expand the condition with CONFIG_OF_CONTROL
--- include/configs/microblaze-generic.h | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-)
include/configs/microblaze-generic.h +1 -1
@@ -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
Signature · 1 line
1.7.0.4
PATCH 3/3 microblaze: Wire up OF support for emaclite
Quoted 4 lines · Stephan Linz
- expand the condition with
CONFIG_OF_CONTROLSigned-off-by Stephan Linz <[email protected]>
Quoted 22 lines
--- include/configs/microblaze-generic.h | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-)include/configs/microblaze-generic.h +1
-2@@ -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
PATCH 3/3 microblaze: Wire up OF support for emaclite
Quoted 8 lines · Simon Glass
On Wed, Jul 4, 2012 at 1:25 PM, Stephan Linz <linz at li-pro.net <mailto:[email protected]>> wrote:
- expand the condition with
CONFIG_OF_CONTROLSigned-off-by Stephan Linz <linz at li-pro.net <mailto:[email protected]>>Acked-by Simon Glass <sjg at chromium.org <mailto:[email protected]>>
Will be added to Microblaze tree when emaclite dts patch is applied.
Thanks,
Michal
Signature · 4 lines
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
PATCH 1/3 fdt: Add board specific dts inclusion
In reply to Stephan LinzQuoted 29 lines · Stephan Linz
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_DTSsubstitution and we introduce the new board specific substitution variableBOARD_DTSthat points into vendor/board/dts subdir with the file name ofCONFIG_DEFAULT_DEVICE_TREE. The common dts file in vendor/dts subdir (defined byCONFIG_DEFAULT_DEVICE_TREE) contain a single include line that can processed by CPP:/include/
BOARD_DTSSigned-off-by Stephan Linz<[email protected]>--- dts/Makefile | 3 ++- 1 files changed, 2 insertions(+), 1 deletions(-)dts/Makefile +0
-0
dts/Makefile $(error Your architecture does not have device tree support enabled. \ · line 43
Quoted 9 lines
dts/Makefile +2
-1@@ -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?
I think I can add this one to my microblaze custodian tree.
Thanks,
Michal
Signature · 4 lines
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
PATCH 1/3 fdt: Add board specific dts inclusion
Quoted 42 lines · Michal Simek
Quoted 40 lines · Stephan Linz
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_DTSsubstitution and we introduce the new board specific substitution variableBOARD_DTSthat points into vendor/board/dts subdir with the file name ofCONFIG_DEFAULT_DEVICE_TREE. The common dts file in vendor/dts subdir (defined byCONFIG_DEFAULT_DEVICE_TREE) contain a single include line that can processed by CPP:/include/
BOARD_DTSSigned-off-by Stephan Linz<[email protected]>--- dts/Makefile | 3 ++- 1 files changed, 2 insertions(+), 1 deletions(-)dts/Makefile +2
-1@@ -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\"
Quoted 6 lines
Quoted 3 lines
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.
Quoted 17 lines
Tested-by Michal Simek <[email protected]>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
PATCH 1/3 fdt: Add board specific dts inclusion
Quoted 43 lines · Simon Glass
On Mon, Jul 9, 2012 at 12:42 AM, Michal Simek <monstr at monstr.eu <mailto:[email protected]>> 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_DTSsubstitution and we introduce the new board specific substitution variableBOARD_DTSthat points into vendor/board/dts subdir with the file name ofCONFIG_DEFAULT_DEVICE_TREE. The common dts file in vendor/dts subdir (defined byCONFIG_DEFAULT_DEVICE_TREE) contain a single include line that can processed by CPP:/include/
BOARD_DTSSigned-off-by Stephan Linz<linz at li-pro.net <mailto:[email protected]>>---
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 defineCONFIG_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)
Quoted 7 lines
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:[email protected]>>
Thanks. Applied to microblaze custodian tree.
Michal
Signature · 4 lines
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