dts: Kconfig: introduce U-Boot list of device tree properties to drop
Since kernel dtb feature is enabled, U-Boot prop use the same device tree as SPL. At sometimes there is different require for list of device tree properties to drop for U-Boot prop, so providing this configure which has higher priority, that if it is defined empty string, fallback to use OF_SPL_REMOVE_PROPS. Signed-off-by: Joseph Chen <chenjh@rock-chips.com> Change-Id: I83b97226c01c320d3a51a6cb0b181016dc5c0067
This commit is contained in:
parent
1619e70322
commit
c48a3a80d2
10
dts/Kconfig
10
dts/Kconfig
|
@ -248,6 +248,16 @@ config OF_SPL_REMOVE_PROPS
|
|||
can be discarded. This option defines the list of properties to
|
||||
discard.
|
||||
|
||||
config OF_U_BOOT_REMOVE_PROPS
|
||||
string "List of device tree properties to drop for U-Boot"
|
||||
depends on USING_KERNEL_DTB
|
||||
default ""
|
||||
help
|
||||
Since kernel dtb feature is enabled, U-Boot prop use the same device tree as SPL.
|
||||
At sometimes there is different require for list of device tree properties to drop
|
||||
for U-Boot prop, so providing this configure which has higher priority, that if it
|
||||
is defined empty string, fallback to use OF_SPL_REMOVE_PROPS.
|
||||
|
||||
config SPL_OF_PLATDATA
|
||||
bool "Generate platform data for use in SPL"
|
||||
depends on SPL_OF_CONTROL
|
||||
|
|
14
dts/Makefile
14
dts/Makefile
|
@ -32,11 +32,18 @@ fdtgrep_props := -b u-boot,dm-pre-reloc -b u-boot,dm-tpl
|
|||
else
|
||||
fdtgrep_props := -b u-boot,dm-pre-reloc -b u-boot,dm-spl
|
||||
endif
|
||||
|
||||
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 $@ \
|
||||
$(addprefix -P ,$(subst $\",,$(CONFIG_OF_SPL_REMOVE_PROPS)))
|
||||
|
||||
quiet_cmd_fdtgrep_uboot = FDTGREP $@
|
||||
cmd_fdtgrep_uboot = $(objtree)/tools/fdtgrep $(fdtgrep_props) -RT $< \
|
||||
-n /chosen -n /config -O dtb | \
|
||||
$(objtree)/tools/fdtgrep -r -O dtb - -o $@ \
|
||||
$(addprefix -P ,$(subst $\",,$(CONFIG_OF_SPL_REMOVE_PROPS)))
|
||||
$(addprefix -P ,$(subst $\",,$(CONFIG_OF_U_BOOT_REMOVE_PROPS)))
|
||||
|
||||
fdtgrep_tpl_props := -b u-boot,dm-pre-reloc -b u-boot,dm-tpl
|
||||
quiet_cmd_fdtgrep_tpl = FDTGREP $@
|
||||
|
@ -63,9 +70,14 @@ $(obj)/dt-spl.dtb: $(DTB) $(objtree)/tools/fdtgrep FORCE
|
|||
$(call if_changed,fdtgrep)
|
||||
endif
|
||||
|
||||
# Normally, usbplug is enabled with kernel dtb disabled
|
||||
ifneq ($(CONFIG_USING_KERNEL_DTB)$(CONFIG_SUPPORT_USBPLUG),)
|
||||
$(obj)/dt.dtb: $(DTB) $(objtree)/tools/fdtgrep FORCE
|
||||
ifneq ($(CONFIG_OF_U_BOOT_REMOVE_PROPS), "")
|
||||
$(call if_changed,fdtgrep_uboot)
|
||||
else
|
||||
$(call if_changed,fdtgrep)
|
||||
endif
|
||||
else
|
||||
$(obj)/dt.dtb: $(DTB) FORCE
|
||||
$(call if_changed,shipped)
|
||||
|
|
Loading…
Reference in New Issue