mirror of
https://github.com/fail0verflow/switch-coreboot.git
synced 2025-05-04 01:39:18 -04:00
artecgroup/dbe61: Gather RAM initialization function calls to one helper function.
Then we can later use it for re-initializing for different SPD without code duplication. Signed-off-by: Mart Raudsepp <mart.raudsepp@artecdesign.ee> Acked-by: Peter Stuge <peter@stuge.se> git-svn-id: svn://coreboot.org/repository/coreboot-v3@1016 f3766cd6-281f-0410-b1cd-43a5c92072e9
This commit is contained in:
parent
72f38d1a3d
commit
7e53fa9101
1 changed files with 16 additions and 11 deletions
|
@ -135,6 +135,21 @@ static void mb_gpio_init(void)
|
|||
/* Early mainboard specific GPIO setup */
|
||||
}
|
||||
|
||||
static void initialize_ram(u8 dimm0, u8 dimm1)
|
||||
{
|
||||
cpu_reg_init(0, dimm0, dimm1, DRAM_UNTERMINATED);
|
||||
printk(BIOS_DEBUG, "done cpu reg init\n");
|
||||
|
||||
sdram_set_registers();
|
||||
printk(BIOS_DEBUG, "done sdram set registers\n");
|
||||
|
||||
sdram_set_spd_registers(dimm0, dimm1);
|
||||
printk(BIOS_DEBUG, "done sdram set spd registers\n");
|
||||
|
||||
sdram_enable(dimm0, dimm1);
|
||||
printk(BIOS_DEBUG, "done sdram enable\n");
|
||||
}
|
||||
|
||||
/**
|
||||
* main for initram for the PC Engines Alix 1C. It might seem that you
|
||||
* could somehow do these functions in, e.g., the cpu code, but the
|
||||
|
@ -155,17 +170,7 @@ int main(void)
|
|||
pll_reset(MANUALCONF, PLLMSRHI, PLLMSRLO);
|
||||
printk(BIOS_DEBUG, "done pll reset\n");
|
||||
|
||||
cpu_reg_init(0, DIMM_DBE61C, DIMM_EMPTY, DRAM_UNTERMINATED);
|
||||
printk(BIOS_DEBUG, "done cpu reg init\n");
|
||||
|
||||
sdram_set_registers();
|
||||
printk(BIOS_DEBUG, "done sdram set registers\n");
|
||||
|
||||
sdram_set_spd_registers(DIMM_DBE61C, DIMM_EMPTY);
|
||||
printk(BIOS_DEBUG, "done sdram set spd registers\n");
|
||||
|
||||
sdram_enable(DIMM_DBE61C, DIMM_EMPTY);
|
||||
printk(BIOS_DEBUG, "done sdram enable\n");
|
||||
initialize_ram(DIMM_DBE61C, DIMM_EMPTY);
|
||||
|
||||
/* Check low memory */
|
||||
/*ram_check(0x00000000, 640*1024); */
|
||||
|
|
Loading…
Add table
Reference in a new issue