All of lore.kernel.org
 help / color / mirror / Atom feed
From: Lokesh Vutla <lokeshvutla@ti.com>
To: u-boot@lists.denx.de
Subject: [PATCH 08/18] include: configs: Update env for selecting right dtb
Date: Thu, 6 May 2021 16:44:55 +0530	[thread overview]
Message-ID: <20210506111505.6741-9-lokeshvutla@ti.com> (raw)
In-Reply-To: <20210506111505.6741-1-lokeshvutla@ti.com>

Now that single defconfig can be used for booting AM64 EVM and SK,
default device tree will not work for selecting dtb for kernel.
Update the env to select right dtb based on eeprom.

Signed-off-by: Lokesh Vutla <lokeshvutla@ti.com>
---
 include/configs/am64x_evm.h | 11 +++++++----
 1 file changed, 7 insertions(+), 4 deletions(-)

diff --git a/include/configs/am64x_evm.h b/include/configs/am64x_evm.h
index 6fe5c19f12..7c30e50c5f 100644
--- a/include/configs/am64x_evm.h
+++ b/include/configs/am64x_evm.h
@@ -58,10 +58,13 @@
 
 /* U-Boot general configuration */
 #define EXTRA_ENV_AM642_BOARD_SETTINGS					\
-	"default_device_tree=" CONFIG_DEFAULT_DEVICE_TREE ".dtb\0"	\
 	"findfdt="							\
-		"setenv name_fdt ${default_device_tree};"		\
-		"setenv fdtfile ${name_fdt}\0"				\
+		"if test $board_name = am64x_gpevm; then " \
+			"setenv fdtfile k3-am642-evm.dtb; fi; " \
+		"if test $board_name = am64x_skevm; then " \
+			"setenv fdtfile k3-am642-sk.dtb; fi;" \
+		"if test $fdtfile = undefined; then " \
+			"echo WARNING: Could not determine device tree to use; fi; \0" \
 	"name_kern=Image\0"						\
 	"console=ttyS2,115200n8\0"					\
 	"args_all=setenv optargs earlycon=ns16550a,mmio32,0x02800000 "	\
@@ -76,7 +79,7 @@
 	"bootdir=/boot\0"						\
 	"rd_spec=-\0"							\
 	"init_mmc=run args_all args_mmc\0"				\
-	"get_fdt_mmc=load mmc ${bootpart} ${fdtaddr} ${bootdir}/${name_fdt}\0" \
+	"get_fdt_mmc=load mmc ${bootpart} ${fdtaddr} ${bootdir}/${fdtfile}\0" \
 	"get_overlay_mmc="						\
 		"fdt address ${fdtaddr};"				\
 		"fdt resize 0x100000;"					\
-- 
2.30.0

  parent reply	other threads:[~2021-05-06 11:14 UTC|newest]

Thread overview: 23+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-05-06 11:14 [PATCH 00/18] arm: k3-am64: Add initial support for AM64 SK Lokesh Vutla
2021-05-06 11:14 ` [PATCH 01/18] soc: ti: k3-socinfo: Add entry for AM64X SoC family Lokesh Vutla
2021-05-08 10:06   ` Vignesh Raghavendra
2021-05-09 13:34     ` Lokesh Vutla
2021-05-06 11:14 ` [PATCH 02/18] board: ti: am64x: Add support for reading eeprom data Lokesh Vutla
2021-05-06 11:14 ` [PATCH 03/18] board: ti: am64x: Enable support for reading EEPROM in R5 SPL Lokesh Vutla
2021-05-06 11:14 ` [PATCH 04/18] board: ti: am64x: Add support for detecting multiple device trees Lokesh Vutla
2021-05-06 11:14 ` [PATCH 05/18] arm: am64x: Add support for selecting DT based on EEPROM Lokesh Vutla
2021-05-06 11:14 ` [PATCH 06/18] include: configs: am64x: Avoid overlap of BSS and stack area Lokesh Vutla
2021-05-06 11:14 ` [PATCH 07/18] include: configs: am64x_evm: Optimize size of SPL BSS Lokesh Vutla
2021-05-06 11:14 ` Lokesh Vutla [this message]
2021-05-06 11:14 ` [PATCH 09/18] arm: dts: k3-am64-evm: Make chip id available before pre-reloc Lokesh Vutla
2021-05-06 11:14 ` [PATCH 10/18] arm: dts: k3-am642-r5-evm: Do not use power-domains for I2C Lokesh Vutla
2021-05-06 11:14 ` [PATCH 11/18] arm: dts: am642-evm: Add I2C nodes Lokesh Vutla
2021-05-06 11:14 ` [PATCH 12/18] arm: dts: am642-sk: Add initial sk dts Lokesh Vutla
2021-05-06 11:15 ` [PATCH 13/18] arm: dts: am642-r5-sk: Add r5 specific dts Lokesh Vutla
2021-05-06 11:15 ` [PATCH 14/18] configs: am64x_evm_r5: Enable checks for spl and stack sizes Lokesh Vutla
2021-05-06 11:15 ` [PATCH 15/18] configs: am64x_evm_r5: Enable support for building multiple device trees Lokesh Vutla
2021-05-06 11:15 ` [PATCH 16/18] configs: am64x_evm_a53: Enable configs for printing cpuinfo Lokesh Vutla
2021-05-06 11:15 ` [PATCH 17/18] configs: am64x_evm_a53: Enable support for reading eeprom Lokesh Vutla
2021-05-06 11:15 ` [PATCH 18/18] configs: am64x_evm_a53: Enable support for building multiple dtbs Lokesh Vutla
2021-05-07 18:18 ` [PATCH 00/18] arm: k3-am64: Add initial support for AM64 SK Tom Rini
2021-05-12 13:59 ` Lokesh Vutla

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20210506111505.6741-9-lokeshvutla@ti.com \
    --to=lokeshvutla@ti.com \
    --cc=u-boot@lists.denx.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.