Linux Audio
Check our new training course
Embedded Linux Audio
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80
/* * Copyright (c) 2017 Linaro Limited. * * SPDX-License-Identifier: Apache-2.0 */ #ifndef _ARM_MPU_MEM_CFG_H_ #define _ARM_MPU_MEM_CFG_H_ #include <soc.h> #include <arch/arm/cortex_m/mpu/arm_mpu.h> /* Flash Region Definitions */ #if CONFIG_FLASH_SIZE == 64 #define REGION_FLASH_SIZE REGION_64K #elif CONFIG_FLASH_SIZE == 128 #define REGION_FLASH_SIZE REGION_128K #elif CONFIG_FLASH_SIZE == 256 #define REGION_FLASH_SIZE REGION_256K #elif CONFIG_FLASH_SIZE == 512 #define REGION_FLASH_SIZE REGION_512K #elif CONFIG_FLASH_SIZE == 1024 #define REGION_FLASH_SIZE REGION_1M #elif CONFIG_FLASH_SIZE == 1536 #define REGION_FLASH_SIZE REGION_2M /* last 512kB are not mapped */ #elif CONFIG_FLASH_SIZE == 2048 #define REGION_FLASH_SIZE REGION_2M #else #error "Unsupported configuration" #endif /* SRAM Region Definitions */ #if CONFIG_SRAM_SIZE == 12 #define REGION_SRAM_0_SIZE REGION_8K #define REGION_SRAM_1_START 0x2000 #define REGION_SRAM_1_SIZE REGION_4K #elif CONFIG_SRAM_SIZE == 20 #define REGION_SRAM_0_SIZE REGION_16K #define REGION_SRAM_1_START 0x4000 #define REGION_SRAM_1_SIZE REGION_4K #elif CONFIG_SRAM_SIZE == 32 #define REGION_SRAM_0_SIZE REGION_16K #define REGION_SRAM_1_START 0x4000 #define REGION_SRAM_1_SIZE REGION_16K #elif CONFIG_SRAM_SIZE == 40 #define REGION_SRAM_0_SIZE REGION_32K #define REGION_SRAM_1_START 0x8000 #define REGION_SRAM_1_SIZE REGION_8K #elif CONFIG_SRAM_SIZE == 64 #define REGION_SRAM_0_SIZE REGION_32K #define REGION_SRAM_1_START 0x8000 #define REGION_SRAM_1_SIZE REGION_32K #elif CONFIG_SRAM_SIZE == 96 #define REGION_SRAM_0_SIZE REGION_64K #define REGION_SRAM_1_START 0x10000 #define REGION_SRAM_1_SIZE REGION_32K #elif CONFIG_SRAM_SIZE == 128 #define REGION_SRAM_0_SIZE REGION_64K #define REGION_SRAM_1_START 0x10000 #define REGION_SRAM_1_SIZE REGION_64K #elif CONFIG_SRAM_SIZE == 192 #define REGION_SRAM_0_SIZE REGION_128K #define REGION_SRAM_1_START 0x20000 #define REGION_SRAM_1_SIZE REGION_64K #elif CONFIG_SRAM_SIZE == 256 #define REGION_SRAM_0_SIZE REGION_128K #define REGION_SRAM_1_START 0x20000 #define REGION_SRAM_1_SIZE REGION_128K #elif CONFIG_SRAM_SIZE == 320 #define REGION_SRAM_0_SIZE REGION_256K #define REGION_SRAM_1_START 0x40000 #define REGION_SRAM_1_SIZE REGION_64K #elif CONFIG_SRAM_SIZE == 384 #define REGION_SRAM_0_SIZE REGION_256K #define REGION_SRAM_1_START 0x40000 #define REGION_SRAM_1_SIZE REGION_128K #else #error "Unsupported configuration" #endif #endif /* _ARM_MPU_MEM_CFG_H_ */