imx233: implement core_sleep
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@31443 a1c6a512-1295-4272-9138-f99709370657
This commit is contained in:
parent
4e8320d2ec
commit
4fe6963e40
3 changed files with 13 additions and 1 deletions
|
@ -98,6 +98,17 @@
|
||||||
#define HW_CLKCTRL_RESET_CHIP 0x2
|
#define HW_CLKCTRL_RESET_CHIP 0x2
|
||||||
#define HW_CLKCTRL_RESET_DIG 0x1
|
#define HW_CLKCTRL_RESET_DIG 0x1
|
||||||
|
|
||||||
|
static inline void core_sleep(void)
|
||||||
|
{
|
||||||
|
__REG_SET(HW_CLKCTRL_CPU) = HW_CLKCTRL_CPU__INTERRUPT_WAIT;
|
||||||
|
asm volatile (
|
||||||
|
"mcr p15, 0, %0, c7, c0, 4 \n" /* Wait for interrupt */
|
||||||
|
"nop\n" /* Datasheet unclear: "The lr sent to handler points here after RTI"*/
|
||||||
|
: : "r"(0)
|
||||||
|
);
|
||||||
|
enable_irq();
|
||||||
|
}
|
||||||
|
|
||||||
enum imx233_clock_t
|
enum imx233_clock_t
|
||||||
{
|
{
|
||||||
CLK_PIX, /* freq, div, frac, bypass, enable */
|
CLK_PIX, /* freq, div, frac, bypass, enable */
|
||||||
|
|
|
@ -26,6 +26,7 @@
|
||||||
#include "panic.h"
|
#include "panic.h"
|
||||||
|
|
||||||
#include "clock-target.h" /* CPUFREQ_* are defined here */
|
#include "clock-target.h" /* CPUFREQ_* are defined here */
|
||||||
|
#include "clkctrl-imx233.h"
|
||||||
#include "power-imx233.h"
|
#include "power-imx233.h"
|
||||||
|
|
||||||
/* Digital control */
|
/* Digital control */
|
||||||
|
|
|
@ -109,7 +109,7 @@ static inline void core_sleep(void)
|
||||||
}
|
}
|
||||||
#else
|
#else
|
||||||
/* Skip this if special code is required and implemented */
|
/* Skip this if special code is required and implemented */
|
||||||
#if !(defined(CPU_PP)) && CONFIG_CPU != RK27XX
|
#if !(defined(CPU_PP)) && CONFIG_CPU != RK27XX && CONFIG_CPU != IMX233
|
||||||
static inline void core_sleep(void)
|
static inline void core_sleep(void)
|
||||||
{
|
{
|
||||||
/* TODO: core_sleep not implemented, battery life will be decreased */
|
/* TODO: core_sleep not implemented, battery life will be decreased */
|
||||||
|
|
Loading…
Reference in a new issue