summaryrefslogtreecommitdiff
path: root/drivers/i2c
diff options
context:
space:
mode:
authorTom Rini <trini@konsulko.com>2022-11-10 10:09:02 -0500
committerTom Rini <trini@konsulko.com>2022-11-10 10:09:40 -0500
commit0cbeed4f6648e0e4966475e3544280a69ecb59d3 (patch)
treea7b4b6b44bc3d43628e654f0c75ef2fab49ffd1b /drivers/i2c
parent77b5cc2948f5d93fe3d275302f596ffd8701a875 (diff)
parentcc1159bbfa94a60e4180846e480b887cf91fa722 (diff)
Merge branch '2022-11-10-symbol-migrations'
- Migrate a number of CONFIG symbols to Kconfig and start migrating some symbol families from CONFIG to the CFG namespace.
Diffstat (limited to 'drivers/i2c')
-rw-r--r--drivers/i2c/fsl_i2c.c7
-rw-r--r--drivers/i2c/mv_i2c.c24
2 files changed, 0 insertions, 31 deletions
diff --git a/drivers/i2c/fsl_i2c.c b/drivers/i2c/fsl_i2c.c
index 9a3c8241bc6..edbcd83b646 100644
--- a/drivers/i2c/fsl_i2c.c
+++ b/drivers/i2c/fsl_i2c.c
@@ -271,13 +271,6 @@ static void __i2c_init(const struct fsl_i2c_base *base, int speed, int
const unsigned long long timeout = usec2ticks(CONFIG_I2C_MBB_TIMEOUT);
unsigned long long timeval;
-#ifdef CONFIG_SYS_I2C_INIT_BOARD
- /* Call board specific i2c bus reset routine before accessing the
- * environment, which might be in a chip on that bus. For details
- * about this problem see doc/I2C_Edge_Conditions.
- */
- i2c_init_board();
-#endif
writeb(0, &base->cr); /* stop I2C controller */
udelay(5); /* let it shutdown in peace */
set_i2c_bus_speed(base, i2c_clk, speed);
diff --git a/drivers/i2c/mv_i2c.c b/drivers/i2c/mv_i2c.c
index 0eff3531618..8ee17f0a450 100644
--- a/drivers/i2c/mv_i2c.c
+++ b/drivers/i2c/mv_i2c.c
@@ -374,27 +374,6 @@ static int __i2c_write(struct mv_i2c *base, uchar chip, u8 *addr, int alen,
static struct mv_i2c *base_glob;
-static void i2c_board_init(struct mv_i2c *base)
-{
-#ifdef CONFIG_SYS_I2C_INIT_BOARD
- u32 icr;
- /*
- * call board specific i2c bus reset routine before accessing the
- * environment, which might be in a chip on that bus. For details
- * about this problem see doc/I2C_Edge_Conditions.
- *
- * disable I2C controller first, otherwhise it thinks we want to
- * talk to the slave port...
- */
- icr = readl(&base->icr);
- writel(readl(&base->icr) & ~(ICR_SCLE | ICR_IUE), &base->icr);
-
- i2c_init_board();
-
- writel(icr, &base->icr);
-#endif
-}
-
#ifdef CONFIG_I2C_MULTI_BUS
static unsigned long i2c_regs[CONFIG_MV_I2C_NUM] = CONFIG_MV_I2C_REG;
static unsigned int bus_initialized[CONFIG_MV_I2C_NUM];
@@ -411,7 +390,6 @@ int i2c_set_bus_num(unsigned int bus)
current_bus = bus;
if (!bus_initialized[current_bus]) {
- i2c_board_init(base_glob);
bus_initialized[current_bus] = 1;
}
@@ -441,8 +419,6 @@ void i2c_init(int speed, int slaveaddr)
else
val = ICR_SM;
clrsetbits_le32(&base_glob->icr, ICR_MODE_MASK, val);
-
- i2c_board_init(base_glob);
}
static int __i2c_probe_chip(struct mv_i2c *base, uchar chip)