u-boot.lists.denx.de archive mirror
 help / color / mirror / Atom feed
* [PATCH v2] arm: mach-k3: am6_init: Use CONFIG_TI_I2C_BOARD_DETECT
@ 2022-02-15  6:47 Christian Gmeiner
  2022-02-24  7:21 ` Christian Gmeiner
  2022-03-05 16:35 ` Tom Rini
  0 siblings, 2 replies; 4+ messages in thread
From: Christian Gmeiner @ 2022-02-15  6:47 UTC (permalink / raw)
  To: u-boot; +Cc: dannenberg, Christian Gmeiner

We only want to call do_board_detect() if CONFIG_TI_I2C_BOARD_DETECT
is set. Same as done for am64.

This makes it possible to add a custom am65 based board design to
U-Boot that does not use this board detection mechanism.

Signed-off-by: Christian Gmeiner <christian.gmeiner@gmail.com>
---
 arch/arm/mach-k3/am6_init.c |  3 ++-
 board/ti/am65x/evm.c        | 26 +++++++++++++++-----------
 2 files changed, 17 insertions(+), 12 deletions(-)

diff --git a/arch/arm/mach-k3/am6_init.c b/arch/arm/mach-k3/am6_init.c
index ffb7aaded2..8a6b1de764 100644
--- a/arch/arm/mach-k3/am6_init.c
+++ b/arch/arm/mach-k3/am6_init.c
@@ -251,7 +251,8 @@ void board_init_f(ulong dummy)
 	k3_sysfw_print_ver();
 
 	/* Perform EEPROM-based board detection */
-	do_board_detect();
+	if (IS_ENABLED(CONFIG_TI_I2C_BOARD_DETECT))
+		do_board_detect();
 
 #if defined(CONFIG_CPU_V7R) && defined(CONFIG_K3_AVS0)
 	ret = uclass_get_device_by_driver(UCLASS_MISC, DM_DRIVER_GET(k3_avs),
diff --git a/board/ti/am65x/evm.c b/board/ti/am65x/evm.c
index fbe33cbea5..7182a8cad1 100644
--- a/board/ti/am65x/evm.c
+++ b/board/ti/am65x/evm.c
@@ -129,6 +129,7 @@ int ft_board_setup(void *blob, struct bd_info *bd)
 }
 #endif
 
+#ifdef CONFIG_TI_I2C_BOARD_DETECT
 int do_board_detect(void)
 {
 	int ret;
@@ -353,23 +354,26 @@ static int probe_daughtercards(void)
 
 	return 0;
 }
+#endif
 
 int board_late_init(void)
 {
-	struct ti_am6_eeprom *ep = TI_AM6_EEPROM_DATA;
+	if (IS_ENABLED(CONFIG_TI_I2C_BOARD_DETECT)) {
+		struct ti_am6_eeprom *ep = TI_AM6_EEPROM_DATA;
 
-	setup_board_eeprom_env();
+		setup_board_eeprom_env();
 
-	/*
-	 * The first MAC address for ethernet a.k.a. ethernet0 comes from
-	 * efuse populated via the am654 gigabit eth switch subsystem driver.
-	 * All the other ones are populated via EEPROM, hence continue with
-	 * an index of 1.
-	 */
-	board_ti_am6_set_ethaddr(1, ep->mac_addr_cnt);
+		/*
+		 * The first MAC address for ethernet a.k.a. ethernet0 comes from
+		 * efuse populated via the am654 gigabit eth switch subsystem driver.
+		 * All the other ones are populated via EEPROM, hence continue with
+		 * an index of 1.
+		 */
+		board_ti_am6_set_ethaddr(1, ep->mac_addr_cnt);
 
-	/* Check for and probe any plugged-in daughtercards */
-	probe_daughtercards();
+		/* Check for and probe any plugged-in daughtercards */
+		probe_daughtercards();
+	}
 
 	return 0;
 }
-- 
2.34.1


^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: [PATCH v2] arm: mach-k3: am6_init: Use CONFIG_TI_I2C_BOARD_DETECT
  2022-02-15  6:47 [PATCH v2] arm: mach-k3: am6_init: Use CONFIG_TI_I2C_BOARD_DETECT Christian Gmeiner
