summaryrefslogtreecommitdiff
path: root/arch/arm
diff options
context:
space:
mode:
authorTom Rini <trini@konsulko.com>2021-08-18 23:12:24 -0400
committerTom Rini <trini@konsulko.com>2021-08-30 14:10:07 -0400
commit55dabcc8f24598e2777f663de09ab55fbe1269da (patch)
treed785190ccaa53ef848573925a07a5f7aaadd93b8 /arch/arm
parent5b4225511efe4480806c5098c664eedfa6933432 (diff)
downloadu-boot-55dabcc8f24598e2777f663de09ab55fbe1269da.tar.gz
u-boot-55dabcc8f24598e2777f663de09ab55fbe1269da.tar.bz2
u-boot-55dabcc8f24598e2777f663de09ab55fbe1269da.zip
Convert CONFIG_SYS_I2C_LEGACY to Kconfig and add CONFIG_[ST]PL_SYS_I2C_LEGACY
First, we convert CONFIG_SYS_I2C_LEGACY to Kconfig. Next, as you cannot have SYS_I2C_LEGACY and DM_I2C at the same time, introduce CONFIG_SPL_SYS_I2C_LEGACY so that we can enable the legacy option only in SPL. Finally, for some PowerPC cases we also need CONFIG_TPL_SYS_I2C_LEGACY support. Convert all of the existing users to one or more symbols. Signed-off-by: Tom Rini <trini@konsulko.com>
Diffstat (limited to 'arch/arm')
-rw-r--r--arch/arm/cpu/armv8/fsl-layerscape/Kconfig5
-rw-r--r--arch/arm/cpu/armv8/fsl-layerscape/soc.c2
-rw-r--r--arch/arm/cpu/armv8/fsl-layerscape/spl.c2
-rw-r--r--arch/arm/include/asm/arch-fsl-layerscape/config.h1
-rw-r--r--arch/arm/mach-kirkwood/include/mach/config.h3
-rw-r--r--arch/arm/mach-sunxi/Kconfig7
6 files changed, 14 insertions, 6 deletions
diff --git a/arch/arm/cpu/armv8/fsl-layerscape/Kconfig b/arch/arm/cpu/armv8/fsl-layerscape/Kconfig
index a1e1a2699b..3344730aef 100644
--- a/arch/arm/cpu/armv8/fsl-layerscape/Kconfig
+++ b/arch/arm/cpu/armv8/fsl-layerscape/Kconfig
@@ -121,6 +121,7 @@ config ARCH_LS1046A
imply ID_EEPROM
imply SCSI
imply SCSI_AHCI
+ imply SPL_SYS_I2C_LEGACY
config ARCH_LS1088A
bool
@@ -162,6 +163,7 @@ config ARCH_LS1088A
select RESV_RAM if GIC_V3_ITS
imply ID_EEPROM
imply SCSI
+ imply SPL_SYS_I2C_LEGACY
imply PANIC_HANG
config ARCH_LS2080A
@@ -215,6 +217,7 @@ config ARCH_LS2080A
imply DISTRO_DEFAULTS
imply ID_EEPROM
imply PANIC_HANG
+ imply SPL_SYS_I2C_LEGACY
config ARCH_LX2162A
bool
@@ -246,6 +249,7 @@ config ARCH_LX2162A
imply PANIC_HANG
imply SCSI
imply SCSI_AHCI
+ imply SPL_SYS_I2C_LEGACY
config ARCH_LX2160A
bool
@@ -280,6 +284,7 @@ config ARCH_LX2160A
imply PANIC_HANG
imply SCSI
imply SCSI_AHCI
+ imply SPL_SYS_I2C_LEGACY
config FSL_LSCH2
bool
diff --git a/arch/arm/cpu/armv8/fsl-layerscape/soc.c b/arch/arm/cpu/armv8/fsl-layerscape/soc.c
index 42a0968546..41f3e95019 100644
--- a/arch/arm/cpu/armv8/fsl-layerscape/soc.c
+++ b/arch/arm/cpu/armv8/fsl-layerscape/soc.c
@@ -329,7 +329,7 @@ static void erratum_rcw_src(void)
#ifdef CONFIG_SYS_FSL_ERRATUM_A009203
static void erratum_a009203(void)
{
-#ifdef CONFIG_SYS_I2C_LEGACY
+#if CONFIG_IS_ENABLED(SYS_I2C_LEGACY)
u8 __iomem *ptr;
#ifdef I2C1_BASE_ADDR
ptr = (u8 __iomem *)(I2C1_BASE_ADDR + I2C_DEBUG_REG);
diff --git a/arch/arm/cpu/armv8/fsl-layerscape/spl.c b/arch/arm/cpu/armv8/fsl-layerscape/spl.c
index 1d5e344452..aa0bae4964 100644
--- a/arch/arm/cpu/armv8/fsl-layerscape/spl.c
+++ b/arch/arm/cpu/armv8/fsl-layerscape/spl.c
@@ -88,7 +88,7 @@ void board_init_f(ulong dummy)
preloader_console_init();
spl_set_bd();
-#ifdef CONFIG_SYS_I2C_LEGACY
+#if CONFIG_IS_ENABLED(SYS_I2C_LEGACY)
#ifdef CONFIG_SPL_I2C
i2c_init_all();
#endif
diff --git a/arch/arm/include/asm/arch-fsl-layerscape/config.h b/arch/arm/include/asm/arch-fsl-layerscape/config.h
index 3675ce763d..f8d0656ca9 100644
--- a/arch/arm/include/asm/arch-fsl-layerscape/config.h
+++ b/arch/arm/include/asm/arch-fsl-layerscape/config.h
@@ -184,7 +184,6 @@
#define TZPC_BASE 0x02200000
#define TZPCDECPROT_0_SET_BASE (TZPC_BASE + 0x804)
#if !CONFIG_IS_ENABLED(DM_I2C)
-#define CONFIG_SYS_I2C_LEGACY
#define CONFIG_SYS_I2C_EARLY_INIT
#endif
#define SRDS_MAX_LANES 8
diff --git a/arch/arm/mach-kirkwood/include/mach/config.h b/arch/arm/mach-kirkwood/include/mach/config.h
index 74b007823f..f7522d959f 100644
--- a/arch/arm/mach-kirkwood/include/mach/config.h
+++ b/arch/arm/mach-kirkwood/include/mach/config.h
@@ -95,9 +95,6 @@
* I2C related stuff
*/
#if defined(CONFIG_CMD_I2C) && !CONFIG_IS_ENABLED(DM_I2C)
-#ifndef CONFIG_SYS_I2C_SOFT
-#define CONFIG_SYS_I2C_LEGACY
-#endif
#define CONFIG_SYS_I2C_SLAVE 0x0
#define CONFIG_SYS_I2C_SPEED 100000
#endif
diff --git a/arch/arm/mach-sunxi/Kconfig b/arch/arm/mach-sunxi/Kconfig
index 49f94f095c..79c669a481 100644
--- a/arch/arm/mach-sunxi/Kconfig
+++ b/arch/arm/mach-sunxi/Kconfig
@@ -209,6 +209,8 @@ config MACH_SUN4I
select DRAM_SUN4I
select SUNXI_GEN_SUN4I
select SUPPORT_SPL
+ imply SPL_SYS_I2C_LEGACY
+ imply SYS_I2C_LEGACY
config MACH_SUN5I
bool "sun5i (Allwinner A13)"
@@ -219,6 +221,8 @@ config MACH_SUN5I
select SUNXI_GEN_SUN4I
select SUPPORT_SPL
imply CONS_INDEX_2 if !DM_SERIAL
+ imply SPL_SYS_I2C_LEGACY
+ imply SYS_I2C_LEGACY
config MACH_SUN6I
bool "sun6i (Allwinner A31)"
@@ -245,6 +249,8 @@ config MACH_SUN7I
select SUNXI_GEN_SUN4I
select SUPPORT_SPL
select ARMV7_BOOT_SEC_DEFAULT if OLD_SUNXI_KERNEL_COMPAT
+ imply SPL_SYS_I2C_LEGACY
+ imply SYS_I2C_LEGACY
config MACH_SUN8I_A23
bool "sun8i (Allwinner A23)"
@@ -303,6 +309,7 @@ config MACH_SUN8I_R40
select SUNXI_DRAM_DW
select SUNXI_DRAM_DW_32BIT
select PHY_SUN4I_USB
+ imply SPL_SYS_I2C_LEGACY
config MACH_SUN8I_V3S
bool "sun8i (Allwinner V3/V3s/S3/S3L)"