]> git.dujemihanovic.xyz Git - u-boot.git/commitdiff
i2c: S3C24X0: Finish Kconfig migration
authorTom Rini <trini@konsulko.com>
Tue, 17 Aug 2021 21:59:42 +0000 (17:59 -0400)
committerTom Rini <trini@konsulko.com>
Mon, 30 Aug 2021 18:10:05 +0000 (14:10 -0400)
Finish moving this driver to Kconfig.
- Update the dependency logic for Exynos5 too
- Remove the unused CONFIG_SYS_I2C_S3C24X0_SPEED variable
- Drop CONFIG_SYS_I2C_S3C24X0_SLAVE as it's always set to 0.
- Move the internal SYS_I2C_S3C24X0_SLAVE define closer to the only user.

Cc: Jaehoon Chung <jh80.chung@samsung.com>
Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Minkyu Kang <mk7.kang@samsung.com>
Reviewed-by: Jaehoon Chung <jh80.chung@samsung.com>
configs/arndale_defconfig
configs/odroid-xu3_defconfig
configs/peach-pi_defconfig
configs/peach-pit_defconfig
configs/smdk5250_defconfig
configs/smdk5420_defconfig
configs/snow_defconfig
configs/spring_defconfig
drivers/i2c/Kconfig
drivers/i2c/s3c24x0_i2c.c
include/configs/exynos5-common.h

index 133c0eb8884ebda0cdf5f0d6566df685f83ed99d..f475bdefe5f7b7ee760a985e2cdb248f78f86e4d 100644 (file)
@@ -31,6 +31,7 @@ CONFIG_CMD_EXT4_WRITE=y
 CONFIG_ENV_OVERWRITE=y
 CONFIG_ENV_IS_IN_MMC=y
 CONFIG_SYS_RELOC_GD_ENV_ADDR=y
+CONFIG_SYS_I2C_S3C24X0=y
 CONFIG_SUPPORT_EMMC_BOOT=y
 CONFIG_MMC_DW=y
 CONFIG_MMC_SDHCI=y
index f56dfb7d8e2ff269b02ae2f1d28749b193e1bdab..150eacdbebe89a46c07f8a813ea2a74db5ae8dd0 100644 (file)
@@ -42,6 +42,7 @@ CONFIG_ADC_EXYNOS=y
 CONFIG_DFU_MMC=y
 CONFIG_SET_DFU_ALT_INFO=y
 CONFIG_SYS_DFU_DATA_BUF_SIZE=0x2000000
+CONFIG_SYS_I2C_S3C24X0=y
 CONFIG_SUPPORT_EMMC_BOOT=y
 CONFIG_MMC_DW=y
 CONFIG_MTD=y
index 92d6be43f81708098f1d55dad6ba1b0a7a598685..e8509d8dcbc2164c1e3957831b8c4fcbd5916628 100644 (file)
@@ -38,6 +38,7 @@ CONFIG_USE_ENV_SPI_BUS=y
 CONFIG_ENV_SPI_BUS=1
 CONFIG_SYS_RELOC_GD_ENV_ADDR=y
 CONFIG_I2C_CROS_EC_TUNNEL=y
+CONFIG_SYS_I2C_S3C24X0=y
 CONFIG_I2C_MUX=y
 CONFIG_I2C_ARB_GPIO_CHALLENGE=y
 CONFIG_CROS_EC_KEYB=y
index 824a664904e85ebe8ed4a382e7745d0dfb5d4157..aaec917c177febcd0e8e495509efba8647fc4df5 100644 (file)
@@ -37,6 +37,7 @@ CONFIG_USE_ENV_SPI_BUS=y
 CONFIG_ENV_SPI_BUS=1
 CONFIG_SYS_RELOC_GD_ENV_ADDR=y
 CONFIG_I2C_CROS_EC_TUNNEL=y
+CONFIG_SYS_I2C_S3C24X0=y
 CONFIG_I2C_MUX=y
 CONFIG_I2C_ARB_GPIO_CHALLENGE=y
 CONFIG_CROS_EC_KEYB=y
index 3ed1947fd682ed44941830a78f71953e0e5f4f08..d0a25139ac0f87aea6b1dba0b167008ddee4394c 100644 (file)
@@ -38,6 +38,7 @@ CONFIG_ENV_IS_IN_SPI_FLASH=y
 CONFIG_USE_ENV_SPI_BUS=y
 CONFIG_ENV_SPI_BUS=1
 CONFIG_SYS_RELOC_GD_ENV_ADDR=y
+CONFIG_SYS_I2C_S3C24X0=y
 CONFIG_SUPPORT_EMMC_BOOT=y
 CONFIG_MMC_DW=y
 CONFIG_MMC_SDHCI=y
