From: Stefan Roese Date: Mon, 8 Jun 2009 07:38:07 +0000 (+0200) Subject: mpc512x: Fix problem with I2C access before relocation X-Git-Url: http://git.dujemihanovic.xyz/?a=commitdiff_plain;h=c60dc8527dbb2a1318c03bc18bdebcfbd0164551;p=u-boot.git mpc512x: Fix problem with I2C access before relocation This is needed for the upcoming esd MECP5123 board port which uses I2C EEPROM for environment storage. Signed-off-by: Stefan Roese Cc: Reinhard Arlt Acked-by: Heiko Schocher --- diff --git a/cpu/mpc512x/i2c.c b/cpu/mpc512x/i2c.c index 97bda0d84e..e2d909751e 100644 --- a/cpu/mpc512x/i2c.c +++ b/cpu/mpc512x/i2c.c @@ -33,7 +33,7 @@ DECLARE_GLOBAL_DATA_PTR; #include /* by default set I2C bus 0 active */ -static unsigned int bus_num = 0; +static unsigned int bus_num __attribute__ ((section (".data"))) = 0; #define I2C_TIMEOUT 100 #define I2C_RETRIES 3