diff options
Diffstat (limited to 'drivers/i2c')
-rw-r--r-- | drivers/i2c/busses/Kconfig | 2 | ||||
-rw-r--r-- | drivers/i2c/busses/i2c-iop3xx.c | 16 |
2 files changed, 10 insertions, 8 deletions
diff --git a/drivers/i2c/busses/Kconfig b/drivers/i2c/busses/Kconfig index 884320e70403..a843d6b10a0c 100644 --- a/drivers/i2c/busses/Kconfig +++ b/drivers/i2c/busses/Kconfig | |||
@@ -196,7 +196,7 @@ config I2C_IBM_IIC | |||
196 | 196 | ||
197 | config I2C_IOP3XX | 197 | config I2C_IOP3XX |
198 | tristate "Intel IOP3xx and IXP4xx on-chip I2C interface" | 198 | tristate "Intel IOP3xx and IXP4xx on-chip I2C interface" |
199 | depends on (ARCH_IOP3XX || ARCH_IXP4XX) && I2C | 199 | depends on (ARCH_IOP32X || ARCH_IOP33X || ARCH_IXP4XX) && I2C |
200 | help | 200 | help |
201 | Say Y here if you want to use the IIC bus controller on | 201 | Say Y here if you want to use the IIC bus controller on |
202 | the Intel IOP3xx I/O Processors or IXP4xx Network Processors. | 202 | the Intel IOP3xx I/O Processors or IXP4xx Network Processors. |
diff --git a/drivers/i2c/busses/i2c-iop3xx.c b/drivers/i2c/busses/i2c-iop3xx.c index 48c56939c861..a2d0cc3a7785 100644 --- a/drivers/i2c/busses/i2c-iop3xx.c +++ b/drivers/i2c/busses/i2c-iop3xx.c | |||
@@ -82,14 +82,16 @@ iop3xx_i2c_enable(struct i2c_algo_iop3xx_data *iop3xx_adap) | |||
82 | 82 | ||
83 | /* | 83 | /* |
84 | * Every time unit enable is asserted, GPOD needs to be cleared | 84 | * Every time unit enable is asserted, GPOD needs to be cleared |
85 | * on IOP321 to avoid data corruption on the bus. | 85 | * on IOP3XX to avoid data corruption on the bus. |
86 | */ | 86 | */ |
87 | #ifdef CONFIG_ARCH_IOP321 | 87 | #ifdef CONFIG_PLAT_IOP |
88 | #define IOP321_GPOD_I2C0 0x00c0 /* clear these bits to enable ch0 */ | 88 | if (iop3xx_adap->id == 0) { |
89 | #define IOP321_GPOD_I2C1 0x0030 /* clear these bits to enable ch1 */ | 89 | gpio_line_set(IOP3XX_GPIO_LINE(7), GPIO_LOW); |
90 | 90 | gpio_line_set(IOP3XX_GPIO_LINE(6), GPIO_LOW); | |
91 | *IOP321_GPOD &= (iop3xx_adap->id == 0) ? ~IOP321_GPOD_I2C0 : | 91 | } else { |
92 | ~IOP321_GPOD_I2C1; | 92 | gpio_line_set(IOP3XX_GPIO_LINE(5), GPIO_LOW); |
93 | gpio_line_set(IOP3XX_GPIO_LINE(4), GPIO_LOW); | ||
94 | } | ||
93 | #endif | 95 | #endif |
94 | /* NB SR bits not same position as CR IE bits :-( */ | 96 | /* NB SR bits not same position as CR IE bits :-( */ |
95 | iop3xx_adap->SR_enabled = | 97 | iop3xx_adap->SR_enabled = |