Skip to content
Permalink
Browse files

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 <bbolen@lexmark.com>
  • Loading branch information...
Bradley Bolen authored and ioannisg committed Aug 10, 2018
1 parent 4cee0ee commit 1514c41cd1edc3a0cbf910e2d9b51bda56f870dd
Showing with 22 additions and 8 deletions.
  1. +1 −0 include/arch/arm/arch.h
  2. +1 −8 include/arch/arm/asm_inline_gcc.h
  3. +20 −0 include/arch/arm/cortex_m/cpu.h
@@ -33,6 +33,7 @@
#include <arch/arm/asm_inline.h>

#ifdef CONFIG_CPU_CORTEX_M
#include <arch/arm/cortex_m/cpu.h>
#include <arch/arm/cortex_m/memory_map.h>
#endif

@@ -20,15 +20,8 @@ extern "C" {
* Include arch/cpu.h instead
*/

#ifdef _ASMLANGUAGE
#ifndef _ASMLANGUAGE

#define _SCS_BASE_ADDR _PPB_INT_SCS
#define _SCS_ICSR (_SCS_BASE_ADDR + 0xd04)
#define _SCS_ICSR_PENDSV (1 << 28)
#define _SCS_ICSR_UNPENDSV (1 << 27)
#define _SCS_ICSR_RETTOBASE (1 << 11)

#else /* !_ASMLANGUAGE */
#include <zephyr/types.h>
#include <arch/arm/exc.h>
#include <irq.h>
@@ -0,0 +1,20 @@
/*
* Copyright (c) 2015, Wind River Systems, Inc.
*
* SPDX-License-Identifier: Apache-2.0
*/

#ifndef _CORTEX_M_CPU_H
#define _CORTEX_M_CPU_H

#ifdef _ASMLANGUAGE

#define _SCS_BASE_ADDR _PPB_INT_SCS
#define _SCS_ICSR (_SCS_BASE_ADDR + 0xd04)
#define _SCS_ICSR_PENDSV (1 << 28)
#define _SCS_ICSR_UNPENDSV (1 << 27)
#define _SCS_ICSR_RETTOBASE (1 << 11)

#endif

#endif

0 comments on commit 1514c41

Please sign in to comment.
You can’t perform that action at this time.