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
|
can be discarded. This option defines the list of properties to
|
||||||
discard.
|
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
|
config SPL_OF_PLATDATA
|
||||||
bool "Generate platform data for use in SPL"
|
bool "Generate platform data for use in SPL"
|
||||||
depends on SPL_OF_CONTROL
|
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
|
else
|
||||||
fdtgrep_props := -b u-boot,dm-pre-reloc -b u-boot,dm-spl
|
fdtgrep_props := -b u-boot,dm-pre-reloc -b u-boot,dm-spl
|
||||||
endif
|
endif
|
||||||
|
|
||||||
quiet_cmd_fdtgrep = FDTGREP $@
|
quiet_cmd_fdtgrep = FDTGREP $@
|
||||||
cmd_fdtgrep = $(objtree)/tools/fdtgrep $(fdtgrep_props) -RT $< \
|
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 | \
|
-n /chosen -n /config -O dtb | \
|
||||||
$(objtree)/tools/fdtgrep -r -O dtb - -o $@ \
|
$(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
|
fdtgrep_tpl_props := -b u-boot,dm-pre-reloc -b u-boot,dm-tpl
|
||||||
quiet_cmd_fdtgrep_tpl = FDTGREP $@
|
quiet_cmd_fdtgrep_tpl = FDTGREP $@
|
||||||
|
|
@ -63,9 +70,14 @@ $(obj)/dt-spl.dtb: $(DTB) $(objtree)/tools/fdtgrep FORCE
|
||||||
$(call if_changed,fdtgrep)
|
$(call if_changed,fdtgrep)
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
# Normally, usbplug is enabled with kernel dtb disabled
|
||||||
ifneq ($(CONFIG_USING_KERNEL_DTB)$(CONFIG_SUPPORT_USBPLUG),)
|
ifneq ($(CONFIG_USING_KERNEL_DTB)$(CONFIG_SUPPORT_USBPLUG),)
|
||||||
$(obj)/dt.dtb: $(DTB) $(objtree)/tools/fdtgrep FORCE
|
$(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)
|
$(call if_changed,fdtgrep)
|
||||||
|
endif
|
||||||
else
|
else
|
||||||
$(obj)/dt.dtb: $(DTB) FORCE
|
$(obj)/dt.dtb: $(DTB) FORCE
|
||||||
$(call if_changed,shipped)
|
$(call if_changed,shipped)
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue