From d388298a59ba375c76597b8f95b560afa971a0fb Mon Sep 17 00:00:00 2001 From: Stefano Babic Date: Fri, 24 Jun 2011 03:04:38 +0000 Subject: ARM: versatile: fix board support MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Versatile board is used as example to run u-boot under qemu. The patch fixes relocation for all versatile boards and adds a versatileqemu target to be used under qemu. Patch tested only under qemu, not on real boards. Tested with QEMU emulator version 0.14.50. Signed-off-by: Stefano Babic CC: Alessandro Rubini CC: Loïc Minier --- board/armltd/versatile/config.mk | 5 ----- board/armltd/versatile/versatile.c | 10 +++++++++- 2 files changed, 9 insertions(+), 6 deletions(-) delete mode 100644 board/armltd/versatile/config.mk (limited to 'board/armltd') diff --git a/board/armltd/versatile/config.mk b/board/armltd/versatile/config.mk deleted file mode 100644 index 8b57af1..0000000 --- a/board/armltd/versatile/config.mk +++ /dev/null @@ -1,5 +0,0 @@ -# -# image should be loaded at 0x01000000 -# - -CONFIG_SYS_TEXT_BASE = 0x01000000 diff --git a/board/armltd/versatile/versatile.c b/board/armltd/versatile/versatile.c index 6e836dd..ee8cb5e 100644 --- a/board/armltd/versatile/versatile.c +++ b/board/armltd/versatile/versatile.c @@ -51,7 +51,7 @@ void show_boot_progress(int progress) * Miscellaneous platform dependent initialisations */ -int board_init (void) +int board_early_init_f (void) { /* * set clock frequency: @@ -62,6 +62,11 @@ int board_init (void) ((VERSATILE_TIMCLK << VERSATILE_TIMER1_EnSel) | (VERSATILE_TIMCLK << VERSATILE_TIMER2_EnSel) | (VERSATILE_TIMCLK << VERSATILE_TIMER3_EnSel) | (VERSATILE_TIMCLK << VERSATILE_TIMER4_EnSel)); + return 0; +} + +int board_init (void) +{ /* arch number of Versatile Board */ gd->bd->bi_arch_number = MACH_TYPE_VERSATILE_PB; @@ -88,6 +93,9 @@ int misc_init_r (void) ******************************/ int dram_init (void) { + /* dram_init must store complete ramsize in gd->ram_size */ + gd->ram_size = get_ram_size((volatile void *)CONFIG_SYS_SDRAM_BASE, + PHYS_SDRAM_1_SIZE); return 0; } -- cgit v1.1