summaryrefslogtreecommitdiff
path: root/drivers/i2c
diff options
context:
space:
mode:
authorTom Rini <trini@konsulko.com>2017-01-18 07:21:12 -0500
committerTom Rini <trini@konsulko.com>2017-01-18 07:21:12 -0500
commit2c45f8040ea1152d2ff0960f96905ca42ac089cd (patch)
treea673b269a864c106ce729213593c62cbe9c1299d /drivers/i2c
parentbfd07670a48d9fbf22646c93e07dcd8cbc8d0864 (diff)
parent3296eeff8ae064a788d52325fcd4ce1fdf52ee06 (diff)
downloadu-boot-2c45f8040ea1152d2ff0960f96905ca42ac089cd.tar.gz
u-boot-2c45f8040ea1152d2ff0960f96905ca42ac089cd.tar.bz2
u-boot-2c45f8040ea1152d2ff0960f96905ca42ac089cd.zip
Merge git://git.denx.de/u-boot-samsung
Diffstat (limited to 'drivers/i2c')
-rw-r--r--drivers/i2c/Kconfig5
-rw-r--r--drivers/i2c/s3c24x0_i2c.c8
2 files changed, 12 insertions, 1 deletions
diff --git a/drivers/i2c/Kconfig b/drivers/i2c/Kconfig
index 051f911e23..71cc173fc0 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"
diff --git a/drivers/i2c/s3c24x0_i2c.c b/drivers/i2c/s3c24x0_i2c.c
index 2ece9f4195..363cd04e4e 100644
--- a/drivers/i2c/s3c24x0_i2c.c
+++ b/drivers/i2c/s3c24x0_i2c.c
@@ -24,6 +24,12 @@
#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;
/*
@@ -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;
}