summaryrefslogtreecommitdiff
path: root/drivers/i2c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/i2c')
-rw-r--r--drivers/i2c/davinci_i2c.c2
-rw-r--r--drivers/i2c/fsl_i2c.c2
-rw-r--r--drivers/i2c/i2c_core.c12
-rw-r--r--drivers/i2c/kona_i2c.c2
-rw-r--r--drivers/i2c/mvtwsi.c6
-rw-r--r--drivers/i2c/mxc_i2c.c4
6 files changed, 14 insertions, 14 deletions
diff --git a/drivers/i2c/davinci_i2c.c b/drivers/i2c/davinci_i2c.c
index ae177227dea..25ef937dc0b 100644
--- a/drivers/i2c/davinci_i2c.c
+++ b/drivers/i2c/davinci_i2c.c
@@ -91,7 +91,7 @@ static uint _davinci_i2c_setspeed(struct i2c_regs *i2c_base,
psc = 2;
/* SCLL + SCLH */
- div = (CONFIG_SYS_HZ_CLOCK / ((psc + 1) * speed)) - 10;
+ div = (CFG_SYS_HZ_CLOCK / ((psc + 1) * speed)) - 10;
REG(&(i2c_base->i2c_psc)) = psc; /* 27MHz / (2 + 1) = 9MHz */
REG(&(i2c_base->i2c_scll)) = (div * 50) / 100; /* 50% Duty */
REG(&(i2c_base->i2c_sclh)) = div - REG(&(i2c_base->i2c_scll));
diff --git a/drivers/i2c/fsl_i2c.c b/drivers/i2c/fsl_i2c.c
index edbcd83b646..187db92b75f 100644
--- a/drivers/i2c/fsl_i2c.c
+++ b/drivers/i2c/fsl_i2c.c
@@ -41,7 +41,7 @@
DECLARE_GLOBAL_DATA_PTR;
#ifdef CONFIG_M68K
-#define CONFIG_SYS_IMMR CONFIG_SYS_MBAR
+#define CONFIG_SYS_IMMR CFG_SYS_MBAR
#endif
#if !CONFIG_IS_ENABLED(DM_I2C)
diff --git a/drivers/i2c/i2c_core.c b/drivers/i2c/i2c_core.c
index 09f91e674d4..7f65db23205 100644
--- a/drivers/i2c/i2c_core.c
+++ b/drivers/i2c/i2c_core.c
@@ -34,8 +34,8 @@ struct i2c_adapter *i2c_get_adapter(int index)
}
#if !defined(CONFIG_SYS_I2C_DIRECT_BUS)
-struct i2c_bus_hose i2c_bus[CONFIG_SYS_NUM_I2C_BUSES] =
- CONFIG_SYS_I2C_BUSES;
+struct i2c_bus_hose i2c_bus[CFG_SYS_NUM_I2C_BUSES] =
+ CFG_SYS_I2C_BUSES;
#endif
DECLARE_GLOBAL_DATA_PTR;
@@ -114,7 +114,7 @@ static int i2c_mux_set_all(void)
/* Connect requested bus if behind muxes */
if (i2c_bus_tmp->next_hop[0].chip != 0) {
/* Set all muxes along the path to that bus */
- for (i = 0; i < CONFIG_SYS_I2C_MAX_HOPS; i++) {
+ for (i = 0; i < CFG_SYS_I2C_MAX_HOPS; i++) {
int ret;
if (i2c_bus_tmp->next_hop[i].chip == 0)
@@ -143,7 +143,7 @@ static int i2c_mux_disconnect_all(void)
/* Disconnect current bus (turn off muxes if any) */
if ((i2c_bus_tmp->next_hop[0].chip != 0) &&
(I2C_ADAP->init_done != 0)) {
- i = CONFIG_SYS_I2C_MAX_HOPS;
+ i = CFG_SYS_I2C_MAX_HOPS;
do {
uint8_t chip;
int ret;
@@ -173,7 +173,7 @@ static int i2c_mux_disconnect_all(void)
*/
static void i2c_init_bus(unsigned int bus_no, int speed, int slaveaddr)
{
- if (bus_no >= CONFIG_SYS_NUM_I2C_BUSES)
+ if (bus_no >= CFG_SYS_NUM_I2C_BUSES)
return;
I2C_ADAP->init(I2C_ADAP, speed, slaveaddr);
@@ -238,7 +238,7 @@ int i2c_set_bus_num(unsigned int bus)
return 0;
#ifndef CONFIG_SYS_I2C_DIRECT_BUS
- if (bus >= CONFIG_SYS_NUM_I2C_BUSES)
+ if (bus >= CFG_SYS_NUM_I2C_BUSES)
return -1;
#endif
diff --git a/drivers/i2c/kona_i2c.c b/drivers/i2c/kona_i2c.c
index 4edcba29110..b9b0ff1c39e 100644
--- a/drivers/i2c/kona_i2c.c
+++ b/drivers/i2c/kona_i2c.c
@@ -129,7 +129,7 @@ struct bcm_kona_i2c_dev {
#define DEF_DEVICE(num) \
{(void *)CONFIG_SYS_I2C_BASE##num, DEF_SPD, &std_cfg_table[DEF_SPD_ENUM]}
-static struct bcm_kona_i2c_dev g_i2c_devs[CONFIG_SYS_MAX_I2C_BUS] = {
+static struct bcm_kona_i2c_dev g_i2c_devs[CFG_SYS_MAX_I2C_BUS] = {
#ifdef CONFIG_SYS_I2C_BASE0
DEF_DEVICE(0),
#endif
diff --git a/drivers/i2c/mvtwsi.c b/drivers/i2c/mvtwsi.c
index f48a4f25aae..a9c7d6e1bc2 100644
--- a/drivers/i2c/mvtwsi.c
+++ b/drivers/i2c/mvtwsi.c
@@ -42,7 +42,7 @@ DECLARE_GLOBAL_DATA_PTR;
#endif /* CONFIG_DM_I2C */
/*
- * On SUNXI, we get CONFIG_SYS_TCLK from this include, so we want to
+ * On SUNXI, we get CFG_SYS_TCLK from this include, so we want to
* always have it.
*/
#if CONFIG_IS_ENABLED(DM_I2C) && defined(CONFIG_ARCH_SUNXI)
@@ -427,9 +427,9 @@ static int twsi_stop(struct mvtwsi_registers *twsi, uint tick)
static uint twsi_calc_freq(const int n, const int m)
{
#ifdef CONFIG_ARCH_SUNXI
- return CONFIG_SYS_TCLK / (10 * (m + 1) * (1 << n));
+ return CFG_SYS_TCLK / (10 * (m + 1) * (1 << n));
#else
- return CONFIG_SYS_TCLK / (10 * (m + 1) * (2 << n));
+ return CFG_SYS_TCLK / (10 * (m + 1) * (2 << n));
#endif
}
diff --git a/drivers/i2c/mxc_i2c.c b/drivers/i2c/mxc_i2c.c
index f80ff5383bc..9a1599dcd91 100644
--- a/drivers/i2c/mxc_i2c.c
+++ b/drivers/i2c/mxc_i2c.c
@@ -39,8 +39,8 @@ DECLARE_GLOBAL_DATA_PTR;
#define VF610_I2C_REGSHIFT 0
#define I2C_EARLY_INIT_INDEX 0
-#ifdef CONFIG_SYS_I2C_IFDR_DIV
-#define I2C_IFDR_DIV_CONSERVATIVE CONFIG_SYS_I2C_IFDR_DIV
+#ifdef CFG_SYS_I2C_IFDR_DIV
+#define I2C_IFDR_DIV_CONSERVATIVE CFG_SYS_I2C_IFDR_DIV
#else
#define I2C_IFDR_DIV_CONSERVATIVE 0x7e
#endif