Skip to content

Commit df4b780

Browse files
YuguoWHcarlescufi
authored andcommitted
arch: arc: unify different versions of MPU registers
Previously MPU registers macros are only defined within its own header files and could not be used by other part of program. This commit unify them together. Signed-off-by: Yuguo Zou <[email protected]>
1 parent dc89bfc commit df4b780

File tree

3 files changed

+8
-14
lines changed

3 files changed

+8
-14
lines changed

arch/arc/core/mpu/arc_mpu_v2_internal.h

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -16,10 +16,6 @@
1616
#define AUX_MPU_RDP_ATTR_MASK (0x1FC)
1717
#define AUX_MPU_RDP_SIZE_MASK (0xE03)
1818

19-
#define _ARC_V2_MPU_EN (0x409)
20-
#define _ARC_V2_MPU_RDB0 (0x422)
21-
#define _ARC_V2_MPU_RDP0 (0x423)
22-
2319
/* For MPU version 2, the minimum protection region size is 2048 bytes */
2420
#define ARC_FEATURE_MPU_ALIGNMENT_BITS 11
2521

arch/arc/core/mpu/arc_mpu_v3_internal.h

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -12,16 +12,6 @@
1212

1313
#define AUX_MPU_RPER_ATTR_MASK (0x1FF)
1414

15-
#define _ARC_V2_MPU_EN (0x409)
16-
17-
/* aux regs added in MPU version 3 */
18-
#define _ARC_V2_MPU_INDEX (0x448) /* MPU index */
19-
#define _ARC_V2_MPU_RSTART (0x449) /* MPU region start address */
20-
#define _ARC_V2_MPU_REND (0x44A) /* MPU region end address */
21-
#define _ARC_V2_MPU_RPER (0x44B) /* MPU region permission register */
22-
#define _ARC_V2_MPU_PROBE (0x44C) /* MPU probe register */
23-
24-
2515
/* For MPU version 3, the minimum protection region size is 32 bytes */
2616
#define ARC_FEATURE_MPU_ALIGNMENT_BITS 5
2717

include/arch/arc/v2/aux_regs.h

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -110,6 +110,14 @@
110110
#define _ARC_V2_FPU_DPFP1H 0x303
111111
#define _ARC_V2_FPU_DPFP2L 0x304
112112
#define _ARC_V2_FPU_DPFP2H 0x305
113+
#define _ARC_V2_MPU_EN 0x409
114+
#define _ARC_V2_MPU_RDB0 0x422
115+
#define _ARC_V2_MPU_RDP0 0x423
116+
#define _ARC_V2_MPU_INDEX 0x448
117+
#define _ARC_V2_MPU_RSTART 0x449
118+
#define _ARC_V2_MPU_REND 0x44A
119+
#define _ARC_V2_MPU_RPER 0x44B
120+
#define _ARC_V2_MPU_PROBE 0x44C
113121

114122
/* STATUS32/STATUS32_P0 bits */
115123
#define _ARC_V2_STATUS32_H (1 << 0)

0 commit comments

Comments
 (0)