mirror of
https://github.com/Telecominfraproject/OpenCellular.git
synced 2026-01-02 21:25:03 +00:00
Preparatory work to introduce a second SoC : 5/5 All Cortex-M3/4 have the same NVIC registers at the same address. Signed-off-by: Vincent Palatin <vpalatin@chromium.org> BUG=None TEST=run EC firmware on BDS and check a few console commands Change-Id: I6b03c4c1fb21850be8c8afb711ea44134c8cdea1
24 lines
729 B
C
24 lines
729 B
C
/* Copyright (c) 2012 The Chromium OS Authors. All rights reserved.
|
|
* Use of this source code is governed by a BSD-style license that can be
|
|
* found in the LICENSE file.
|
|
*
|
|
* Registers map and defintions for Cortex-MLM4x processor
|
|
*/
|
|
|
|
#ifndef __CPU_H
|
|
#define __CPU_H
|
|
|
|
#include <stdint.h>
|
|
|
|
/* Macro to access 32-bit registers */
|
|
#define CPUREG(addr) (*(volatile uint32_t*)(addr))
|
|
|
|
/* Nested Vectored Interrupt Controller */
|
|
#define CPU_NVIC_EN(x) CPUREG(0xe000e100 + 4 * (x))
|
|
#define CPU_NVIC_DIS(x) CPUREG(0xe000e180 + 4 * (x))
|
|
#define CPU_NVIC_PRI(x) CPUREG(0xe000e400 + 4 * (x))
|
|
#define CPU_NVIC_APINT CPUREG(0xe000ed0c)
|
|
#define CPU_NVIC_SWTRIG CPUREG(0xe000ef00)
|
|
|
|
#endif /* __CPU_H */
|