diff options
Diffstat (limited to 'drivers/i2c')
-rw-r--r-- | drivers/i2c/omap24xx_i2c.c | 4 | ||||
-rw-r--r-- | drivers/i2c/ppc4xx_i2c.c | 4 |
2 files changed, 5 insertions, 3 deletions
diff --git a/drivers/i2c/omap24xx_i2c.c b/drivers/i2c/omap24xx_i2c.c index a7c4e69..3febd1f 100644 --- a/drivers/i2c/omap24xx_i2c.c +++ b/drivers/i2c/omap24xx_i2c.c @@ -40,6 +40,7 @@ static unsigned int current_bus; void i2c_init (int speed, int slaveadd) { + DECLARE_GLOBAL_DATA_PTR; int psc, fsscll, fssclh; int hsscll = 0, hssclh = 0; u32 scll, sclh; @@ -139,7 +140,8 @@ void i2c_init (int speed, int slaveadd) writew (0xFFFF, &i2c_base->stat); writew (0, &i2c_base->cnt); - bus_initialized[current_bus] = 1; + if (gd->flags & GD_FLG_RELOC) + bus_initialized[current_bus] = 1; } static int i2c_read_byte (u8 devaddr, u8 regoffset, u8 * value) diff --git a/drivers/i2c/ppc4xx_i2c.c b/drivers/i2c/ppc4xx_i2c.c index e9548f1..c1cbe55 100644 --- a/drivers/i2c/ppc4xx_i2c.c +++ b/drivers/i2c/ppc4xx_i2c.c @@ -27,8 +27,8 @@ */ #include <common.h> -#include <ppc4xx.h> -#include <4xx_i2c.h> +#include <asm/ppc4xx.h> +#include <asm/ppc4xx-i2c.h> #include <i2c.h> #include <asm/io.h> |