diff options
author | Haavard Skinnemoen <haavard.skinnemoen@atmel.com> | 2008-12-17 16:53:07 +0100 |
---|---|---|
committer | Haavard Skinnemoen <haavard.skinnemoen@atmel.com> | 2008-12-17 16:53:07 +0100 |
commit | cb5473205206c7f14cbb1e747f28ec75b48826e2 (patch) | |
tree | 8f4808d60917100b18a10b05230f7638a0a9bbcc /board/davinci/sffsdr/sffsdr.c | |
parent | baf449fc5ff96f071bb0e3789fd3265f6d4fd9a0 (diff) | |
parent | 92c78a3bbcb2ce508b4bf1c4a1e0940406a024bb (diff) | |
download | u-boot-imx-cb5473205206c7f14cbb1e747f28ec75b48826e2.zip u-boot-imx-cb5473205206c7f14cbb1e747f28ec75b48826e2.tar.gz u-boot-imx-cb5473205206c7f14cbb1e747f28ec75b48826e2.tar.bz2 |
Merge branch 'fixes' into cleanups
Conflicts:
board/atmel/atngw100/atngw100.c
board/atmel/atstk1000/atstk1000.c
cpu/at32ap/at32ap700x/gpio.c
include/asm-avr32/arch-at32ap700x/clk.h
include/configs/atngw100.h
include/configs/atstk1002.h
include/configs/atstk1003.h
include/configs/atstk1004.h
include/configs/atstk1006.h
include/configs/favr-32-ezkit.h
include/configs/hammerhead.h
include/configs/mimc200.h
Diffstat (limited to 'board/davinci/sffsdr/sffsdr.c')
-rw-r--r-- | board/davinci/sffsdr/sffsdr.c | 38 |
1 files changed, 17 insertions, 21 deletions
diff --git a/board/davinci/sffsdr/sffsdr.c b/board/davinci/sffsdr/sffsdr.c index f47ba0f..9296d7b 100644 --- a/board/davinci/sffsdr/sffsdr.c +++ b/board/davinci/sffsdr/sffsdr.c @@ -63,10 +63,10 @@ int board_init(void) lpsc_on(DAVINCI_LPSC_TIMER1); lpsc_on(DAVINCI_LPSC_GPIO); -#if !defined(CFG_USE_DSPLINK) +#if !defined(CONFIG_SYS_USE_DSPLINK) /* Powerup the DSP */ dsp_on(); -#endif /* CFG_USE_DSPLINK */ +#endif /* CONFIG_SYS_USE_DSPLINK */ /* Bringup UART0 out of reset */ REG(UART0_PWREMU_MGMT) = 0x0000e003; @@ -99,35 +99,35 @@ static int sffsdr_read_mac_address(uint8_t *buf) u_int32_t value, mac[2], address; /* Read Integrity data structure checkword. */ - if (i2c_read(CFG_I2C_EEPROM_ADDR, INTEGRITY_CHECKWORD_OFFSET, - CFG_I2C_EEPROM_ADDR_LEN, (uint8_t *) &value, 4)) + if (i2c_read(CONFIG_SYS_I2C_EEPROM_ADDR, INTEGRITY_CHECKWORD_OFFSET, + CONFIG_SYS_I2C_EEPROM_ADDR_LEN, (uint8_t *) &value, 4)) goto err; if (value != INTEGRITY_CHECKWORD_VALUE) return 0; /* Read SYSCFG structure offset. */ - if (i2c_read(CFG_I2C_EEPROM_ADDR, INTEGRITY_SYSCFG_OFFSET, - CFG_I2C_EEPROM_ADDR_LEN, (uint8_t *) &value, 4)) + if (i2c_read(CONFIG_SYS_I2C_EEPROM_ADDR, INTEGRITY_SYSCFG_OFFSET, + CONFIG_SYS_I2C_EEPROM_ADDR_LEN, (uint8_t *) &value, 4)) goto err; address = 0x800 + (int) value; /* Address of SYSCFG structure. */ /* Read NET CONFIG structure offset. */ - if (i2c_read(CFG_I2C_EEPROM_ADDR, address, - CFG_I2C_EEPROM_ADDR_LEN, (uint8_t *) &value, 4)) + if (i2c_read(CONFIG_SYS_I2C_EEPROM_ADDR, address, + CONFIG_SYS_I2C_EEPROM_ADDR_LEN, (uint8_t *) &value, 4)) goto err; address = 0x800 + (int) value; /* Address of NET CONFIG structure. */ address += 12; /* Address of NET INTERFACE CONFIG structure. */ /* Read NET INTERFACE CONFIG 2 structure offset. */ - if (i2c_read(CFG_I2C_EEPROM_ADDR, address, - CFG_I2C_EEPROM_ADDR_LEN, (uint8_t *) &value, 4)) + if (i2c_read(CONFIG_SYS_I2C_EEPROM_ADDR, address, + CONFIG_SYS_I2C_EEPROM_ADDR_LEN, (uint8_t *) &value, 4)) goto err; address = 0x800 + 16 + (int) value; /* Address of NET INTERFACE * CONFIG 2 structure. */ /* Read MAC address. */ - if (i2c_read(CFG_I2C_EEPROM_ADDR, address, - CFG_I2C_EEPROM_ADDR_LEN, (uint8_t *) &mac[0], 8)) + if (i2c_read(CONFIG_SYS_I2C_EEPROM_ADDR, address, + CONFIG_SYS_I2C_EEPROM_ADDR_LEN, (uint8_t *) &mac[0], 8)) goto err; buf[0] = mac[0] >> 24; @@ -140,7 +140,7 @@ static int sffsdr_read_mac_address(uint8_t *buf) return 1; /* Found */ err: - printf("Read from EEPROM @ 0x%02x failed\n", CFG_I2C_EEPROM_ADDR); + printf("Read from EEPROM @ 0x%02x failed\n", CONFIG_SYS_I2C_EEPROM_ADDR); return 0; } @@ -156,10 +156,10 @@ int misc_init_r(void) dv_display_clk_infos(); /* Configure I2C switch (PCA9543) to enable channel 0. */ - i2cbuf = CFG_I2C_PCA9543_ENABLE_CH0; - if (i2c_write(CFG_I2C_PCA9543_ADDR, 0, - CFG_I2C_PCA9543_ADDR_LEN, &i2cbuf, 1)) { - printf("Write to MUX @ 0x%02x failed\n", CFG_I2C_PCA9543_ADDR); + i2cbuf = CONFIG_SYS_I2C_PCA9543_ENABLE_CH0; + if (i2c_write(CONFIG_SYS_I2C_PCA9543_ADDR, 0, + CONFIG_SYS_I2C_PCA9543_ADDR_LEN, &i2cbuf, 1)) { + printf("Write to MUX @ 0x%02x failed\n", CONFIG_SYS_I2C_PCA9543_ADDR); return 1; } @@ -170,9 +170,5 @@ int misc_init_r(void) if (!eth_hw_init()) printf("Ethernet init failed\n"); - /* On this platform, U-Boot is copied in RAM by the UBL, - * so we are always in the relocated state. */ - gd->flags |= GD_FLG_RELOC; - return(0); } |