[U-Boot] [RFC] i2c_reloc_fixup fails on m68k

Jens Scharsig esw at bus-elektronik.de
Mon Sep 23 15:50:50 CEST 2013


Hello,

I have a access violation problem with i2c_reloc_fixup on coldfire
m68k systems.

I found out, the i2c_reloc_fixup tries to relocate the adapter itself,
but at this time i2c_adap_p is already relocated.

Can anybody confirm this?

I think also m68k, backfin and nds32 systems are affected


regards

Jens

---
diff --git a/drivers/i2c/i2c_core.c b/drivers/i2c/i2c_core.c
index d1072e8..bb5d4db 100644
--- a/drivers/i2c/i2c_core.c
+++ b/drivers/i2c/i2c_core.c
@@ -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;


More information about the U-Boot mailing list