diff options
author | Michal Simek <michal.simek@xilinx.com> | 2020-02-18 15:03:13 +0100 |
---|---|---|
committer | Michal Simek <michal.simek@xilinx.com> | 2020-04-06 12:51:31 +0200 |
commit | dacec83ce0f8c80b35ed9b4e18f4468ff8552069 (patch) | |
tree | e4c9a3da24517a733da9a4dcce089b2ed5138c8d /arch | |
parent | f5a122e2abe9a4a589a4ae30145b1fdf4f5207d1 (diff) |
Makefile: Add environment variable DEVICE_TREE to header
Users have option to overwrite default device tree
(CONFIG_DEFAULT_DEVICE_TREE) via environment variable DEVICE_TREE.
Feature has been added long time ago by commit 74de8c9a1672
("dts/Makefile: Build the user specified dts") for a little bit different
reason.
But this variable can be also used for different purpose like choosing
proper configuration from FIT image in SPL.
And this is the functionality I would like to use on Xilinx Zynq devices
that current u-boot.img can be composed in the same way based on OF_LIST
and different configuration is taken based on platform specific SPL.
SPL requires low level ps7_init_gpl configuration that's why different
boards require different SPL with fixed board_fit_config_name_match().
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
Reviewed-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Diffstat (limited to 'arch')
-rw-r--r-- | arch/arm/mach-zynq/spl.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/arch/arm/mach-zynq/spl.c b/arch/arm/mach-zynq/spl.c index 96ba90fb7a..e89e46c103 100644 --- a/arch/arm/mach-zynq/spl.c +++ b/arch/arm/mach-zynq/spl.c @@ -6,6 +6,7 @@ #include <debug_uart.h> #include <hang.h> #include <spl.h> +#include <generated/dt.h> #include <asm/io.h> #include <asm/spl.h> @@ -89,8 +90,11 @@ void spl_board_prepare_for_boot(void) int board_fit_config_name_match(const char *name) { /* Just empty function now - can't decide what to choose */ - debug("%s: %s\n", __func__, name); + debug("%s: Check %s, default %s\n", __func__, name, DEVICE_TREE); - return 0; + if (!strcmp(name, DEVICE_TREE)) + return 0; + + return -1; } #endif |