Skip to content

Commit 688196d

Browse files
author
Bradley Bolen
committed
arch: arm: Move Cortex-M specific CPU defines
These defines are specific to the Cortex-M. Move them to their own header file to prepare for Cortex-R support. Signed-off-by: Bradley Bolen <[email protected]>
1 parent 2dac4fa commit 688196d

File tree

3 files changed

+22
-8
lines changed

3 files changed

+22
-8
lines changed

include/arch/arm/arch.h

+1
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,7 @@
3232
#include <arch/arm/asm_inline.h>
3333

3434
#ifdef CONFIG_CPU_CORTEX_M
35+
#include <arch/arm/cortex_m/cpu.h>
3536
#include <arch/arm/cortex_m/memory_map.h>
3637
#endif
3738

include/arch/arm/asm_inline_gcc.h

+1-8
Original file line numberDiff line numberDiff line change
@@ -20,15 +20,8 @@ extern "C" {
2020
* Include arch/cpu.h instead
2121
*/
2222

23-
#ifdef _ASMLANGUAGE
23+
#ifndef _ASMLANGUAGE
2424

25-
#define _SCS_BASE_ADDR _PPB_INT_SCS
26-
#define _SCS_ICSR (_SCS_BASE_ADDR + 0xd04)
27-
#define _SCS_ICSR_PENDSV (1 << 28)
28-
#define _SCS_ICSR_UNPENDSV (1 << 27)
29-
#define _SCS_ICSR_RETTOBASE (1 << 11)
30-
31-
#else /* !_ASMLANGUAGE */
3225
#include <zephyr/types.h>
3326
#include <arch/arm/exc.h>
3427
#include <irq.h>

include/arch/arm/cortex_m/cpu.h

+20
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
/*
2+
* Copyright (c) 2015, Wind River Systems, Inc.
3+
*
4+
* SPDX-License-Identifier: Apache-2.0
5+
*/
6+
7+
#ifndef _CORTEX_M_CPU_H
8+
#define _CORTEX_M_CPU_H
9+
10+
#ifdef _ASMLANGUAGE
11+
12+
#define _SCS_BASE_ADDR _PPB_INT_SCS
13+
#define _SCS_ICSR (_SCS_BASE_ADDR + 0xd04)
14+
#define _SCS_ICSR_PENDSV (1 << 28)
15+
#define _SCS_ICSR_UNPENDSV (1 << 27)
16+
#define _SCS_ICSR_RETTOBASE (1 << 11)
17+
18+
#endif
19+
20+
#endif

0 commit comments

Comments
 (0)