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:
Huayang Duan 2018-09-26 14:51:51 +08:00 committed by Patrick Georgi
parent 48c24ce5ee
commit e19d61b4e8
4 changed files with 1017 additions and 0 deletions

View File

@ -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

View File

@ -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);
}

View File

@ -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 */