]> git.ipfire.org Git - thirdparty/u-boot.git/commitdiff
dts: renamed FIT_EMBED to MULTI_DTB_FIT and moved it to the dts Kconfig
authorJean-Jacques Hiblot <jjhiblot@ti.com>
Fri, 15 Sep 2017 10:57:24 +0000 (12:57 +0200)
committerTom Rini <trini@konsulko.com>
Fri, 6 Oct 2017 01:31:04 +0000 (21:31 -0400)
CONFIG_FIT_EMBED might be confused with CONFIG_OF_EMBED, rename it
MULTI_DTB_FIT as it is able to get a DTB from a FIT image containing
multiple DTBs. Also move the option to the Kconfig dedicated to the DTS
options and create a README for this feature.

Signed-off-by: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
14 files changed:
Makefile
board/ti/ks2_evm/board_k2e.c
board/ti/ks2_evm/board_k2g.c
board/ti/ks2_evm/board_k2hk.c
board/ti/ks2_evm/board_k2l.c
common/Kconfig
common/Makefile
configs/k2e_evm_defconfig
configs/k2g_evm_defconfig
configs/k2hk_evm_defconfig
configs/k2l_evm_defconfig
doc/README.multi-dtb-fit [new file with mode: 0644]
dts/Kconfig
lib/fdtdec.c

index 1a2ef305357b89170f60be5a367104b772e036dc..888486b29672ba440ae0032286dfea4c068d980f 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -878,7 +878,7 @@ dts/dt.dtb: u-boot
 quiet_cmd_copy = COPY    $@
       cmd_copy = cp $< $@
 
-ifeq ($(CONFIG_FIT_EMBED),y)
+ifeq ($(CONFIG_MULTI_DTB_FIT),y)
 
 fit-dtb.blob: dts/dt.dtb FORCE
        $(call if_changed,mkimage)
index 266a66b678f23ea9614045b955043dd3acfcab60..6c77d915e5b977c1f3fac3b2dbeaf366fec89a2e 100644 (file)
@@ -166,7 +166,7 @@ int get_num_eth_ports(void)
 }
 #endif
 
-#if defined(CONFIG_FIT_EMBED)
+#if defined(CONFIG_MULTI_DTB_FIT)
 int board_fit_config_name_match(const char *name)
 {
        if (!strcmp(name, "keystone-k2e-evm"))
index f1c4ddcd3098e1e4b080a4a066a7518168e48057..01328f1955c2be2fdee8728ebe9bb8f09a06bab7 100644 (file)
@@ -217,7 +217,7 @@ int board_mmc_init(bd_t *bis)
 }
 #endif
 
-#if defined(CONFIG_FIT_EMBED)
+#if defined(CONFIG_MULTI_DTB_FIT)
 int board_fit_config_name_match(const char *name)
 {
        bool eeprom_read = board_ti_was_eeprom_read();
index c7330996d1abecd0e437679b14ab3dd9c0c24e3f..e99e6355b477610587698c673081efc7b41cb0bf 100644 (file)
@@ -150,7 +150,7 @@ int board_early_init_f(void)
 }
 #endif
 
-#if defined(CONFIG_FIT_EMBED)
+#if defined(CONFIG_MULTI_DTB_FIT)
 int board_fit_config_name_match(const char *name)
 {
        if (!strcmp(name, "keystone-k2hk-evm"))
index 166367bfb97e01c99b3c62dad9e0f9e36857b6d3..c65f33131da0cf21f4a654fac81188004b7581fc 100644 (file)
@@ -138,7 +138,7 @@ int board_early_init_f(void)
 }
 #endif
 