@ 2022-02-24  7:21 ` Christian Gmeiner
  2022-03-04 12:53   ` Christian Gmeiner
  2022-03-05 16:35 ` Tom Rini
  1 sibling, 1 reply; 4+ messages in thread
From: Christian Gmeiner @ 2022-02-24  7:21 UTC (permalink / raw)
  To: U-Boot Mailing List; +Cc: dannenberg

Hi

Am Di., 15. Feb. 2022 um 07:48 Uhr schrieb Christian Gmeiner
<christian.gmeiner@gmail.com>:
>
> We only want to call do_board_detect() if CONFIG_TI_I2C_BOARD_DETECT
> is set. Same as done for am64.
>
> This makes it possible to add a custom am65 based board design to
> U-Boot that does not use this board detection mechanism.
>
> Signed-off-by: Christian Gmeiner <christian.gmeiner@gmail.com>


Gentle ping.

-- 
greets
--
Christian Gmeiner, MSc

https://christian-gmeiner.info/privacypolicy

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH v2] arm: mach-k3: am6_init: Use CONFIG_TI_I2C_BOARD_DETECT
  2022-02-24  7:21 ` Christian Gmeiner
@ 2022-03-04 12:53   ` Christian Gmeiner
  0 siblings, 0 replies; 4+ messages in thread
From: Christian Gmeiner @ 2022-03-04 12:53 UTC (permalink / raw)
  To: U-Boot Mailing List; +Cc: dannenberg, Tom Rini

Am Do., 24. Feb. 2022 um 08:21 Uhr schrieb Christian Gmeiner
<christian.gmeiner@gmail.com>:
>
> Hi
>
> Am Di., 15. Feb. 2022 um 07:48 Uhr schrieb Christian Gmeiner
> <christian.gmeiner@gmail.com>:
> >
> > We only want to call do_board_detect() if CONFIG_TI_I2C_BOARD_DETECT
> > is set. Same as done for am64.
> >
> > This makes it possible to add a custom am65 based board design to
> > U-Boot that does not use this board detection mechanism.
> >
> > Signed-off-by: Christian Gmeiner <christian.gmeiner@gmail.com>
>
>
> Gentle ping.
>
> --
> greets
> --
> Christian Gmeiner, MSc
>
> https://christian-gmeiner.info/privacypolicy

Another gentle ping...

-- 
greets
--
Christian Gmeiner, MSc

https://christian-gmeiner.info/privacypolicy

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH v2] arm: mach-k3: am6_init: Use CONFIG_TI_I2C_BOARD_DETECT
  2022-02-15  6:47 [PATCH v2] arm: mach-k3: am6_init: Use CONFIG_TI_I2C_BOARD_DETECT Christian Gmeiner
  2022-02-24  7:21 ` Christian Gmeiner
@ 2022-03-05 16:35 ` Tom Rini
  1 sibling, 0 replies; 4+ messages in thread
From: Tom Rini @ 2022-03-05 16:35 UTC (permalink / raw)
  To: Christian Gmeiner; +Cc: u-boot, dannenberg

[-- Attachment #1: Type: text/plain, Size: 428 bytes --]

On Tue, Feb 15, 2022 at 07:47:55AM +0100, Christian Gmeiner wrote:

> We only want to call do_board_detect() if CONFIG_TI_I2C_BOARD_DETECT
> is set. Same as done for am64.
> 
> This makes it possible to add a custom am65 based board design to
> U-Boot that does not use this board detection mechanism.
> 
> Signed-off-by: Christian Gmeiner <christian.gmeiner@gmail.com>

Applied to u-boot/master, thanks!

-- 
Tom

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 659 bytes --]

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2022-03-05 16:35 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-02-15  6:47 [PATCH v2] arm: mach-k3: am6_init: Use CONFIG_TI_I2C_BOARD_DETECT Christian Gmeiner
2022-02-24  7:21 ` Christian Gmeiner
2022-03-04 12:53   ` Christian Gmeiner
2022-03-05 16:35 ` Tom Rini

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).