projects
/
project
/
bcm63xx
/
u-boot.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
23090da
)
i2c, omap24xx: set bus_initialized only after relocation.
author
Heiko Schocher
<hs@denx.de>
Fri, 17 Sep 2010 11:10:37 +0000
(13:10 +0200)
committer
Wolfgang Denk
<wd@denx.de>
Sun, 19 Sep 2010 17:29:52 +0000
(19:29 +0200)
Portions of this work were supported by funding from
the CE Linux Forum.
Signed-off-by: Heiko Schocher <hs@denx.de>
drivers/i2c/omap24xx_i2c.c
patch
|
blob
|
history
diff --git
a/drivers/i2c/omap24xx_i2c.c
b/drivers/i2c/omap24xx_i2c.c
index a7c4e69a646356581bfc40c436fc915dce7eb3d7..3febd1ff633f8558d19b483f5bb361d47558e8a8 100644
(file)
--- 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)