omap4 i2c: add support for i2c bus 4
Signed-off-by: Koen Kooi <koen@dominion.thruhere.net>
This commit is contained in:
parent
a6f0c4faa4
commit
a532278074
|
@ -138,6 +138,7 @@ struct watchdog {
|
||||||
#define I2C_BASE1 (OMAP44XX_L4_PER_BASE + 0x70000)
|
#define I2C_BASE1 (OMAP44XX_L4_PER_BASE + 0x70000)
|
||||||
#define I2C_BASE2 (OMAP44XX_L4_PER_BASE + 0x72000)
|
#define I2C_BASE2 (OMAP44XX_L4_PER_BASE + 0x72000)
|
||||||
#define I2C_BASE3 (OMAP44XX_L4_PER_BASE + 0x60000)
|
#define I2C_BASE3 (OMAP44XX_L4_PER_BASE + 0x60000)
|
||||||
|
#define I2C_BASE4 (OMAP44XX_L4_PER_BASE + 0x350000)
|
||||||
|
|
||||||
/* MUSB base */
|
/* MUSB base */
|
||||||
#define MUSB_BASE (OMAP44XX_L4_CORE_BASE + 0xAB000)
|
#define MUSB_BASE (OMAP44XX_L4_CORE_BASE + 0xAB000)
|
||||||
|
|
|
@ -23,7 +23,7 @@
|
||||||
#ifndef _OMAP4_I2C_H_
|
#ifndef _OMAP4_I2C_H_
|
||||||
#define _OMAP4_I2C_H_
|
#define _OMAP4_I2C_H_
|
||||||
|
|
||||||
#define I2C_BUS_MAX 3
|
#define I2C_BUS_MAX 4
|
||||||
#define I2C_DEFAULT_BASE I2C_BASE1
|
#define I2C_DEFAULT_BASE I2C_BASE1
|
||||||
|
|
||||||
struct i2c {
|
struct i2c {
|
||||||
|
|
|
@ -442,6 +442,14 @@ int i2c_set_bus_num(unsigned int bus)
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#if I2C_BUS_MAX == 4
|
||||||
|
if (bus == 3)
|
||||||
|
i2c_base = (struct i2c *)I2C_BASE4;
|
||||||
|
else
|
||||||
|
if (bus == 2)
|
||||||
|
i2c_base = (struct i2c *)I2C_BASE3;
|
||||||
|
else
|
||||||
|
#endif
|
||||||
#if I2C_BUS_MAX == 3
|
#if I2C_BUS_MAX == 3
|
||||||
if (bus == 2)
|
if (bus == 2)
|
||||||
i2c_base = (struct i2c *)I2C_BASE3;
|
i2c_base = (struct i2c *)I2C_BASE3;
|
||||||
|
|
Loading…
Reference in New Issue