From a298712e948e473d9e61a3c75835becd0d3a2bf6 Mon Sep 17 00:00:00 2001 From: Jaehoon Chung Date: Mon, 9 Jan 2017 14:47:51 +0900 Subject: i2c: s3c24x0: fix the compiler error for exynos4 If CONFIG_SYS_I2C_S3C24X0_SLAVE isn't defined, then complie error should be occurred. This patch is for preventing it. Signed-off-by: Jaehoon Chung Signed-off-by: Minkyu Kang --- drivers/i2c/s3c24x0_i2c.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'drivers') diff --git a/drivers/i2c/s3c24x0_i2c.c b/drivers/i2c/s3c24x0_i2c.c index 2ece9f41959..363cd04e4e2 100644 --- a/drivers/i2c/s3c24x0_i2c.c +++ b/drivers/i2c/s3c24x0_i2c.c @@ -24,6 +24,12 @@ #include #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; /* @@ -87,7 +93,7 @@ static int s3c24x0_i2c_set_bus_speed(struct udevice *dev, unsigned int speed) i2c_bus->clock_frequency = speed; i2c_ch_init(i2c_bus->regs, i2c_bus->clock_frequency, - CONFIG_SYS_I2C_S3C24X0_SLAVE); + SYS_I2C_S3C24X0_SLAVE_ADDR); return 0; } -- cgit v1.2.3 From 1d61ad959e3783ff01177c752818975e8f3de104 Mon Sep 17 00:00:00 2001 From: Jaehoon Chung Date: Mon, 9 Jan 2017 14:47:52 +0900 Subject: i2c: Kconfig: Add SYS_I2C_S3C24X0 entry Adding Kconfig for SYS_I2C_S3C24X0. Signed-off-by: Jaehoon Chung Signed-off-by: Minkyu Kang --- drivers/i2c/Kconfig | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'drivers') diff --git a/drivers/i2c/Kconfig b/drivers/i2c/Kconfig index 051f911e23b..71cc173fc0f 100644 --- a/drivers/i2c/Kconfig +++ b/drivers/i2c/Kconfig @@ -155,6 +155,11 @@ config SYS_I2C_SANDBOX }; }; +config SYS_I2C_S3C24X0 + bool "Samsung I2C driver" + depends on ARCH_EXYNOS4 && DM_I2C + help + Support for Samsung I2C controller as Samsung SoCs. config SYS_I2C_UNIPHIER bool "UniPhier I2C driver" -- cgit v1.2.3