diff options
Diffstat (limited to 'src/soc/qualcomm')
-rw-r--r-- | src/soc/qualcomm/sdm845/include/soc/symbols.h | 15 | ||||
-rw-r--r-- | src/soc/qualcomm/sdm845/mmu.c | 6 | ||||
-rw-r--r-- | src/soc/qualcomm/sdm845/soc.c | 2 |
3 files changed, 8 insertions, 15 deletions
diff --git a/src/soc/qualcomm/sdm845/include/soc/symbols.h b/src/soc/qualcomm/sdm845/include/soc/symbols.h index 163b54dc51..1c14c03d01 100644 --- a/src/soc/qualcomm/sdm845/include/soc/symbols.h +++ b/src/soc/qualcomm/sdm845/include/soc/symbols.h @@ -16,18 +16,11 @@ #ifndef _SOC_QUALCOMM_SDM845_SYMBOLS_H_ #define _SOC_QUALCOMM_SDM845_SYMBOLS_H_ +#include <symbols.h> #include <types.h> -extern u8 _ssram[]; -extern u8 _essram[]; -#define _ssram_size (_essram - _ssram) - -extern u8 _bsram[]; -extern u8 _ebsram[]; -#define _bsram_size (_ebsram - _bsram) - -extern u8 _dram_reserved[]; -extern u8 _edram_reserved[]; -#define _dram_reserved_size (_edram_reserved - _dram_reserved) +DECLARE_REGION(ssram) +DECLARE_REGION(bsram) +DECLARE_REGION(dram_reserved) #endif // _SOC_QUALCOMM_SDM845_SYMBOLS_H_ diff --git a/src/soc/qualcomm/sdm845/mmu.c b/src/soc/qualcomm/sdm845/mmu.c index 52e7733fa5..ef6c058ab3 100644 --- a/src/soc/qualcomm/sdm845/mmu.c +++ b/src/soc/qualcomm/sdm845/mmu.c @@ -28,9 +28,9 @@ void sdm845_mmu_init(void) mmu_init(); 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, + mmu_config_range((void *)_ssram, REGION_SIZE(ssram), CACHED_RAM); + mmu_config_range((void *)_bsram, REGION_SIZE(bsram), CACHED_RAM); + mmu_config_range((void *)_dma_coherent, REGION_SIZE(dma_coherent), UNCACHED_RAM); mmu_enable(); diff --git a/src/soc/qualcomm/sdm845/soc.c b/src/soc/qualcomm/sdm845/soc.c index 56e2c8456a..e4eac96276 100644 --- a/src/soc/qualcomm/sdm845/soc.c +++ b/src/soc/qualcomm/sdm845/soc.c @@ -23,7 +23,7 @@ static void soc_read_resources(struct device *dev) { ram_resource(dev, 0, (uintptr_t)_dram / KiB, DRAMSIZE4GB / KiB); reserved_ram_resource(dev, 1, (uintptr_t)_dram_reserved / KiB, - _dram_reserved_size / KiB); + REGION_SIZE(dram_reserved) / KiB); } static void soc_init(struct device *dev) |