huayang duan has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/34433 )
Change subject: mediatek/mt8183: support get current DRAM type ......................................................................
Patch Set 3:
(1 comment)
Patch Set 2:
sorry, sdram_configs/*.c.
Different boards may have different mapping for RAM code, so we should look at config directly.
---> I moved this function into the src/mainboard/google/kukui/sdram_parms.c. For google kukui borads, different boards may mounted different RAM, so we should get correct DDR type by read RAM code.
https://review.coreboot.org/c/coreboot/+/34433/2/src/soc/mediatek/mt8183/emi... File src/soc/mediatek/mt8183/emi.c:
https://review.coreboot.org/c/coreboot/+/34433/2/src/soc/mediatek/mt8183/emi... PS2, Line 46: int get_dram_type(void) : { : uint32_t ramcode = ram_code(); : uint32_t dram_type; : : switch (ramcode) { : case 0: : case 1: : case 2: : dram_type = DRAM_TYPE_DISCRETE; : break; : case 3: : case 4: : case 5: : case 6: : case 7: : default: : dram_type = DRAM_TYPE_EMCP; : break; : } : : return dram_type; : }
this is a board-specific thing and we should not put that in soc folder. […]
I moved this function into the src/mainboard/google/kukui/sdram_parms.c Done