28 #define BITP_ROM_WUA_CHKHDR 24
29 #define BITP_ROM_WUA_DDRLOCK 7
30 #define BITP_ROM_WUA_DDRDLLEN 6
31 #define BITP_ROM_WUA_DDR 5
32 #define BITP_ROM_WUA_CGU 4
33 #define BITP_ROM_WUA_MEMBOOT 2
34 #define BITP_ROM_WUA_EN 1
36 #define BITM_ROM_WUA_CHKHDR (0xFF000000)
37 #define ENUM_ROM_WUA_CHKHDR_AD 0xAD000000
39 #define BITM_ROM_WUA_DDRLOCK (0x00000080)
40 #define BITM_ROM_WUA_DDRDLLEN (0x00000040)
41 #define BITM_ROM_WUA_DDR (0x00000020)
42 #define BITM_ROM_WUA_CGU (0x00000010)
43 #define BITM_ROM_WUA_MEMBOOT (0x00000002)
44 #define BITM_ROM_WUA_EN (0x00000001)
51 #define BITP_ROM_SYSCTRL_CGU_LOCKINGEN 28
52 #define BITP_ROM_SYSCTRL_WUA_OVERRIDE 24
53 #define BITP_ROM_SYSCTRL_WUA_DDRDLLEN 20
54 #define BITP_ROM_SYSCTRL_WUA_DDR 19
55 #define BITP_ROM_SYSCTRL_WUA_CGU 18
56 #define BITP_ROM_SYSCTRL_WUA_DPMWRITE 17
57 #define BITP_ROM_SYSCTRL_WUA_EN 16
58 #define BITP_ROM_SYSCTRL_DDR_WRITE 13
59 #define BITP_ROM_SYSCTRL_DDR_READ 12
60 #define BITP_ROM_SYSCTRL_CGU_AUTODIS 11
61 #define BITP_ROM_SYSCTRL_CGU_CLKOUTSEL 7
62 #define BITP_ROM_SYSCTRL_CGU_DIV 6
63 #define BITP_ROM_SYSCTRL_CGU_STAT 5
64 #define BITP_ROM_SYSCTRL_CGU_CTL 4
65 #define BITP_ROM_SYSCTRL_CGU_RTNSTAT 2
66 #define BITP_ROM_SYSCTRL_WRITE 1
67 #define BITP_ROM_SYSCTRL_READ 0
69 #define BITM_ROM_SYSCTRL_CGU_READ (0x00000001)
70 #define BITM_ROM_SYSCTRL_CGU_WRITE (0x00000002)
71 #define BITM_ROM_SYSCTRL_CGU_RTNSTAT (0x00000004)
72 #define BITM_ROM_SYSCTRL_CGU_CTL (0x00000010)
73 #define BITM_ROM_SYSCTRL_CGU_STAT (0x00000020)
74 #define BITM_ROM_SYSCTRL_CGU_DIV (0x00000040)
75 #define BITM_ROM_SYSCTRL_CGU_CLKOUTSEL (0x00000080)
76 #define BITM_ROM_SYSCTRL_CGU_AUTODIS (0x00000800)
77 #define BITM_ROM_SYSCTRL_DDR_READ (0x00001000)
78 #define BITM_ROM_SYSCTRL_DDR_WRITE (0x00002000)
79 #define BITM_ROM_SYSCTRL_WUA_EN (0x00010000)
80 #define BITM_ROM_SYSCTRL_WUA_DPMWRITE (0x00020000)
81 #define BITM_ROM_SYSCTRL_WUA_CGU (0x00040000)
82 #define BITM_ROM_SYSCTRL_WUA_DDR (0x00080000)
83 #define BITM_ROM_SYSCTRL_WUA_DDRDLLEN (0x00100000)
84 #define BITM_ROM_SYSCTRL_WUA_OVERRIDE (0x01000000)
85 #define BITM_ROM_SYSCTRL_CGU_LOCKINGEN (0x10000000)
121 #define FUNC_ROM_SYSCONTROL 0xC8000080
126 void bfin_cpu_suspend(
void)
136 void bf609_ddr_sr(
void)
138 dmc_enter_self_refresh();
142 void bf609_ddr_sr_exit(
void)
144 dmc_exit_self_refresh();
154 void bf609_resume_ccbuf(
void)
163 void bfin_hibernate_syscontrol(
void)
177 #define IRQ_SID(irq) ((irq) - IVG15)
181 void bfin_deepsleep(
unsigned long mask,
unsigned long pol_mask)
202 unsigned long wakeup = 0;
203 unsigned long wakeup_pol = 0;
205 #ifdef CONFIG_PM_BFIN_WAKE_PA15
207 # if CONFIG_PM_BFIN_WAKE_PA15_POL
208 wakeup_pol |= PA15WE;
212 #ifdef CONFIG_PM_BFIN_WAKE_PB15
214 # if CONFIG_PM_BFIN_WAKE_PA15_POL
215 wakeup_pol |= PB15WE;
219 #ifdef CONFIG_PM_BFIN_WAKE_PC15
221 # if CONFIG_PM_BFIN_WAKE_PC15_POL
222 wakeup_pol |= PC15WE;
226 #ifdef CONFIG_PM_BFIN_WAKE_PD06
228 # if CONFIG_PM_BFIN_WAKE_PD06_POL
229 wakeup_pol |= PD06WE;
233 #ifdef CONFIG_PM_BFIN_WAKE_PE12
235 # if CONFIG_PM_BFIN_WAKE_PE12_POL
236 wakeup_pol |= PE12WE;
240 #ifdef CONFIG_PM_BFIN_WAKE_PG04
242 # if CONFIG_PM_BFIN_WAKE_PG04_POL
243 wakeup_pol |= PG04WE;
247 #ifdef CONFIG_PM_BFIN_WAKE_PG13
249 # if CONFIG_PM_BFIN_WAKE_PG13_POL
250 wakeup_pol |= PG13WE;
254 #ifdef CONFIG_PM_BFIN_WAKE_USB
256 # if CONFIG_PM_BFIN_WAKE_USB_POL
269 bfin_deepsleep(wakeup, wakeup_pol);
292 #if defined(CONFIG_MTD_PHYSMAP) || defined(CONFIG_MTD_PHYSMAP_MODULE)
293 static int smc_pm_syscore_suspend(
void)
299 static void smc_pm_syscore_resume(
void)
305 .
suspend = smc_pm_syscore_suspend,
306 .resume = smc_pm_syscore_resume,
325 static int __init bf609_init_pm(
void)
330 #if defined(CONFIG_MTD_PHYSMAP) || defined(CONFIG_MTD_PHYSMAP_MODULE)
334 #ifdef CONFIG_PM_BFIN_WAKE_PE12