diff mbox series

[V2,04/12] board: ti: j721s2: Add support to update board_name for am68-sk

Message ID 20221221135219.24702-5-sinthu.raja@ti.com
State Superseded
Delegated to: Tom Rini
Headers show
Series AM68: Add support for AM68 Starter Kit | expand

Commit Message

Sinthu Raja Dec. 21, 2022, 1:52 p.m. UTC
From: Sinthu Raja <sinthu.raja@ti.com>

Update setup_board_eeprom_env() to choose the right board name
for am68-sk.

Signed-off-by: Sinthu Raja <sinthu.raja@ti.com>
---

Changes in V2:
=============
Address review comments:
- Move board_is_xxx within CONFIG_TI_I2C_BOARD_DETECT block to maintain the "mini" U-Boot concept for this SoC.

V1: https://patchwork.ozlabs.org/project/uboot/patch/20221027104846.11820-5-sinthu.raja@ti.com/

 board/ti/j721s2/evm.c | 12 ++++++++++--
 1 file changed, 10 insertions(+), 2 deletions(-)

Comments

Tom Rini Dec. 23, 2022, 3 p.m. UTC | #1
On Wed, Dec 21, 2022 at 07:22:11PM +0530, Sinthu Raja wrote:

> From: Sinthu Raja <sinthu.raja@ti.com>
> 
> Update setup_board_eeprom_env() to choose the right board name
> for am68-sk.
> 
> Signed-off-by: Sinthu Raja <sinthu.raja@ti.com>

Reviewed-by: Tom Rini <trini@konsulko.com>
diff mbox series

Patch

diff --git a/board/ti/j721s2/evm.c b/board/ti/j721s2/evm.c
index e09adc8ad3..de885085b3 100644
--- a/board/ti/j721s2/evm.c
+++ b/board/ti/j721s2/evm.c
@@ -26,8 +26,6 @@ 
 
 #include "../common/board_detect.h"
 
-#define board_is_j721s2_som()	board_ti_k3_is("J721S2X-PM1-SOM")
-
 DECLARE_GLOBAL_DATA_PTR;
 
 int board_init(void)
@@ -101,6 +99,14 @@  int ft_board_setup(void *blob, struct bd_info *bd)
 #endif
 
 #ifdef CONFIG_TI_I2C_BOARD_DETECT
+/* 
+ * Functions specific to EVM and SK designs of J721S2/AM68 family.
+ */
+
+#define board_is_j721s2_som()	board_ti_k3_is("J721S2X-PM1-SOM")
+
+#define board_is_am68_sk_som() board_ti_k3_is("AM68-SK-SOM")
+
 int do_board_detect(void)
 {
 	int ret;
@@ -136,6 +142,8 @@  static void setup_board_eeprom_env(void)
 
 	if (board_is_j721s2_som())
 		name = "j721s2";
+	else if (board_is_am68_sk_som())
+		name = "am68-sk";
 	else
 		printf("Unidentified board claims %s in eeprom header\n",
 		       board_ti_get_name());