diff options
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/i2c/mxc_i2c.c | 22 |
1 files changed, 11 insertions, 11 deletions
diff --git a/drivers/i2c/mxc_i2c.c b/drivers/i2c/mxc_i2c.c index 021b2fe..fc5ee35 100644 --- a/drivers/i2c/mxc_i2c.c +++ b/drivers/i2c/mxc_i2c.c @@ -402,17 +402,6 @@ int bus_i2c_write(void *base, uchar chip, uint addr, int alen, return ret; } -struct i2c_parms { - void *base; - void *idle_bus_data; - int (*idle_bus_fn)(void *p); -}; - -struct sram_data { - unsigned curr_i2c_bus; - struct i2c_parms i2c_data[3]; -}; - static void * const i2c_bases[] = { #if defined(CONFIG_MX25) (void *)IMX_I2C_BASE, @@ -439,6 +428,17 @@ static void * const i2c_bases[] = { #endif }; +struct i2c_parms { + void *base; + void *idle_bus_data; + int (*idle_bus_fn)(void *p); +}; + +struct sram_data { + unsigned curr_i2c_bus; + struct i2c_parms i2c_data[ARRAY_SIZE(i2c_bases)]; +}; + void *i2c_get_base(struct i2c_adapter *adap) { return i2c_bases[adap->hwadapnr]; |