soc/mediatek/mt8188: Enable mmu operation for L2C SRAM and DMA

- Turn off L2C SRAM and reconfigure as L2 cache:
  Mediatek SoC uses part of the L2 cache as SRAM before DRAM is ready.
  After DRAM is ready, we should invoke disable_l2c_sram to reconfigure
  the L2C SRAM as L2 cache.

- Configure DMA buffer in DRAM:
  Set DRAM DMA to be non-cacheable to load blob correctly.

TEST=build pass
BUG=b:233720142

Signed-off-by: Bo-Chen Chen <rex-bc.chen@mediatek.com>
Change-Id: I10f1cb8c62dfa78f59a4a5ea6087609668a0c2aa
Reviewed-on: https://review.coreboot.org/c/coreboot/+/65753
Reviewed-by: Yidi Lin <yidilin@chromium.org>
Reviewed-by: Yu-Ping Wu <yupingso@google.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
This commit is contained in:
Rex-BC Chen 2022-06-15 11:49:16 +08:00 committed by Felix Held
parent f916b3cd8e
commit 29f1866e95
2 changed files with 4 additions and 0 deletions

View File

@ -14,8 +14,10 @@ bootblock-y += ../common/wdt.c ../common/wdt_req.c wdt.c
romstage-y += ../common/cbmem.c
romstage-y += emi.c
romstage-y += ../common/mmu_operations.c ../common/mmu_cmops.c
ramstage-y += emi.c
ramstage-y += ../common/mmu_operations.c ../common/mmu_cmops.c
ramstage-y += soc.c
CPPFLAGS_common += -Isrc/soc/mediatek/mt8188/include

View File

@ -2,6 +2,7 @@
#include <device/device.h>
#include <soc/emi.h>
#include <soc/mmu_operations.h>
#include <symbols.h>
static void soc_read_resources(struct device *dev)
@ -11,6 +12,7 @@ static void soc_read_resources(struct device *dev)
static void soc_init(struct device *dev)
{
mtk_mmu_disable_l2c_sram();
}
static struct device_operations soc_ops = {