diff options
author | Valentin Longchamp <valentin.longchamp@keymile.com> | 2011-09-12 04:18:42 +0000 |
---|---|---|
committer | Wolfgang Denk <wd@denx.de> | 2011-10-05 22:03:11 +0200 |
commit | 9400f8fa7c064fd1e1c7ae714920f6067eec3ca4 (patch) | |
tree | 7c4f8239d8f60ebd7275315f80cc8cc7e7714966 /board/keymile/km_arm | |
parent | e5847b7730844f35aefab778d1c36fdc327f03e5 (diff) | |
download | u-boot-imx-9400f8fa7c064fd1e1c7ae714920f6067eec3ca4.zip u-boot-imx-9400f8fa7c064fd1e1c7ae714920f6067eec3ca4.tar.gz u-boot-imx-9400f8fa7c064fd1e1c7ae714920f6067eec3ca4.tar.bz2 |
km_arm: enable POST for these boards
The current km_arm boards have a Power-On test jumper. When this
jumper is set, this triggers some Power-On tests on the board.
This patch enables the support of this jumper for starting the
memory_regions test when the jumper is set.
Signed-off-by: Valentin Longchamp <valentin.longchamp@keymile.com>
Signed-off-by: Holger Brunck <holger.brunck@keymile.com>
Cc: Prafulla Wadaskar <prafulla@marvell.com>
Diffstat (limited to 'board/keymile/km_arm')
-rw-r--r-- | board/keymile/km_arm/km_arm.c | 33 |
1 files changed, 33 insertions, 0 deletions
diff --git a/board/keymile/km_arm/km_arm.c b/board/keymile/km_arm/km_arm.c index a8f2b23..67f158c 100644 --- a/board/keymile/km_arm/km_arm.c +++ b/board/keymile/km_arm/km_arm.c @@ -448,6 +448,39 @@ int get_scl(void) } #endif +#if defined(CONFIG_POST) + +#define KM_POST_EN_L 44 +#define POST_WORD_OFF 8 + +int post_hotkeys_pressed(void) +{ + return !kw_gpio_get_value(KM_POST_EN_L); +} + +ulong post_word_load(void) +{ + volatile void* addr = (void *) (gd->ram_size - BOOTCOUNT_ADDR + POST_WORD_OFF); + return in_le32(addr); + +} +void post_word_store(ulong value) +{ + volatile void* addr = (void *) (gd->ram_size - BOOTCOUNT_ADDR + POST_WORD_OFF); + out_le32(addr, value); +} + +int arch_memory_test_prepare(u32 *vstart, u32 *size, phys_addr_t *phys_offset) +{ + *vstart = CONFIG_SYS_SDRAM_BASE; + + /* we go up to relocation plus a 1 MB margin */ + *size = CONFIG_SYS_TEXT_BASE - (1<<20); + + return 0; +} +#endif + #if defined(CONFIG_SYS_EEPROM_WREN) int eeprom_write_enable(unsigned dev_addr, int state) { |