summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--chip/lm4/clock.c3
-rw-r--r--chip/lm4/registers.h2
-rw-r--r--core/cortex-m/cpu.h2
3 files changed, 4 insertions, 3 deletions
diff --git a/chip/lm4/clock.c b/chip/lm4/clock.c
index a342404fd5..6031767872 100644
--- a/chip/lm4/clock.c
+++ b/chip/lm4/clock.c
@@ -7,6 +7,7 @@
#include "board.h"
#include "clock.h"
+#include "cpu.h"
#include "config.h"
#include "console.h"
#include "gpio.h"
@@ -184,7 +185,7 @@ static int command_sleep(int argc, char **argv)
}
/* set deep sleep bit */
if (level >= 4)
- LM4_SCB_SYSCTRL |= 0x4;
+ CPU_SCB_SYSCTRL |= 0x4;
/* go to low power mode (forever ...) */
if (level > 1)
while (1) {
diff --git a/chip/lm4/registers.h b/chip/lm4/registers.h
index 63bb3dbeca..dccd86e179 100644
--- a/chip/lm4/registers.h
+++ b/chip/lm4/registers.h
@@ -365,8 +365,6 @@ static inline int lm4_fan_addr(int ch, int offset)
#define LM4_IRQ_GPIOQ7 131
/* 132 - 138 reserved */
-#define LM4_SCB_SYSCTRL LM4REG(0xe000ed10)
-
/* GPIO */
#define LM4_GPIO_PORTA_BASE 0x40004000
#define LM4_GPIO_PORTB_BASE 0x40005000
diff --git a/core/cortex-m/cpu.h b/core/cortex-m/cpu.h
index bd94e179fe..7e032164a7 100644
--- a/core/cortex-m/cpu.h
+++ b/core/cortex-m/cpu.h
@@ -21,4 +21,6 @@
#define CPU_NVIC_APINT CPUREG(0xe000ed0c)
#define CPU_NVIC_SWTRIG CPUREG(0xe000ef00)
+#define CPU_SCB_SYSCTRL CPUREG(0xe000ed10)
+
#endif /* __CPU_H */