summaryrefslogtreecommitdiff
path: root/firmware/target/arm
diff options
context:
space:
mode:
Diffstat (limited to 'firmware/target/arm')
-rw-r--r--firmware/target/arm/imx233/clkctrl-imx233.h11
-rw-r--r--firmware/target/arm/imx233/system-target.h1
-rw-r--r--firmware/target/arm/thread-arm.c2
3 files changed, 13 insertions, 1 deletions
diff --git a/firmware/target/arm/imx233/clkctrl-imx233.h b/firmware/target/arm/imx233/clkctrl-imx233.h
index fc835c813a..8a52620f7e 100644
--- a/firmware/target/arm/imx233/clkctrl-imx233.h
+++ b/firmware/target/arm/imx233/clkctrl-imx233.h
@@ -98,6 +98,17 @@
98#define HW_CLKCTRL_RESET_CHIP 0x2 98#define HW_CLKCTRL_RESET_CHIP 0x2
99#define HW_CLKCTRL_RESET_DIG 0x1 99#define HW_CLKCTRL_RESET_DIG 0x1
100 100
101static inline void core_sleep(void)
102{
103 __REG_SET(HW_CLKCTRL_CPU) = HW_CLKCTRL_CPU__INTERRUPT_WAIT;
104 asm volatile (
105 "mcr p15, 0, %0, c7, c0, 4 \n" /* Wait for interrupt */
106 "nop\n" /* Datasheet unclear: "The lr sent to handler points here after RTI"*/
107 : : "r"(0)
108 );
109 enable_irq();
110}
111
101enum imx233_clock_t 112enum imx233_clock_t
102{ 113{
103 CLK_PIX, /* freq, div, frac, bypass, enable */ 114 CLK_PIX, /* freq, div, frac, bypass, enable */
diff --git a/firmware/target/arm/imx233/system-target.h b/firmware/target/arm/imx233/system-target.h
index 87063510ad..90a2966f2f 100644
--- a/firmware/target/arm/imx233/system-target.h
+++ b/firmware/target/arm/imx233/system-target.h
@@ -26,6 +26,7 @@
26#include "panic.h" 26#include "panic.h"
27 27
28#include "clock-target.h" /* CPUFREQ_* are defined here */ 28#include "clock-target.h" /* CPUFREQ_* are defined here */
29#include "clkctrl-imx233.h"
29#include "power-imx233.h" 30#include "power-imx233.h"
30 31
31/* Digital control */ 32/* Digital control */
diff --git a/firmware/target/arm/thread-arm.c b/firmware/target/arm/thread-arm.c
index 0b46ca2558..88dac2542a 100644
--- a/firmware/target/arm/thread-arm.c
+++ b/firmware/target/arm/thread-arm.c
@@ -109,7 +109,7 @@ static inline void core_sleep(void)
109} 109}
110#else 110#else
111/* Skip this if special code is required and implemented */ 111/* Skip this if special code is required and implemented */
112#if !(defined(CPU_PP)) && CONFIG_CPU != RK27XX 112#if !(defined(CPU_PP)) && CONFIG_CPU != RK27XX && CONFIG_CPU != IMX233
113static inline void core_sleep(void) 113static inline void core_sleep(void)
114{ 114{
115 /* TODO: core_sleep not implemented, battery life will be decreased */ 115 /* TODO: core_sleep not implemented, battery life will be decreased */