index 7b739400a5bfc5ba6f12b64ebf9338ee2f7f60cd..e484b234dd0bb24bbc78e15792f7f681e618c3ed 100644 (file)
@@ -33,6 +33,7 @@ CONFIG_ENV_IS_IN_SPI_FLASH=y
 CONFIG_USE_ENV_SPI_BUS=y
 CONFIG_ENV_SPI_BUS=1
 CONFIG_SYS_RELOC_GD_ENV_ADDR=y
+CONFIG_SYS_I2C_S3C24X0=y
 CONFIG_SUPPORT_EMMC_BOOT=y
 CONFIG_MMC_DW=y
 CONFIG_MMC_SDHCI=y
index a5fbd1d346da9e291bdc8266cfec3b6d1ce97c4a..f91cfeda8b9c557dd62dbff0177c473019a1cfdd 100644 (file)
@@ -43,6 +43,7 @@ CONFIG_USE_ENV_SPI_BUS=y
 CONFIG_ENV_SPI_BUS=1
 CONFIG_SYS_RELOC_GD_ENV_ADDR=y
 CONFIG_I2C_CROS_EC_LDO=y
+CONFIG_SYS_I2C_S3C24X0=y
 CONFIG_I2C_MUX=y
 CONFIG_I2C_ARB_GPIO_CHALLENGE=y
 CONFIG_CROS_EC_KEYB=y
index 53c375e5b4f2f8212c68677e4daea41ba9a1b257..dbebf0ba6191e3e6afb43cfc3659f0ae305121c3 100644 (file)
@@ -43,6 +43,7 @@ CONFIG_USE_ENV_SPI_BUS=y
 CONFIG_ENV_SPI_BUS=1
 CONFIG_SYS_RELOC_GD_ENV_ADDR=y
 CONFIG_I2C_CROS_EC_LDO=y
+CONFIG_SYS_I2C_S3C24X0=y
 CONFIG_I2C_MUX=y
 CONFIG_I2C_ARB_GPIO_CHALLENGE=y
 CONFIG_CROS_EC_KEYB=y
index 63d03a3cebfcd969fb9cbc3c294c28d1a19808ff..a50c1f38336d8b7fa0c284de6b0ac6c05050167d 100644 (file)
@@ -449,7 +449,7 @@ config SYS_I2C_OCTEON
 
 config SYS_I2C_S3C24X0
        bool "Samsung I2C driver"
-       depends on ARCH_EXYNOS4 && DM_I2C
+       depends on (ARCH_EXYNOS4 || ARCH_EXYNOS5) && DM_I2C
        help
          Support for Samsung I2C controller as Samsung SoCs.
 
index 56f0f69885e4ac785d30f1e63ccfff776f4e3bb5..e0f499d759f8638c379fc46ab7845bca9e94961a 100644 (file)
 #include <i2c.h>
 #include "s3c24x0_i2c.h"
 
-#ifndef CONFIG_SYS_I2C_S3C24X0_SLAVE
-#define SYS_I2C_S3C24X0_SLAVE_ADDR     0
-#else
-#define SYS_I2C_S3C24X0_SLAVE_ADDR     CONFIG_SYS_I2C_S3C24X0_SLAVE
-#endif
-
 DECLARE_GLOBAL_DATA_PTR;
 
 /*
@@ -83,6 +77,8 @@ static void i2c_ch_init(struct s3c24x0_i2c *i2c, int speed, int slaveadd)
        writel(I2C_MODE_MT | I2C_TXRX_ENA, &i2c->iicstat);
 }
 
+#define SYS_I2C_S3C24X0_SLAVE_ADDR     0
+
 static int s3c24x0_i2c_set_bus_speed(struct udevice *dev, unsigned int speed)
 {
        struct s3c24x0_i2c_bus *i2c_bus = dev_get_priv(dev);
index 9297fbdc08176445baf2c00797edd7f3de0c7438..784ddd191b645fe37305f99fcc7221fe26d21185 100644 (file)
 #define EXYNOS_COPY_SPI_FNPTR_ADDR     0x02020058
 #define SPI_FLASH_UBOOT_POS    (CONFIG_SEC_FW_SIZE + CONFIG_BL1_SIZE)
 
-/* I2C */
-#define CONFIG_SYS_I2C_S3C24X0
-#define CONFIG_SYS_I2C_S3C24X0_SPEED   100000          /* 100 Kbps */
-#define CONFIG_SYS_I2C_S3C24X0_SLAVE    0x0
-
 /* SPI */
 
 /* Ethernet Controllor Driver */