mediatek/mt8183: Initialize DRAM with a sequence in constant array
The DRAM init sequence is simply setting some values on register for all DRAM modules, no logic involved; so we can replace it by an array to configure easily. BUG=b:80501386 BRANCH=none TEST=Boots correctly on Kukui, and inits DRAM successfully with related patches. Change-Id: Iacd3ce909ba7a0bdf699c5bfcb2b97f383d7bb6f Signed-off-by: Huayang Duan <huayang.duan@mediatek.com> Reviewed-on: https://review.coreboot.org/28836 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Hung-Te Lin <hungte@chromium.org>
This commit is contained in:
parent
48c24ce5ee
commit
e19d61b4e8
|
@ -21,6 +21,7 @@ verstage-$(CONFIG_DRIVERS_UART) += ../common/uart.c
|
|||
verstage-y += ../common/wdt.c
|
||||
|
||||
romstage-y += ../common/cbmem.c emi.c
|
||||
romstage-y += dramc_init_setting.c
|
||||
romstage-y += memory.c
|
||||
romstage-y += ../common/gpio.c gpio.c
|
||||
romstage-y += ../common/mmu_operations.c mmu_operations.c
|
||||
|
|
File diff suppressed because it is too large
Load Diff
|
@ -281,6 +281,7 @@ static void init_dram(const struct sdram_params *params)
|
|||
dramc_set_broadcast(DRAMC_BROADCAST_ON);
|
||||
dramc_init_pre_settings();
|
||||
|
||||
dramc_init();
|
||||
emi_init2(params);
|
||||
}
|
||||
|
||||
|
|
|
@ -132,4 +132,5 @@ enum {
|
|||
void dramc_get_rank_size(u64 *dram_rank_size);
|
||||
void dramc_set_broadcast(u32 onoff);
|
||||
u32 dramc_get_broadcast(void);
|
||||
void dramc_init(void);
|
||||
#endif /* _DRAMC_PI_API_MT8183_H */
|
||||
|
|
Loading…
Reference in New Issue