summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSimon Glass <sjg@chromium.org>2016-11-23 06:34:41 -0700
committerHeiko Schocher <hs@denx.de>2016-12-05 13:27:29 +0100
commit08848e9c317cb337d438cc657e63f2c3ae92d6d3 (patch)
treeee1316e79c8b736c171e0ffe1d41cb5792014939
parentfc47cf9d054b79299274f4386cfb867a80af8c7b (diff)
downloadu-boot-imx-08848e9c317cb337d438cc657e63f2c3ae92d6d3.zip
u-boot-imx-08848e9c317cb337d438cc657e63f2c3ae92d6d3.tar.gz
u-boot-imx-08848e9c317cb337d438cc657e63f2c3ae92d6d3.tar.bz2
arm: samsung: Convert s5p_goni and smdkc100 to DM_I2C
These are the last two samsung boards that don't use DM_I2C. Move them over, leaving #ifdefs to allow the maintainer to complete this work. Signed-off-by: Simon Glass <sjg@chromium.org> Acked-by: Heiko Schocher <hs@denx.de>
-rw-r--r--arch/arm/Kconfig1
-rw-r--r--board/samsung/goni/goni.c7
-rw-r--r--include/configs/s5p_goni.h19
3 files changed, 7 insertions, 20 deletions
diff --git a/arch/arm/Kconfig b/arch/arm/Kconfig
index f011026..de4bf83 100644
--- a/arch/arm/Kconfig
+++ b/arch/arm/Kconfig
@@ -419,6 +419,7 @@ config ARCH_S5PC1XX
select DM
select DM_SERIAL
select DM_GPIO
+ select DM_I2C
config ARCH_HIGHBANK
bool "Calxeda Highbank"
diff --git a/board/samsung/goni/goni.c b/board/samsung/goni/goni.c
index e8329bb..b066832 100644
--- a/board/samsung/goni/goni.c
+++ b/board/samsung/goni/goni.c
@@ -45,11 +45,15 @@ void i2c_init_board(void)
int power_init_board(void)
{
+#ifndef CONFIG_DM_I2C /* TODO(maintainer): Convert to driver model */
/*
* For PMIC the I2C bus is named as I2C5, but it is connected
* to logical I2C adapter 0
*/
return pmic_init(I2C_0);
+#else
+ return 0;
+#endif
}
int dram_init(void)
@@ -142,6 +146,7 @@ int board_mmc_init(bd_t *bis)
#ifdef CONFIG_USB_GADGET
static int s5pc1xx_phy_control(int on)
{
+#ifndef CONFIG_DM_I2C /* TODO(maintainer): Convert to driver model */
int ret;
static int status;
struct pmic *p = pmic_get("MAX8998_PMIC");
@@ -173,7 +178,7 @@ static int s5pc1xx_phy_control(int on)
status = 0;
}
udelay(10000);
-
+#endif
return 0;
}
diff --git a/include/configs/s5p_goni.h b/include/configs/s5p_goni.h
index 124cca3..6a5425a 100644
--- a/include/configs/s5p_goni.h
+++ b/include/configs/s5p_goni.h
@@ -229,25 +229,6 @@
#define CONFIG_SYS_INIT_SP_ADDR (CONFIG_SYS_LOAD_ADDR - 0x1000000)
-#define CONFIG_POWER
-#define CONFIG_POWER_I2C
-#define CONFIG_POWER_MAX8998
-
-#include <asm/arch/gpio.h>
-/*
- * I2C Settings
- */
-#define CONFIG_SOFT_I2C_GPIO_SCL S5PC110_GPIO_J43
-#define CONFIG_SOFT_I2C_GPIO_SDA S5PC110_GPIO_J40
-
-#define CONFIG_SYS_I2C
-#define CONFIG_SYS_I2C_SOFT /* I2C bit-banged */
-#define CONFIG_SYS_I2C_SOFT_SPEED 50000
-#define CONFIG_SYS_I2C_SOFT_SLAVE 0x7F
-#define CONFIG_I2C_MULTI_BUS
-#define CONFIG_SYS_I2C_INIT_BOARD
-
-#define CONFIG_SYS_MAX_I2C_BUS 7
#define CONFIG_USB_GADGET_DWC2_OTG_PHY
#define CONFIG_USB_FUNCTION_MASS_STORAGE