Fix: nommu I2C adapter relocation error
PATCH 1/1 Fix: nommu I2C adapter relocation error
From: "Jens Scharsig (BuS Elektronik)" <[email protected]>
NoMMU systems have a access violation problem with i2c_reloc_fixup. Blame for it is a double relocation of the adapter itself. The i2c_adap_p is already relocated, if i2c_reloc_fixup is called. This patch removes the relocation of i2c_adap_p from i2c_reloc_fixup to fix this.
--- drivers/i2c/i2c_core.c | 4 ---- 1 file changed, 4 deletions(-)
drivers/i2c/i2c_core.c +0 -4
@@ -53,10 +53,6 @@ void i2c_reloc_fixup(void)return ;for (i =0 ; i < max; i++) { -/* adapter itself */ - addr = (unsigned long )i2c_adap_p; - addr += gd->reloc_off; - i2c_adap_p = (struct i2c_adapter *)addr;/* i2c_init() */ addr = (unsigned long )i2c_adap_p->init; addr += gd->reloc_off;
Signature · 1 line
1.8.1.4
PATCH 1/1 Fix: nommu I2C adapter relocation error
Hello Jens,
Am 14.10.2013 10:27, schrieb Jens Scharsig (BuS Elektronik):
Quoted 8 lines
From: "Jens Scharsig (BuS Elektronik)"<[email protected]>
NoMMU systems have a access violation problem with
i2c_reloc_fixup. Blame for it is a double relocation of the adapter itself. Thei2c_adap_pis already relocated, ifi2c_reloc_fixupis called. This patch removes the relocation ofi2c_adap_pfromi2c_reloc_fixupto fix this.
Quoted 4 lines
Signed-off-by Jens Scharsig (BuS Elektronik)<[email protected]>--- drivers/i2c/i2c_core.c | 4 ---- 1 file changed, 4 deletions(-)
Applied to u-boot-i2c.git
Thanks!
bye,
Heiko
Signature · 2 lines
DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany