14 #include <linux/kernel.h>
19 #include <linux/export.h>
20 #include <asm/proc-fns.h>
23 #include <mach/cpuidle.h>
26 #define DAVINCI_CPUIDLE_MAX_STATES 2
42 if (ops && ops->
enter)
55 #define DAVINCI_CPUIDLE_FLAGS_DDR2_PWDN BIT(0)
58 .name =
"cpuidle-davinci",
60 .en_core_tk_irqen = 1,
63 .enter = davinci_enter_idle,
65 .target_residency = 100000,
68 .desc =
"WFI and DDR Self Refresh",
74 static void __iomem *ddr2_reg_base;
76 static void davinci_save_ddr_power(
int enter,
bool pdown)
95 static void davinci_c2state_enter(
u32 flags)
100 static void davinci_c2state_exit(
u32 flags)
107 .enter = davinci_c2state_enter,
108 .exit = davinci_c2state_exit,
121 dev_err(&pdev->
dev,
"cannot get platform data\n");
129 cpuidle_set_statedata(&device->
states_usage[1], &davinci_states[1]);
135 dev_err(&pdev->
dev,
"failed to register driver\n");
141 dev_err(&pdev->
dev,
"failed to register device\n");
151 .name =
"cpuidle-davinci",
156 static int __init davinci_cpuidle_init(
void)
159 davinci_cpuidle_probe);