dm: remove pre reloc properties in SPL and TPL device tree
PATCH 1/1 dm: remove pre reloc properties in SPL and TPL device tree
We can remove the pre reloc property in SPL and TPL device-tree:
- u-boot,dm-pre-reloc
- u-boot,dm-spl
- u-boot,dm-tpl
As only the needed node are kept by fdtgrep (1st pass).
The associated function (XXX_pre_reloc) are simple for SPL/TPL:
return always true.
---
remove pre reloc properties in SPL and TPL device tree
Patch created after some remarks on previous
http://patchwork.ozlabs.org/patch/1035797/
I check the current code and I found a way to reduce the SPL device tree
size: remove the un-necessary pre reloc parameters in SPL/TPL DT (as the node check is already managed by fdtgrep)
But I need to change the DM code to avoid the check on presence of this parameters...
On my board stm32mp1-ev1, the SPL device tree is reduced by 790 bytes (11149 to 10419) and the SPL binary u-boot-spl.stm32 by 798 bytes (64745 to 63947); the boot is not broken and I have the expected delta between generated device tree.
But I don't sure that I see all the side impact of the code change in SPL/TPL.
PS: I already see a side effect on this patch, because all node are now
bounded in SPL/TPL, it is no more needed to TAG all the device tree path but only the last needed children.
But in this case phandle for parent node are not keep.
drivers/core/ofnode.c | 16 ++++++++-------- drivers/core/util.c | 31 +++++++++++++++---------------- scripts/Makefile.lib | 1 + 3 files changed, 24 insertions(+), 24 deletions(-)
drivers/core/ofnode.c +8 -8
@@ -700,18 +700,18 @@ int ofnode_read_simple_size_cells(ofnode node)bool ofnode_pre_reloc (ofnode node) { +#if defined(CONFIG_SPL_BUILD ) || defined(CONFIG_TPL_BUILD ) +/* for SPL and TPL the remaining nodes after the fdtgrep 1st pass +* had property dm-pre-reloc or u-boot,dm-spl/tpl. +* They are removed in final dtb (fdtgrep 2nd pass) +*/ +return true; +#else if (ofnode_read_bool (node,"u-boot,dm-pre-reloc" ))return true;if (ofnode_read_bool (node,"u-boot,dm-pre-proper" ))return true; -#ifdef CONFIG_TPL_BUILD -if (ofnode_read_bool (node,"u-boot,dm-tpl" )) -return true; -#elif defined(CONFIG_SPL_BUILD ) -if (ofnode_read_bool (node,"u-boot,dm-spl" )) -return true; -#else /* * In regular builds individual spl and tpl handling both * count as handled pre-relocation for later second init.
@@ -719,9 +719,9 @@ bool ofnode_pre_reloc(ofnode node)if (ofnode_read_bool (node,"u-boot,dm-spl" ) ||ofnode_read_bool (node,"u-boot,dm-tpl" ))return true; -#endif return false; +#endif }int ofnode_read_resource (ofnode node,uint index,struct resource *res)
drivers/core/util.c +15 -16
@@ -33,16 +33,15 @@ int list_count_items(struct list_head *head)bool dm_fdt_pre_reloc (const void *blob,int offset) { +#if defined(CONFIG_SPL_BUILD ) || defined(CONFIG_TPL_BUILD ) +/* for SPL and TPL the remaining nodes after the fdtgrep 1st pass +* had property dm-pre-reloc or u-boot,dm-spl/tpl. +* They are removed in final dtb (fdtgrep 2nd pass) +*/ +return true; +#else if (fdt_getprop (blob, offset,"u-boot,dm-pre-reloc" ,NULL ))return true; - -#ifdef CONFIG_TPL_BUILD -if (fdt_getprop (blob, offset,"u-boot,dm-tpl" ,NULL )) -return true; -#elif defined(CONFIG_SPL_BUILD ) -if (fdt_getprop (blob, offset,"u-boot,dm-spl" ,NULL )) -return true; -#else /* * In regular builds individual spl and tpl handling both * count as handled pre-relocation for later second init.
@@ -57,16 +56,16 @@ bool dm_fdt_pre_reloc(const void *blob, int offset)bool dm_ofnode_pre_reloc (ofnode node) { +#if defined(CONFIG_SPL_BUILD ) || defined(CONFIG_TPL_BUILD ) +/* for SPL and TPL the remaining nodes after the fdtgrep 1st pass +* had property dm-pre-reloc or u-boot,dm-spl/tpl. +* They are removed in final dtb (fdtgrep 2nd pass) +*/ +return true; +#else if (ofnode_read_bool (node,"u-boot,dm-pre-reloc" ))return true; -#ifdef CONFIG_TPL_BUILD -if (ofnode_read_bool (node,"u-boot,dm-tpl" )) -return true; -#elif defined(CONFIG_SPL_BUILD ) -if (ofnode_read_bool (node,"u-boot,dm-spl" )) -return true; -#else /* * In regular builds individual spl and tpl handling both * count as handled pre-relocation for later second init.
@@ -74,7 +73,7 @@ bool dm_ofnode_pre_reloc(ofnode node)if (ofnode_read_bool (node,"u-boot,dm-spl" ) ||ofnode_read_bool (node,"u-boot,dm-tpl" ))return true; -#endif return false; +#endif }
scripts/Makefile.lib +1 -0
@@ -524,4 +524,5 @@ quiet_cmd_fdtgrep = FDTGREP $@ cmd_fdtgrep = $(objtree)/tools/fdtgrep $(fdtgrep_props) -RT $< \ -n /chosen -n /config -O dtb | \ $(objtree)/tools/fdtgrep -r -O dtb - -o $@ \ + -P u-boot,dm-pre-reloc -P u-boot,dm-spl -P u-boot,dm-tpl \ $(addprefix -P ,$(subst $\",,$(CONFIG_OF_SPL_REMOVE_PROPS)))
Signature · 1 line
2.7.4
PATCH 1/1 dm: remove pre reloc properties in SPL and TPL device tree
Hi Patrick,
Quoted 31 lines · Patrick Delaunay
We can remove the pre reloc property in SPL and TPL device-tree:
- u-boot,dm-pre-reloc
- u-boot,dm-spl
- u-boot,dm-tpl
As only the needed node are kept by fdtgrep (1st pass).The associated function (
XXX_pre_reloc) are simple for SPL/TPL:
return always true.Signed-off-by Patrick Delaunay <[email protected]>---
remove pre reloc properties in SPL and TPL device tree
Patch created after some remarks on previous
http://patchwork.ozlabs.org/patch/1035797/I check the current code and I found a way to reduce the SPL device tree
size: remove the un-necessary pre reloc parameters in SPL/TPL DT (as the node check is already managed by fdtgrep)But I need to change the DM code to avoid the check on presence of this parameters...
On my board stm32mp1-ev1, the SPL device tree is reduced by 790 bytes (11149 to 10419) and the SPL binary u-boot-spl.stm32 by 798 bytes (64745 to 63947); the boot is not broken and I have the expected delta between generated device tree.
Quoted 7 lines
But I don't sure that I see all the side impact of the code change in SPL/TPL.
PS: I already see a side effect on this patch, because all node are now
bounded in SPL/TPL, it is no more needed to TAG all the device tree path but only the last needed children.
But in this case phandle for parent node are not keep.
Yes that makes sense. I suppose we could enhance fdtgrep to handle this.
Quoted 53 lines
drivers/core/ofnode.c | 16 ++++++++-------- drivers/core/util.c | 31 +++++++++++++++---------------- scripts/Makefile.lib | 1 + 3 files changed, 24 insertions(+), 24 deletions(-)drivers/core/ofnode.c +8
-8@@ -700,18 +700,18 @@ int ofnode_read_simple_size_cells(ofnode node)bool ofnode_pre_reloc (ofnode node) { +#if defined(CONFIG_SPL_BUILD ) || defined(CONFIG_TPL_BUILD ) +/* for SPL and TPL the remaining nodes after the fdtgrep 1st pass +* had property dm-pre-reloc or u-boot,dm-spl/tpl. +* They are removed in final dtb (fdtgrep 2nd pass) +*/ +return true; +#else if (ofnode_read_bool (node,"u-boot,dm-pre-reloc" ))return true;if (ofnode_read_bool (node,"u-boot,dm-pre-proper" ))return true; -#ifdef CONFIG_TPL_BUILD -if (ofnode_read_bool (node,"u-boot,dm-tpl" )) -return true; -#elif defined(CONFIG_SPL_BUILD ) -if (ofnode_read_bool (node,"u-boot,dm-spl" )) -return true; -#else /* * In regular builds individual spl and tpl handling both * count as handled pre-relocation for later second init. @@ -719,9 +719,9 @@ bool ofnode_pre_reloc(ofnode node)if (ofnode_read_bool (node,"u-boot,dm-spl" ) ||ofnode_read_bool (node,"u-boot,dm-tpl" ))return true; -#endif return false; +#endif }int ofnode_read_resource (ofnode node,uint index,struct resource *res)drivers/core/util.c +0
-0
drivers/core/util.c int list_count_items(struct list_head *head) · line 34
Quoted 2 lines
drivers/core/util.c +0
-0@@ -33,16 +33,15 @@ int list_count_items(struct list_head *head)bool dm_fdt_pre_reloc (const void *blob,int offset)
This function should really be removed. We should be able to use the ofnode version always.
Quoted 65 lines
drivers/core/util.c +15
-16{ +#if defined(CONFIG_SPL_BUILD ) || defined(CONFIG_TPL_BUILD ) +/* for SPL and TPL the remaining nodes after the fdtgrep 1st pass +* had property dm-pre-reloc or u-boot,dm-spl/tpl. +* They are removed in final dtb (fdtgrep 2nd pass) +*/ +return true; +#else if (fdt_getprop (blob, offset,"u-boot,dm-pre-reloc" ,NULL ))return true; - -#ifdef CONFIG_TPL_BUILD -if (fdt_getprop (blob, offset,"u-boot,dm-tpl" ,NULL )) -return true; -#elif defined(CONFIG_SPL_BUILD ) -if (fdt_getprop (blob, offset,"u-boot,dm-spl" ,NULL )) -return true; -#else /* * In regular builds individual spl and tpl handling both * count as handled pre-relocation for later second init. @@ -57,16 +56,16 @@ bool dm_fdt_pre_reloc(const void *blob, int offset)bool dm_ofnode_pre_reloc (ofnode node) { +#if defined(CONFIG_SPL_BUILD ) || defined(CONFIG_TPL_BUILD ) +/* for SPL and TPL the remaining nodes after the fdtgrep 1st pass +* had property dm-pre-reloc or u-boot,dm-spl/tpl. +* They are removed in final dtb (fdtgrep 2nd pass) +*/ +return true; +#else if (ofnode_read_bool (node,"u-boot,dm-pre-reloc" ))return true; -#ifdef CONFIG_TPL_BUILD -if (ofnode_read_bool (node,"u-boot,dm-tpl" )) -return true; -#elif defined(CONFIG_SPL_BUILD ) -if (ofnode_read_bool (node,"u-boot,dm-spl" )) -return true; -#else /* * In regular builds individual spl and tpl handling both * count as handled pre-relocation for later second init. @@ -74,7 +73,7 @@ bool dm_ofnode_pre_reloc(ofnode node)if (ofnode_read_bool (node,"u-boot,dm-spl" ) ||ofnode_read_bool (node,"u-boot,dm-tpl" ))return true; -#endif return false; +#endif }scripts/Makefile.lib +1
-1@@ -524,4 +524,5 @@ quiet_cmd_fdtgrep = FDTGREP $@ cmd_fdtgrep = $(objtree)/tools/fdtgrep $(fdtgrep_props) -RT $< \ -n /chosen -n /config -O dtb | \ $(objtree)/tools/fdtgrep -r -O dtb - -o $@ \ + -P u-boot,dm-pre-reloc -P u-boot,dm-spl -P u-boot,dm-tpl \ $(addprefix -P ,$(subst $\",,$(CONFIG_OF_SPL_REMOVE_PROPS))) --
Quoted 2 lines
2.7.4
Is there a documentation update you can do to describe how things now work?
Regards,
Simon
PATCH 1/1 dm: remove pre reloc properties in SPL and TPL device tree
Hi Simon,
Quoted 42 lines
From: Simon Glass <[email protected]>
Sent: mardi 19 mars 2019 02:25Hi Patrick,
Quoted 35 lines · Patrick Delaunay
We can remove the pre reloc property in SPL and TPL device-tree:
- u-boot,dm-pre-reloc
- u-boot,dm-spl
- u-boot,dm-tpl
As only the needed node are kept by fdtgrep (1st pass).The associated function (
XXX_pre_reloc) are simple for SPL/TPL:
return always true.Signed-off-by Patrick Delaunay <[email protected]>---
remove pre reloc properties in SPL and TPL device tree
Patch created after some remarks on previous
http://patchwork.ozlabs.org/patch/1035797/I check the current code and I found a way to reduce the SPL device tree
size: remove the un-necessary pre reloc parameters in SPL/TPL DT (as the node check is already managed by fdtgrep)But I need to change the DM code to avoid the check on presence of this parameters...
On my board stm32mp1-ev1, the SPL device tree is reduced by 790 bytes (11149 to 10419) and the SPL binary u-boot-spl.stm32 by 798 bytes (64745 to 63947); the boot is not broken and I have the expected delta between generated device tree.
But I don't sure that I see all the side impact of the code change in SPL/TPL.
Quoted 6 lines
Quoted 4 lines
PS: I already see a side effect on this patch, because all node are now
bounded in SPL/TPL, it is no more needed to TAG all the device tree path but only the last needed children.
But in this case phandle for parent node are not keep.Yes that makes sense. I suppose we could enhance fdtgrep to handle this.
Probably but I checked the code but I don't found a way to handle with lidfdt.
I think is completely handle when a region is dumped (for father mode with FDT_REG_SUPERNODES) in dump_fdt_regions is doen without any property (including phandle),
only FDT_BEGIN_NODE and FDT_END_NODE are used
=> p.want = WANT_NODES_ONLY vs WANT_NODES_AND_PROPS
Quoted 54 lines
Quoted 54 lines
drivers/core/ofnode.c | 16 ++++++++-------- drivers/core/util.c | 31 +++++++++++++++---------------- scripts/Makefile.lib | 1 + 3 files changed, 24 insertions(+), 24 deletions(-)drivers/core/ofnode.c index renamed from drivers/core/ofnode.c +0
-00e584c1..5a109dd 100644
drivers/core/ofnode.c +8
-8@@ -700,18 +700,18 @@ int ofnode_read_simple_size_cells(ofnode node)bool ofnode_pre_reloc (ofnode node) { +#if defined(CONFIG_SPL_BUILD ) || defined(CONFIG_TPL_BUILD ) +/* for SPL and TPL the remaining nodes after the fdtgrep 1st pass +* had property dm-pre-reloc or u-boot,dm-spl/tpl. +* They are removed in final dtb (fdtgrep 2nd pass) +*/ +return true; +#else if (ofnode_read_bool (node,"u-boot,dm-pre-reloc" ))return true;if (ofnode_read_bool (node,"u-boot,dm-pre-proper" ))return true; -#ifdef CONFIG_TPL_BUILD -if (ofnode_read_bool (node,"u-boot,dm-tpl" )) -return true; -#elif defined(CONFIG_SPL_BUILD ) -if (ofnode_read_bool (node,"u-boot,dm-spl" )) -return true; -#else /* * In regular builds individual spl and tpl handling both * count as handled pre-relocation for later second init. @@ -719,9 +719,9 @@ bool ofnode_pre_reloc(ofnode node)if (ofnode_read_bool (node,"u-boot,dm-spl" ) ||ofnode_read_bool (node,"u-boot,dm-tpl" ))return true; -#endif return false; +#endif } int ofnode_read_resource(ofnode node, uint index, struct resource*res) diff --git
a/drivers/core/util.cb/drivers/core/util.cindex 27a6848..451f772 100644drivers/core/util.c +0
-0@@ -33,16 +33,15 @@ int list_count_items(struct list_head *head)
Quoted 4 lines
drivers/core/util.c int list_count_items(struct list_head *head) · line 34
Quoted 1 line
drivers/core/util.c +0
-0bool dm_fdt_pre_reloc (const void *blob,int offset)This function should really be removed. We should be able to use the ofnode version always.
Ok, I migrate the 2 calls of the function =
drivers/clk/at91/pmc.c:64: !dm_fdt_pre_reloc(fdt, offset))
drivers/clk/altera/clk-arria10.c:257: if (pre_reloc_only && !dm_fdt_pre_reloc(fdt, offset))
and remove the function dm_fdt_pre_reloc in a separet patchset (today I think)
=> [PATCH 0/3] remove dm_fdt_pre_reloc, replaced by dm_ofnode_pre_reloc
http://patchwork.ozlabs.org/project/uboot/list/?series=98272
PS: it is already done for dm_ofnode_pre_reloc() in http://patchwork.ozlabs.org/patch/1035799
Quoted 63 lines
Quoted 63 lines
drivers/core/util.c +15
-16{ +#if defined(CONFIG_SPL_BUILD ) || defined(CONFIG_TPL_BUILD ) +/* for SPL and TPL the remaining nodes after the fdtgrep 1st pass +* had property dm-pre-reloc or u-boot,dm-spl/tpl. +* They are removed in final dtb (fdtgrep 2nd pass) +*/ +return true; +#else if (fdt_getprop (blob, offset,"u-boot,dm-pre-reloc" ,NULL ))return true; - -#ifdef CONFIG_TPL_BUILD -if (fdt_getprop (blob, offset,"u-boot,dm-tpl" ,NULL )) -return true; -#elif defined(CONFIG_SPL_BUILD ) -if (fdt_getprop (blob, offset,"u-boot,dm-spl" ,NULL )) -return true; -#else /* * In regular builds individual spl and tpl handling both * count as handled pre-relocation for later second init. @@ -57,16 +56,16 @@ bool dm_fdt_pre_reloc(const void *blob, int offset)bool dm_ofnode_pre_reloc (ofnode node) { +#if defined(CONFIG_SPL_BUILD ) || defined(CONFIG_TPL_BUILD ) +/* for SPL and TPL the remaining nodes after the fdtgrep 1st pass +* had property dm-pre-reloc or u-boot,dm-spl/tpl. +* They are removed in final dtb (fdtgrep 2nd pass) +*/ +return true; +#else if (ofnode_read_bool (node,"u-boot,dm-pre-reloc" ))return true; -#ifdef CONFIG_TPL_BUILD -if (ofnode_read_bool (node,"u-boot,dm-tpl" )) -return true; -#elif defined(CONFIG_SPL_BUILD ) -if (ofnode_read_bool (node,"u-boot,dm-spl" )) -return true; -#else /* * In regular builds individual spl and tpl handling both * count as handled pre-relocation for later second init. @@ -74,7 +73,7 @@ bool dm_ofnode_pre_reloc(ofnode node)if (ofnode_read_bool (node,"u-boot,dm-spl" ) ||ofnode_read_bool (node,"u-boot,dm-tpl" ))return true; -#endif return false; +#endif }scripts/Makefile.lib index renamed from scripts/Makefile.lib +0
-0a5b57fc..3f4c86e 100644
scripts/Makefile.lib +1
-0@@ -524,4 +524,5 @@ quiet_cmd_fdtgrep = FDTGREP $@ cmd_fdtgrep = $(objtree)/tools/fdtgrep $(fdtgrep_props) -RT $< \ -n /chosen -n /config -O dtb | \ $(objtree)/tools/fdtgrep -r -O dtb - -o $@ \ + -P u-boot,dm-pre-reloc -P u-boot,dm-spl -P
Quoted 8 lines
Quoted 6 lines
scripts/Makefile.lib +1
-0+ u-boot,dm-tpl \ $(addprefix -P ,$(subst$\",,$(CONFIG_OF_SPL_REMOVE_PROPS)))
--
2.7.4Is there a documentation update you can do to describe how things now work?
Yes I can try it ....
which documentation files is the correct place for you ?
In "Pre-Relocation Support" chapter of doc/ driver-model/README (as 'u-boot,dm-spl' and 'u-boot,dm-tpl' are only described here)
Or in doc/README.SPL and doc/READMETPL ?
Quoted 2 lines
Regards,
Simon
Regards
Patrick
PATCH 1/1 dm: remove pre reloc properties in SPL and TPL device tree
Hi Patrick,
Quoted 203 lines · Patrick DELAUNAY
Hi Simon,
Quoted 42 lines
From: Simon Glass <[email protected]>
Sent: mardi 19 mars 2019 02:25Hi Patrick,
Quoted 35 lines · Patrick Delaunay
We can remove the pre reloc property in SPL and TPL device-tree:
- u-boot,dm-pre-reloc
- u-boot,dm-spl
- u-boot,dm-tpl
As only the needed node are kept by fdtgrep (1st pass).The associated function (
XXX_pre_reloc) are simple for SPL/TPL:
return always true.Signed-off-by Patrick Delaunay <[email protected]>---
remove pre reloc properties in SPL and TPL device tree
Patch created after some remarks on previous
http://patchwork.ozlabs.org/patch/1035797/I check the current code and I found a way to reduce the SPL device tree
size: remove the un-necessary pre reloc parameters in SPL/TPL DT (as the node check is already managed by fdtgrep)But I need to change the DM code to avoid the check on presence of this parameters...
On my board stm32mp1-ev1, the SPL device tree is reduced by 790 bytes (11149 to 10419) and the SPL binary u-boot-spl.stm32 by 798 bytes (64745 to 63947); the boot is not broken and I have the expected delta between generated device tree.
But I don't sure that I see all the side impact of the code change in SPL/TPL.
Quoted 6 lines
Quoted 4 lines
PS: I already see a side effect on this patch, because all node are now
bounded in SPL/TPL, it is no more needed to TAG all the device tree path but only the last needed children.
But in this case phandle for parent node are not keep.Yes that makes sense. I suppose we could enhance fdtgrep to handle this.
Probably but I checked the code but I don't found a way to handle with lidfdt.
I think is completely handle when a region is dumped (for father mode with
FDT_REG_SUPERNODES) indump_fdt_regionsis doen without any property (including phandle),
onlyFDT_BEGIN_NODEandFDT_END_NODEare used=> p.want =
WANT_NODES_ONLYvsWANT_NODES_AND_PROPSQuoted 54 lines
Quoted 54 lines
drivers/core/ofnode.c | 16 ++++++++-------- drivers/core/util.c | 31 +++++++++++++++---------------- scripts/Makefile.lib | 1 + 3 files changed, 24 insertions(+), 24 deletions(-)drivers/core/ofnode.c index renamed from drivers/core/ofnode.c +0
-00e584c1..5a109dd 100644
drivers/core/ofnode.c +8
-8@@ -700,18 +700,18 @@ int ofnode_read_simple_size_cells(ofnode node)bool ofnode_pre_reloc (ofnode node) { +#if defined(CONFIG_SPL_BUILD ) || defined(CONFIG_TPL_BUILD ) +/* for SPL and TPL the remaining nodes after the fdtgrep 1st pass +* had property dm-pre-reloc or u-boot,dm-spl/tpl. +* They are removed in final dtb (fdtgrep 2nd pass) +*/ +return true; +#else if (ofnode_read_bool (node,"u-boot,dm-pre-reloc" ))return true;if (ofnode_read_bool (node,"u-boot,dm-pre-proper" ))return true; -#ifdef CONFIG_TPL_BUILD -if (ofnode_read_bool (node,"u-boot,dm-tpl" )) -return true; -#elif defined(CONFIG_SPL_BUILD ) -if (ofnode_read_bool (node,"u-boot,dm-spl" )) -return true; -#else /* * In regular builds individual spl and tpl handling both * count as handled pre-relocation for later second init. @@ -719,9 +719,9 @@ bool ofnode_pre_reloc(ofnode node)if (ofnode_read_bool (node,"u-boot,dm-spl" ) ||ofnode_read_bool (node,"u-boot,dm-tpl" ))return true; -#endif return false; +#endif } int ofnode_read_resource(ofnode node, uint index, struct resource*res) diff --git
a/drivers/core/util.cb/drivers/core/util.cindex 27a6848..451f772 100644drivers/core/util.c +0
-0@@ -33,16 +33,15 @@ int list_count_items(struct list_head *head)Quoted 4 lines
drivers/core/util.c int list_count_items(struct list_head *head) · line 34
Quoted 1 line
drivers/core/util.c +0
-0bool dm_fdt_pre_reloc (const void *blob,int offset)This function should really be removed. We should be able to use the ofnode version always.
Ok, I migrate the 2 calls of the function =
drivers/clk/at91/pmc.c:64: !dm_fdt_pre_reloc(fdt, offset))
drivers/clk/altera/clk-arria10.c:257: if (pre_reloc_only&& !dm_fdt_pre_reloc(fdt, offset))and remove the function
dm_fdt_pre_relocin a separet patchset (today I think)=> [PATCH 0/3] remove
dm_fdt_pre_reloc, replaced bydm_ofnode_pre_relochttp://patchwork.ozlabs.org/project/uboot/list/?series=98272PS: it is already done for
dm_ofnode_pre_reloc()in http://patchwork.ozlabs.org/patch/1035799Quoted 63 lines
Quoted 63 lines
drivers/core/util.c +15
-16{ +#if defined(CONFIG_SPL_BUILD ) || defined(CONFIG_TPL_BUILD ) +/* for SPL and TPL the remaining nodes after the fdtgrep 1st pass +* had property dm-pre-reloc or u-boot,dm-spl/tpl. +* They are removed in final dtb (fdtgrep 2nd pass) +*/ +return true; +#else if (fdt_getprop (blob, offset,"u-boot,dm-pre-reloc" ,NULL ))return true; - -#ifdef CONFIG_TPL_BUILD -if (fdt_getprop (blob, offset,"u-boot,dm-tpl" ,NULL )) -return true; -#elif defined(CONFIG_SPL_BUILD ) -if (fdt_getprop (blob, offset,"u-boot,dm-spl" ,NULL )) -return true; -#else /* * In regular builds individual spl and tpl handling both * count as handled pre-relocation for later second init. @@ -57,16 +56,16 @@ bool dm_fdt_pre_reloc(const void *blob, int offset)bool dm_ofnode_pre_reloc (ofnode node) { +#if defined(CONFIG_SPL_BUILD ) || defined(CONFIG_TPL_BUILD ) +/* for SPL and TPL the remaining nodes after the fdtgrep 1st pass +* had property dm-pre-reloc or u-boot,dm-spl/tpl. +* They are removed in final dtb (fdtgrep 2nd pass) +*/ +return true; +#else if (ofnode_read_bool (node,"u-boot,dm-pre-reloc" ))return true; -#ifdef CONFIG_TPL_BUILD -if (ofnode_read_bool (node,"u-boot,dm-tpl" )) -return true; -#elif defined(CONFIG_SPL_BUILD ) -if (ofnode_read_bool (node,"u-boot,dm-spl" )) -return true; -#else /* * In regular builds individual spl and tpl handling both * count as handled pre-relocation for later second init. @@ -74,7 +73,7 @@ bool dm_ofnode_pre_reloc(ofnode node)if (ofnode_read_bool (node,"u-boot,dm-spl" ) ||ofnode_read_bool (node,"u-boot,dm-tpl" ))return true; -#endif return false; +#endif }scripts/Makefile.lib index renamed from scripts/Makefile.lib +0
-0a5b57fc..3f4c86e 100644
scripts/Makefile.lib +1
-0@@ -524,4 +524,5 @@ quiet_cmd_fdtgrep = FDTGREP $@ cmd_fdtgrep = $(objtree)/tools/fdtgrep $(fdtgrep_props) -RT $< \ -n /chosen -n /config -O dtb | \ $(objtree)/tools/fdtgrep -r -O dtb - -o $@ \ + -P u-boot,dm-pre-reloc -P u-boot,dm-spl -PQuoted 8 lines
Quoted 6 lines
scripts/Makefile.lib +1
-0+ u-boot,dm-tpl \ $(addprefix -P ,$(subst$\",,$(CONFIG_OF_SPL_REMOVE_PROPS)))
--
2.7.4Is there a documentation update you can do to describe how things now work?
Quoted 6 lines
Yes I can try it ....
which documentation files is the correct place for you ?
In "Pre-Relocation Support" chapter of doc/ driver-model/README (as 'u-boot,dm-spl' and 'u-boot,dm-tpl' are only described here)
Yes this seems better...
Quoted 2 lines
Or in doc/README.SPL and doc/READMETPL ?
but perhaps add a link to the above from these, too?
- SImon