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 12:
Patch Set 11:
since discrete or not is actually a MB layout thing (you can't really replace and install eMCP on discrete boards) I'd recommend changing this to board definitions, i.e., in Kconfig add:
KUKUI_HAS_EMCP
And then you can determine the right type in code as
if (CONFIG_KUKUI_HAS_EMCP) ...
This should be done inside src/mainboard/google/kukui/*. If some module in src/soc/mediatek needs such info, that should be passed and sent by mainboard/google/kukui/*.
Also, to make sure we won't be using wrong combination, you can still add the DRAM type in DRAM config, and ten we can compare with CONFIG_KUKUI_HAS_EMCP to see if the system was using right ocnfig.
how can I distinguish the current build is EMCP or discrete? which Macro should I using to judge current type? I see BOARD_GOOGLE_KUKUI and BOARD_GOOGLE_KRANE all be defined at https://review.coreboot.org/plugins/gitiles/coreboot/+/f686c6395d10ac6190c01... And the build binary of EMCP is image-krane.dev.img, and kukui is image-kukui.dev.img