mirror of
https://github.com/linux-sunxi/u-boot-sunxi.git
synced 2024-02-12 11:16:03 +08:00
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 <sjg@chromium.org>
This commit is contained in:
@ -113,7 +113,7 @@ int dram_init_f(void)
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
int dram_init(void)
|
int dram_init_banksize(void)
|
||||||
{
|
{
|
||||||
int i, j;
|
int i, j;
|
||||||
|
|
||||||
@ -132,3 +132,8 @@ int dram_init(void)
|
|||||||
}
|
}
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
int dram_init(void)
|
||||||
|
{
|
||||||
|
return dram_init_banksize();
|
||||||
|
}
|
||||||
|
@ -856,8 +856,7 @@ static init_fnc_t init_sequence_f[] = {
|
|||||||
#endif
|
#endif
|
||||||
#ifdef CONFIG_X86
|
#ifdef CONFIG_X86
|
||||||
dram_init_f, /* configure available RAM banks */
|
dram_init_f, /* configure available RAM banks */
|
||||||
/* x86 would prefer that this happens after relocation */
|
calculate_relocation_address,
|
||||||
dram_init,
|
|
||||||
#endif
|
#endif
|
||||||
announce_dram_init,
|
announce_dram_init,
|
||||||
/* TODO: unify all these dram functions? */
|
/* TODO: unify all these dram functions? */
|
||||||
|
Reference in New Issue
Block a user