9 #include <linux/kernel.h>
11 #include <linux/slab.h>
12 #include <linux/module.h>
19 #include <asm/suspend.h>
31 static void sirfsoc_set_wakeup_source(
void)
33 u32 pwr_trigger_en_reg;
36 #define X_ON_KEY_B (1 << 0)
41 static void sirfsoc_set_sleep_mode(
u32 mode)
46 sleep_mode |= mode << 1;
51 static int sirfsoc_pre_suspend_power_off(
void)
58 sirfsoc_set_wakeup_source();
69 sirfsoc_pre_suspend_power_off();
84 .enter = sirfsoc_pm_enter,
95 { .compatible =
"sirf,prima2-pwrc" },
99 static int __init sirfsoc_of_pwrc_init(
void)
105 panic(
"unable to find compatible pwrc node in dtb\n");
113 panic(
"unable to find base address of pwrc node in dtb\n");
122 { .compatible =
"sirf,prima2-memc" },
132 panic(
"unable to map memc registers\n");
138 .probe = sirfsoc_memc_probe,
140 .name =
"sirfsoc-memc",
142 .of_match_table = memc_ids,
146 static int __init sirfsoc_memc_init(
void)