34 #include <linux/sysctl.h>
37 #include <asm/uaccess.h>
50 static unsigned int sleep_sys_clocks[5];
51 static unsigned int sleep_sys_pinfunc;
52 static unsigned int sleep_static_memctlr[4][3];
55 static void save_core_regs(
void)
68 sleep_static_memctlr[0][0] = au_readl(
MEM_STCFG0);
71 sleep_static_memctlr[1][0] = au_readl(
MEM_STCFG1);
74 sleep_static_memctlr[2][0] = au_readl(
MEM_STCFG2);
77 sleep_static_memctlr[3][0] = au_readl(
MEM_STCFG3);
82 static void restore_core_regs(
void)
93 if (!au1xxx_cpu_has_pll_wo())
101 au_writel(sleep_static_memctlr[0][0],
MEM_STCFG0);
102 au_writel(sleep_static_memctlr[0][1],
MEM_STTIME0);
103 au_writel(sleep_static_memctlr[0][2],
MEM_STADDR0);
104 au_writel(sleep_static_memctlr[1][0],
MEM_STCFG1);
105 au_writel(sleep_static_memctlr[1][1],
MEM_STTIME1);
106 au_writel(sleep_static_memctlr[1][2],
MEM_STADDR1);
107 au_writel(sleep_static_memctlr[2][0],
MEM_STCFG2);
108 au_writel(sleep_static_memctlr[2][1],
MEM_STTIME2);
109 au_writel(sleep_static_memctlr[2][2],
MEM_STADDR2);
110 au_writel(sleep_static_memctlr[3][0],
MEM_STCFG3);
111 au_writel(sleep_static_memctlr[3][1],
MEM_STTIME3);
112 au_writel(sleep_static_memctlr[3][2],
MEM_STADDR3);
119 switch (alchemy_get_cputype()) {