Attention is currently required from: Hung-Te Lin. Jianjun Wang has uploaded this change for review. ( https://review.coreboot.org/c/coreboot/+/63020 )
Change subject: soc/mediatek/mt8195: Add early init support ......................................................................
soc/mediatek/mt8195: Add early init support
Add early init support for MT8195 platform.
TEST=Build pass and boot up to kernel successfully via SSD on Dojo board, here is the SSD information in boot log: == NVME IDENTIFY CONTROLLER DATA == PCI VID : 0x15b7 PCI SSVID : 0x15b7 SN : 21517J440114 MN : WDC PC SN530 SDBPTPZ-256G-1006 RAB : 0x4 AERL : 0x7 SQES : 0x66 CQES : 0x44 NN : 0x1 Identified NVMe model WDC PC SN530 SDBPTPZ-256G-1006
BUG=b:178565024 BRANCH=cherry
Signed-off-by: Jianjun Wang jianjun.wang@mediatek.com Change-Id: I4eb7da53ff76c385cab18bbf84970e96b61662ac --- M src/mainboard/google/cherry/bootblock.c M src/soc/mediatek/mt8195/Makefile.inc M src/soc/mediatek/mt8195/include/soc/memlayout.ld 3 files changed, 10 insertions(+), 0 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/20/63020/1
diff --git a/src/mainboard/google/cherry/bootblock.c b/src/mainboard/google/cherry/bootblock.c index dd83817..54f320e 100644 --- a/src/mainboard/google/cherry/bootblock.c +++ b/src/mainboard/google/cherry/bootblock.c @@ -3,6 +3,7 @@ #include <bootblock_common.h> #include <device/mmio.h> #include <gpio.h> +#include <soc/early_init.h> #include <soc/gpio.h> #include <soc/i2c.h> #include <soc/pcie.h> @@ -44,6 +45,9 @@
void bootblock_mainboard_init(void) { + if (CONFIG(MEDIATEK_EARLY_INIT)) + mtk_clear_early_init(); + if (CONFIG(PCI)) mtk_pcie_pre_init();
diff --git a/src/soc/mediatek/mt8195/Makefile.inc b/src/soc/mediatek/mt8195/Makefile.inc index efb2c6f..4ed889c 100644 --- a/src/soc/mediatek/mt8195/Makefile.inc +++ b/src/soc/mediatek/mt8195/Makefile.inc @@ -2,6 +2,7 @@
bootblock-y += ../common/auxadc.c bootblock-y += bootblock.c +bootblock-$(CONFIG_MEDIATEK_EARLY_INIT) += ../common/early_init.c bootblock-y += ../common/eint_event.c bootblock-y += ../common/flash_controller.c bootblock-y += ../common/gpio.c gpio.c @@ -54,6 +55,7 @@ romstage-y += ../common/rtc.c ../common/rtc_osc_init.c ../common/rtc_mt6359p.c
ramstage-y += ../common/auxadc.c +ramstage-$(CONFIG_MEDIATEK_EARLY_INIT) += ../common/early_init.c ramstage-y += ../common/ddp.c ddp.c ramstage-y += devapc.c ramstage-y += ../common/dfd.c diff --git a/src/soc/mediatek/mt8195/include/soc/memlayout.ld b/src/soc/mediatek/mt8195/include/soc/memlayout.ld index 5942776..ed31c2b 100644 --- a/src/soc/mediatek/mt8195/include/soc/memlayout.ld +++ b/src/soc/mediatek/mt8195/include/soc/memlayout.ld @@ -19,6 +19,9 @@ _ = ASSERT(size % 4K == 0, \ "DRAM DMA buffer should be multiple of smallest page size (4K)!");
+#define MTK_EARLY_INIT(addr, size) \ + REGION(mtk_early_init, addr, size, 4) + SECTIONS { SRAM_START(0x00100000) @@ -26,6 +29,7 @@ TPM_TCPA_LOG(0x00103000, 2K) FMAP_CACHE(0x00103800, 2K) WATCHDOG_TOMBSTONE(0x00104000, 4) + MTK_EARLY_INIT(0x00104010, 8) CBFS_MCACHE(0x00107c00, 8K) TIMESTAMP(0x00109c00, 1K) STACK(0x0010a000, 12K)