From 8b42dfc3b6a2c9204be2fb1079d235daa1b733fc Mon Sep 17 00:00:00 2001 From: Simon Glass Date: Mon, 15 Apr 2013 11:22:49 +0000 Subject: x86: Fix DRAM bank size init with generic board The intention of the memory init code is that it should work the same with CONFIG_SYS_GENERIC_BOARD and without. This is tricky because dram_init() is called prior to relocation with generic board (matching other archs) and after relocation without generic board. Adjust the init sequence so that dram_init() is not called in the generic board case, which seems like the easiest fix for now. Also ensure that relocation addresses are still calculated. Signed-off-by: Simon Glass --- common/board_f.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'common/board_f.c') diff --git a/common/board_f.c b/common/board_f.c index 769889123b4..32d52150977 100644 --- a/common/board_f.c +++ b/common/board_f.c @@ -856,8 +856,7 @@ static init_fnc_t init_sequence_f[] = { #endif #ifdef CONFIG_X86 dram_init_f, /* configure available RAM banks */ - /* x86 would prefer that this happens after relocation */ - dram_init, + calculate_relocation_address, #endif announce_dram_init, /* TODO: unify all these dram functions? */ -- cgit v1.2.3 From 7525c2dac76bd739b8a1673e020031dc4a4934c4 Mon Sep 17 00:00:00 2001 From: Simon Glass Date: Mon, 15 Apr 2013 11:25:20 +0000 Subject: x86: Allow setup code to manage its own global data Currently x86 has its own means of managing the global data and board data (bd_t), and this code resides in start.S. With generic board, we need to ensure that we leave this alone - i.e. don't clear it as we do on other archs. This fixes a problem where the memory init data is cleared which causes the video driver to operate very slowly. Signed-off-by: Simon Glass --- common/board_f.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'common/board_f.c') diff --git a/common/board_f.c b/common/board_f.c index 32d52150977..00ca81126c7 100644 --- a/common/board_f.c +++ b/common/board_f.c @@ -755,7 +755,7 @@ static int mark_bootstage(void) static init_fnc_t init_sequence_f[] = { #if !defined(CONFIG_CPM2) && !defined(CONFIG_MPC512X) && \ !defined(CONFIG_MPC83xx) && !defined(CONFIG_MPC85xx) && \ - !defined(CONFIG_MPC86xx) + !defined(CONFIG_MPC86xx) && !defined(CONFIG_X86) zero_global_data, #endif setup_fdt, -- cgit v1.2.3