diff options
author | Heiko Schocher <hs@denx.de> | 2011-03-08 10:53:51 +0100 |
---|---|---|
committer | Wolfgang Denk <wd@denx.de> | 2011-04-30 00:45:15 +0200 |
commit | 731b968044b0f96239dd41b8c7ba642cac81cfc5 (patch) | |
tree | 30259417bf34f228b13a7de44773308c8cd707f8 /board | |
parent | 6c11aeafeff8e0aa0b381baf5bcb1807de77e42e (diff) | |
download | u-boot-imx-731b968044b0f96239dd41b8c7ba642cac81cfc5.zip u-boot-imx-731b968044b0f96239dd41b8c7ba642cac81cfc5.tar.gz u-boot-imx-731b968044b0f96239dd41b8c7ba642cac81cfc5.tar.bz2 |
arm, keymile: updates for the arm based boards from keymile
define KM_IVM_BUS and KM_ENV_BUS macros
KM_IVM_BUS is used to define the EEprom_ivm environment variable.
These macros allow the reuse of these I2C addresses in other code
locations.
remove unneeded code
On first HW versions the BOCO FPGA was behind a MUX device. These
HW versions are not supported anymore. And therefore this code can
be removed.
added LED initialization for SUEN3
The bootstat LED required to be initialized so to have a green
colour after start-up.
define CONFIG_SYS_TEXT_BASE
This is needed by the relocation code and is not the same for
our ARM BEC and thus needs to be defined.
remove memsize variable
An environment variable for memsize is not needed.
this can be get via the board info struct.
remove unneeded double access to bi_dram[i].size field
Signed-off-by: Valentin Longchamp <valentin.longchamp@keymile.com>
Signed-off-by: Holger Brunck <holger.brunck@keymile.com>
Signed-off-by: Luca Haab <luca.haab@keymile.com>
Signed-off-by: Heiko Schocher <hs@denx.de>
cc: Prafulla Wadaskar <prafulla@marvell.com>
Diffstat (limited to 'board')
-rw-r--r-- | board/keymile/km_arm/km_arm.c | 32 |
1 files changed, 31 insertions, 1 deletions
diff --git a/board/keymile/km_arm/km_arm.c b/board/keymile/km_arm/km_arm.c index 0f1a6d1..cb999b2 100644 --- a/board/keymile/km_arm/km_arm.c +++ b/board/keymile/km_arm/km_arm.c @@ -117,6 +117,34 @@ int ethernet_present(void) return ret; } +int initialize_unit_leds(void) +{ + /* + * init the unit LEDs + * per default they all are + * ok apart from bootstat + * LED connected through BOCO + * BOCO lies at the address 0x10 + * LEDs are in the block CTRL_H (addr 0x02) + * BOOTSTAT LED is the first 0x01 + */ + #define BOCO 0x10 + #define CTRL_H 0x02 + #define APPLEDMASK 0x01 + uchar buf; + + if (i2c_read(BOCO, CTRL_H, 1, &buf, 1) != 0) { + printf("%s: Error reading Boco\n", __func__); + return -1; + } + buf |= APPLEDMASK; + if (i2c_write(BOCO, CTRL_H, 1, &buf, 1) != 0) { + printf("%s: Error writing Boco\n", __func__); + return -1; + } + return 0; +} + int misc_init_r(void) { char *str; @@ -133,6 +161,9 @@ int misc_init_r(void) printf("Overwriting MACH_TYPE with %d!!!\n", mach_type); gd->bd->bi_arch_number = mach_type; } + + initialize_unit_leds(); + return 0; } @@ -239,7 +270,6 @@ void dram_init_banksize(void) for (i = 0; i < CONFIG_NR_DRAM_BANKS; i++) { gd->bd->bi_dram[i].start = kw_sdram_bar(i); - gd->bd->bi_dram[i].size = kw_sdram_bs(i); gd->bd->bi_dram[i].size = get_ram_size((long *)kw_sdram_bar(i), kw_sdram_bs(i)); } |