summaryrefslogtreecommitdiff
path: root/firmware/target/arm/imx233
diff options
context:
space:
mode:
Diffstat (limited to 'firmware/target/arm/imx233')
-rw-r--r--firmware/target/arm/imx233/clkctrl-imx233.h11
-rw-r--r--firmware/target/arm/imx233/system-target.h1
2 files changed, 12 insertions, 0 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 */