From b02452b490321d27a014c8a3421a474fc6689a92 Mon Sep 17 00:00:00 2001 From: Mukesh Savaliya Date: Fri, 11 May 2018 07:41:33 -0700 Subject: sdm845: Add SPI-NOR flash driver TEST=build & run Change-Id: Ie404faf37617d2ad792310709ca2063f9a372076 Signed-off-by: Mukesh Savaliya Reviewed-on: https://review.coreboot.org/c/25392 Tested-by: build bot (Jenkins) Reviewed-by: Julius Werner --- src/soc/qualcomm/sdm845/mmu.c | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) (limited to 'src/soc/qualcomm/sdm845/mmu.c') diff --git a/src/soc/qualcomm/sdm845/mmu.c b/src/soc/qualcomm/sdm845/mmu.c index 12219e8817..52e7733fa5 100644 --- a/src/soc/qualcomm/sdm845/mmu.c +++ b/src/soc/qualcomm/sdm845/mmu.c @@ -19,14 +19,19 @@ #include #include -void sdm845_mmu_init() +#define CACHED_RAM (MA_MEM | MA_S | MA_RW) +#define UNCACHED_RAM (MA_MEM | MA_S | MA_RW | MA_MEM_NC) +#define DEV_MEM (MA_DEV | MA_S | MA_RW) + +void sdm845_mmu_init(void) { mmu_init(); - mmu_config_range((void *)(4 * KiB), ((4UL * GiB) - (4 * KiB)), - MA_DEV | MA_S | MA_RW); - mmu_config_range((void *)_ssram, _ssram_size, MA_MEM | MA_S | MA_RW); - mmu_config_range((void *)_bsram, _bsram_size, MA_MEM | MA_S | MA_RW); + mmu_config_range((void *)(4 * KiB), ((4UL * GiB) - (4 * KiB)), DEV_MEM); + mmu_config_range((void *)_ssram, _ssram_size, CACHED_RAM); + mmu_config_range((void *)_bsram, _bsram_size, CACHED_RAM); + mmu_config_range((void *)_dma_coherent, _dma_coherent_size, + UNCACHED_RAM); mmu_enable(); } -- cgit v1.2.3