-#if defined(CONFIG_FIT_EMBED)
+#if defined(CONFIG_MULTI_DTB_FIT)
 int board_fit_config_name_match(const char *name)
 {
        if (!strcmp(name, "keystone-k2l-evm"))
index 3c99650f0c9ecef52f7a040d94a90ae66aaf864c..f96a25f582ba5ead249c4a5209bffde803710b8c 100644 (file)
@@ -403,22 +403,6 @@ config SYS_STDIO_DEREGISTER
 
 endmenu
 
-config DTB_RESELECT
-       bool "Support swapping dtbs at a later point in boot"
-       depends on FIT_EMBED
-       help
-         It is possible during initial boot you may need to use a generic
-         dtb until you can fully determine the board your running on. This
-         config allows boards to implement a function at a later point
-         during boot to switch to the "correct" dtb.
-
-config FIT_EMBED
-       bool "Support a FIT image embedded in the U-boot image"
-       help
-         This option provides hooks to allow U-boot to parse an
-         appended FIT image and enable board specific code to then select
-         the correct DTB to be used.
-
 config DEFAULT_FDT_FILE
        string "Default fdt file"
        help
index 801ea3191f6782054dc469970ab90469440e3303..cec506fe3e1efe25149577708d2bd59d531f9d47 100644 (file)
@@ -103,7 +103,7 @@ obj-y += image.o
 obj-$(CONFIG_ANDROID_BOOT_IMAGE) += image-android.o
 obj-$(CONFIG_$(SPL_TPL_)OF_LIBFDT) += image-fdt.o
 obj-$(CONFIG_$(SPL_TPL_)FIT) += image-fit.o
-obj-$(CONFIG_FIT_EMBED) += boot_fit.o common_fit.o
+obj-$(CONFIG_$(SPL_)MULTI_DTB_FIT) += boot_fit.o common_fit.o
 obj-$(CONFIG_$(SPL_TPL_)FIT_SIGNATURE) += image-sig.o
 obj-$(CONFIG_IO_TRACE) += iotrace.o
 obj-y += memsize.o
index fed6addab63b4b9385bf1cd3cd9951281c039fb9..b6a5282ff4f21ad9c4b75c0797593f50f45efbe6 100644 (file)
@@ -12,7 +12,7 @@ CONFIG_DEFAULT_DEVICE_TREE="keystone-k2e-evm"
 CONFIG_OF_BOARD_SETUP=y
 CONFIG_SYS_CONSOLE_INFO_QUIET=y
 CONFIG_DTB_RESELECT=y
-CONFIG_FIT_EMBED=y
+CONFIG_MULTI_DTB_FIT=y
 CONFIG_VERSION_VARIABLE=y
 CONFIG_BOARD_EARLY_INIT_F=y
 CONFIG_SPL=y
index 2b29bf44912ad6c51d78ece561f73e19b975f0d0..9c8b66d1e1a0598f724bfcbb6d35308345ad6015 100644 (file)
@@ -12,7 +12,7 @@ CONFIG_DEFAULT_DEVICE_TREE="keystone-k2g-evm"
 CONFIG_OF_BOARD_SETUP=y
 CONFIG_SYS_CONSOLE_INFO_QUIET=y
 CONFIG_DTB_RESELECT=y
-CONFIG_FIT_EMBED=y
+CONFIG_MULTI_DTB_FIT=y
 CONFIG_VERSION_VARIABLE=y
 CONFIG_BOARD_EARLY_INIT_F=y
 CONFIG_SPL=y
index 80546ecfc97b3b54679d1657a1862ebb11bc6638..bfb95abe32c401f8d049318398dfde5fb5be871e 100644 (file)
@@ -12,7 +12,7 @@ CONFIG_DEFAULT_DEVICE_TREE="keystone-k2hk-evm"
 CONFIG_OF_BOARD_SETUP=y
 CONFIG_SYS_CONSOLE_INFO_QUIET=y
 CONFIG_DTB_RESELECT=y
-CONFIG_FIT_EMBED=y
+CONFIG_MULTI_DTB_FIT=y
 CONFIG_VERSION_VARIABLE=y
 CONFIG_BOARD_EARLY_INIT_F=y
 CONFIG_SPL=y
index 732c9d2f7fceda7594857f38b4b7165a2235c5c9..7ab0d47e0343247ccb4f4215980c7c7e021e18b8 100644 (file)
@@ -12,7 +12,7 @@ CONFIG_DEFAULT_DEVICE_TREE="keystone-k2l-evm"
 CONFIG_OF_BOARD_SETUP=y
 CONFIG_SYS_CONSOLE_INFO_QUIET=y
 CONFIG_DTB_RESELECT=y
-CONFIG_FIT_EMBED=y
+CONFIG_MULTI_DTB_FIT=y
 CONFIG_VERSION_VARIABLE=y
 CONFIG_BOARD_EARLY_INIT_F=y
 CONFIG_SPL=y
diff --git a/doc/README.multi-dtb-fit b/doc/README.multi-dtb-fit
new file mode 100644 (file)
index 0000000..0d4f068
--- /dev/null
@@ -0,0 +1,15 @@
+MULTI DTB FIT
+
+The purpose of this feature is to enable u-boot to select its DTB from a FIT
+appended at the end of the binary.
+
+Usually the DTB is selected by the SPL and passed down to U-Boot. But some
+platforms don't use the SPL. In this case MULTI_DTB_FIT can used to provide
+U-Boot with a choice of DTBs.
+The relevant DTBs are packed into a FIT (list provided by CONFIG__OF_LIST). The
+FIT is automatically generated at the end of the compilation and appended to
+u-boot.bin so that U-Boot can locate it and select the correct DTB from inside
+the FIT.
+The selection is done using board_fit_config_name_match() (same as what the SPL
+uses to select the DTB for U-Boot). The selection happens during fdtdec_setup()
+which is called during before relocation by board_init_f().
index 4ee051094319ee98ee9d5ea6d1f5e0155610e7b1..454acaaa3c73ad939c508dee1e2f9307e6be679d 100644 (file)
@@ -102,7 +102,7 @@ config DEFAULT_DEVICE_TREE
 
 config OF_LIST
        string "List of device tree files to include for DT control"
-       depends on SPL_LOAD_FIT || FIT_EMBED
+       depends on SPL_LOAD_FIT || MULTI_DTB_FIT
        default DEFAULT_DEVICE_TREE
        help
          This option specifies a list of device tree files to use for DT
@@ -112,6 +112,24 @@ config OF_LIST
          device tree files (without the directory or .dtb suffix)
          separated by <space>.
 
+
+config DTB_RESELECT
+       bool "Support swapping dtbs at a later point in boot"
+       depends on MULTI_DTB_FIT
+       help
+         It is possible during initial boot you may need to use a generic
+         dtb until you can fully determine the board your running on. This
+         config allows boards to implement a function at a later point
+         during boot to switch to the "correct" dtb.
+
+config MULTI_DTB_FIT
+       bool "Support embedding several DTBs in a FIT image for u-boot"
+       help
+         This option provides hooks to allow U-boot to parse an
+         appended FIT image and enable board specific code to then select
+         the correct DTB to be used. Use this if you need to support
+         multiple DTBs but don't use the SPL.
+
 config OF_SPL_REMOVE_PROPS
        string "List of device tree properties to drop for SPL"
        depends on SPL_OF_CONTROL
index 107a892e79c274e0b6e2c44cf2516aef7d469a1e..630e0402eeac2047c16baf014fd9bce70f1a6208 100644 (file)
@@ -1217,7 +1217,7 @@ int fdtdec_setup(void)
        else
                gd->fdt_blob = (ulong *)&__bss_end;
 
-#  elif defined CONFIG_FIT_EMBED
+#  elif defined CONFIG_MULTI_DTB_FIT
        gd->fdt_blob = locate_dtb_in_fit(&_end);
 
        if (gd->fdt_blob == NULL || gd->fdt_blob <= ((void *)&_end)) {