* [PATCH] arm: mach-k3: introduce generic board detction kconfig option
@ 2023-03-03 19:16 Christian Gmeiner
2023-03-06 20:12 ` Tom Rini
2023-03-30 1:53 ` Tom Rini
0 siblings, 2 replies; 3+ messages in thread
From: Christian Gmeiner @ 2023-03-03 19:16 UTC (permalink / raw)
To: Christian Gmeiner, open list; +Cc: nm
For non TI boards it is not possible to enable the do_board_detect()
call as TI_I2C_BOARD_DETECT is defined in board/ti/common/Kconfig.
I want to use do_board_detect() to dectect boards and properties based
on some SPI communication with a FPGA.
Signed-off-by: Christian Gmeiner <christian.gmeiner@gmail.com>
---
arch/arm/mach-k3/Kconfig | 5 +++++
arch/arm/mach-k3/am642_init.c | 2 +-
arch/arm/mach-k3/am654_init.c | 3 +--
arch/arm/mach-k3/j721e_init.c | 5 ++---
board/ti/common/Kconfig | 1 +
5 files changed, 10 insertions(+), 6 deletions(-)
diff --git a/arch/arm/mach-k3/Kconfig b/arch/arm/mach-k3/Kconfig
index a8c3a593d5..7edbac26cc 100644
--- a/arch/arm/mach-k3/Kconfig
+++ b/arch/arm/mach-k3/Kconfig
@@ -187,6 +187,11 @@ config K3_X509_SWRV
help
SWRV for X509 certificate used for boot images
+config K3_BOARD_DETECT
+ bool "Support for Board detection"
+ help
+ Support for board detection.
+
source "board/ti/am65x/Kconfig"
source "board/ti/am64x/Kconfig"
source "board/ti/am62x/Kconfig"
diff --git a/arch/arm/mach-k3/am642_init.c b/arch/arm/mach-k3/am642_init.c
index 96f292ea75..1bf7e163cc 100644
--- a/arch/arm/mach-k3/am642_init.c
+++ b/arch/arm/mach-k3/am642_init.c
@@ -100,7 +100,7 @@ void do_dt_magic(void)
{
int ret, rescan;
- if (IS_ENABLED(CONFIG_TI_I2C_BOARD_DETECT))
+ if (IS_ENABLED(CONFIG_K3_BOARD_DETECT))
do_board_detect();
/*
diff --git a/arch/arm/mach-k3/am654_init.c b/arch/arm/mach-k3/am654_init.c
index 768fdd6960..70059edb03 100644
--- a/arch/arm/mach-k3/am654_init.c
+++ b/arch/arm/mach-k3/am654_init.c
@@ -245,8 +245,7 @@ void board_init_f(ulong dummy)
/* Output System Firmware version info */
k3_sysfw_print_ver();
- /* Perform EEPROM-based board detection */
- if (IS_ENABLED(CONFIG_TI_I2C_BOARD_DETECT))
+ if (IS_ENABLED(CONFIG_K3_BOARD_DETECT))
do_board_detect();
#if defined(CONFIG_CPU_V7R) && defined(CONFIG_K3_AVS0)
diff --git a/arch/arm/mach-k3/j721e_init.c b/arch/arm/mach-k3/j721e_init.c
index 276cbb5dae..9cae3ac67e 100644
--- a/arch/arm/mach-k3/j721e_init.c
+++ b/arch/arm/mach-k3/j721e_init.c
@@ -140,7 +140,7 @@ void do_dt_magic(void)
int ret, rescan, mmc_dev = -1;
static struct mmc *mmc;
- if (IS_ENABLED(CONFIG_TI_I2C_BOARD_DETECT))
+ if (IS_ENABLED(CONFIG_K3_BOARD_DETECT))
do_board_detect();
/*
@@ -267,8 +267,7 @@ void board_init_f(ulong dummy)
/* Output System Firmware version info */
k3_sysfw_print_ver();
- /* Perform EEPROM-based board detection */
- if (IS_ENABLED(CONFIG_TI_I2C_BOARD_DETECT))
+ if (IS_ENABLED(CONFIG_K3_BOARD_DETECT))
do_board_detect();
#if defined(CONFIG_CPU_V7R) && defined(CONFIG_K3_AVS0)
diff --git a/board/ti/common/Kconfig b/board/ti/common/Kconfig
index 49edd98014..414fc3034f 100644
--- a/board/ti/common/Kconfig
+++ b/board/ti/common/Kconfig
@@ -1,5 +1,6 @@
config TI_I2C_BOARD_DETECT
bool "Support for Board detection for TI platforms"
+ select K3_BOARD_DETECT
help
Support for detection board information on Texas Instrument's
Evaluation Boards which have I2C based EEPROM detection
--
2.39.2
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH] arm: mach-k3: introduce generic board detction kconfig option
2023-03-03 19:16 [PATCH] arm: mach-k3: introduce generic board detction kconfig option Christian Gmeiner
@ 2023-03-06 20:12 ` Tom Rini
2023-03-30 1:53 ` Tom Rini
1 sibling, 0 replies; 3+ messages in thread
From: Tom Rini @ 2023-03-06 20:12 UTC (permalink / raw)
To: Christian Gmeiner; +Cc: open list, nm
[-- Attachment #1: Type: text/plain, Size: 460 bytes --]
On Fri, Mar 03, 2023 at 08:16:28PM +0100, Christian Gmeiner wrote:
> For non TI boards it is not possible to enable the do_board_detect()
> call as TI_I2C_BOARD_DETECT is defined in board/ti/common/Kconfig.
>
> I want to use do_board_detect() to dectect boards and properties based
> on some SPI communication with a FPGA.
>
> Signed-off-by: Christian Gmeiner <christian.gmeiner@gmail.com>
Reviewed-by: Tom Rini <trini@konsulko.com>
--
Tom
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 659 bytes --]
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] arm: mach-k3: introduce generic board detction kconfig option
2023-03-03 19:16 [PATCH] arm: mach-k3: introduce generic board detction kconfig option Christian Gmeiner
2023-03-06 20:12 ` Tom Rini
@ 2023-03-30 1:53 ` Tom Rini
1 sibling, 0 replies; 3+ messages in thread
From: Tom Rini @ 2023-03-30 1:53 UTC (permalink / raw)
To: Christian Gmeiner; +Cc: open list, nm
[-- Attachment #1: Type: text/plain, Size: 495 bytes --]
On Fri, Mar 03, 2023 at 08:16:28PM +0100, Christian Gmeiner wrote:
> For non TI boards it is not possible to enable the do_board_detect()
> call as TI_I2C_BOARD_DETECT is defined in board/ti/common/Kconfig.
>
> I want to use do_board_detect() to dectect boards and properties based
> on some SPI communication with a FPGA.
>
> Signed-off-by: Christian Gmeiner <christian.gmeiner@gmail.com>
> Reviewed-by: Tom Rini <trini@konsulko.com>
Applied to u-boot/next, thanks!
--
Tom
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 659 bytes --]
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2023-03-30 1:55 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-03-03 19:16 [PATCH] arm: mach-k3: introduce generic board detction kconfig option Christian Gmeiner
2023-03-06 20:12 ` Tom Rini
2023-03-30 1:53 ` Tom Rini
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox