arch: arm: remove num-mpu-regions
Remove this property presumably unused. Signed-off-by: Wilfried Chauveau <wilfried.chauveau@arm.com>
This commit is contained in:
parent
5b3d4598a7
commit
85af32e16e
8 changed files with 0 additions and 48 deletions
|
@ -30,10 +30,6 @@ LOG_MODULE_DECLARE(mpu);
|
||||||
#define MPU_NODEID DT_INST(0, arm_armv6m_mpu)
|
#define MPU_NODEID DT_INST(0, arm_armv6m_mpu)
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if DT_NODE_HAS_PROP(MPU_NODEID, arm_num_mpu_regions)
|
|
||||||
#define NUM_MPU_REGIONS DT_PROP(MPU_NODEID, arm_num_mpu_regions)
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#define NODE_HAS_PROP_AND_OR(node_id, prop) \
|
#define NODE_HAS_PROP_AND_OR(node_id, prop) \
|
||||||
DT_NODE_HAS_PROP(node_id, prop) ||
|
DT_NODE_HAS_PROP(node_id, prop) ||
|
||||||
|
|
||||||
|
@ -527,11 +523,6 @@ int z_arm_mpu_init(void)
|
||||||
__ASSERT(
|
__ASSERT(
|
||||||
(MPU->TYPE & MPU_TYPE_DREGION_Msk) >> MPU_TYPE_DREGION_Pos == 8,
|
(MPU->TYPE & MPU_TYPE_DREGION_Msk) >> MPU_TYPE_DREGION_Pos == 8,
|
||||||
"Invalid number of MPU regions\n");
|
"Invalid number of MPU regions\n");
|
||||||
#elif defined(NUM_MPU_REGIONS)
|
|
||||||
__ASSERT(
|
|
||||||
(MPU->TYPE & MPU_TYPE_DREGION_Msk) >> MPU_TYPE_DREGION_Pos ==
|
|
||||||
NUM_MPU_REGIONS,
|
|
||||||
"Invalid number of MPU regions\n");
|
|
||||||
#endif /* CORTEX_M0PLUS || CPU_CORTEX_M3 || CPU_CORTEX_M4 */
|
#endif /* CORTEX_M0PLUS || CPU_CORTEX_M3 || CPU_CORTEX_M4 */
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
|
|
|
@ -720,12 +720,7 @@ static int mpu_mark_areas_for_dynamic_regions(
|
||||||
*/
|
*/
|
||||||
static inline uint8_t get_num_regions(void)
|
static inline uint8_t get_num_regions(void)
|
||||||
{
|
{
|
||||||
#if defined(NUM_MPU_REGIONS)
|
|
||||||
/* Retrieve the number of regions from DTS configuration. */
|
|
||||||
return NUM_MPU_REGIONS;
|
|
||||||
#else
|
|
||||||
return mpu_get_num_regions();
|
return mpu_get_num_regions();
|
||||||
#endif /* NUM_MPU_REGIONS */
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/* This internal function programs the dynamic MPU regions.
|
/* This internal function programs the dynamic MPU regions.
|
||||||
|
|
|
@ -10,10 +10,6 @@
|
||||||
*/
|
*/
|
||||||
static inline uint8_t get_num_regions(void)
|
static inline uint8_t get_num_regions(void)
|
||||||
{
|
{
|
||||||
#if defined(NUM_MPU_REGIONS)
|
|
||||||
/* Retrieve the number of regions from DTS configuration. */
|
|
||||||
return NUM_MPU_REGIONS;
|
|
||||||
#else
|
|
||||||
uint32_t type;
|
uint32_t type;
|
||||||
|
|
||||||
__asm__ volatile("mrc p15, 0, %0, c0, c0, 4" : "=r" (type) ::);
|
__asm__ volatile("mrc p15, 0, %0, c0, c0, 4" : "=r" (type) ::);
|
||||||
|
@ -21,7 +17,6 @@ static inline uint8_t get_num_regions(void)
|
||||||
type = (type & MPU_TYPE_DREGION_Msk) >> MPU_TYPE_DREGION_Pos;
|
type = (type & MPU_TYPE_DREGION_Msk) >> MPU_TYPE_DREGION_Pos;
|
||||||
|
|
||||||
return (uint8_t)type;
|
return (uint8_t)type;
|
||||||
#endif /* NUM_MPU_REGIONS */
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static inline uint32_t get_region_attributes(void)
|
static inline uint32_t get_region_attributes(void)
|
||||||
|
|
|
@ -10,23 +10,11 @@
|
||||||
*/
|
*/
|
||||||
static inline uint8_t get_num_regions(void)
|
static inline uint8_t get_num_regions(void)
|
||||||
{
|
{
|
||||||
#if defined(CONFIG_CPU_CORTEX_M0PLUS) || \
|
|
||||||
defined(CONFIG_CPU_CORTEX_M3) || \
|
|
||||||
defined(CONFIG_CPU_CORTEX_M4)
|
|
||||||
/* Cortex-M0+, Cortex-M3, and Cortex-M4 MCUs may
|
|
||||||
* have a fixed number of 8 MPU regions.
|
|
||||||
*/
|
|
||||||
return 8;
|
|
||||||
#elif defined(NUM_MPU_REGIONS)
|
|
||||||
/* Retrieve the number of regions from DTS configuration. */
|
|
||||||
return NUM_MPU_REGIONS;
|
|
||||||
#else
|
|
||||||
uint32_t type = MPU->TYPE;
|
uint32_t type = MPU->TYPE;
|
||||||
|
|
||||||
type = (type & MPU_TYPE_DREGION_Msk) >> MPU_TYPE_DREGION_Pos;
|
type = (type & MPU_TYPE_DREGION_Msk) >> MPU_TYPE_DREGION_Pos;
|
||||||
|
|
||||||
return (uint8_t)type;
|
return (uint8_t)type;
|
||||||
#endif /* CPU_CORTEX_M0PLUS | CPU_CORTEX_M3 | CPU_CORTEX_M4 */
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static inline void set_region_number(uint32_t index)
|
static inline void set_region_number(uint32_t index)
|
||||||
|
|
|
@ -10,8 +10,3 @@ include: base.yaml
|
||||||
properties:
|
properties:
|
||||||
reg:
|
reg:
|
||||||
required: true
|
required: true
|
||||||
|
|
||||||
arm,num-mpu-regions:
|
|
||||||
type: int
|
|
||||||
const: 8
|
|
||||||
description: number of MPU regions supported by hardware
|
|
||||||
|
|
|
@ -7,7 +7,3 @@ include: base.yaml
|
||||||
properties:
|
properties:
|
||||||
reg:
|
reg:
|
||||||
required: true
|
required: true
|
||||||
|
|
||||||
arm,num-mpu-regions:
|
|
||||||
type: int
|
|
||||||
description: number of MPU regions supported by hardware
|
|
||||||
|
|
|
@ -7,7 +7,3 @@ include: base.yaml
|
||||||
properties:
|
properties:
|
||||||
reg:
|
reg:
|
||||||
required: true
|
required: true
|
||||||
|
|
||||||
arm,num-mpu-regions:
|
|
||||||
type: int
|
|
||||||
description: number of MPU regions supported by hardware
|
|
||||||
|
|
|
@ -7,7 +7,3 @@ include: base.yaml
|
||||||
properties:
|
properties:
|
||||||
reg:
|
reg:
|
||||||
required: true
|
required: true
|
||||||
|
|
||||||
arm,num-mpu-regions:
|
|
||||||
type: int
|
|
||||||
description: number of MPU regions supported by hardware
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue