29 #include <linux/types.h>
33 #include <asm/machdep.h>
35 #include <asm/pgtable.h>
41 static void cbe_power_save(
void)
43 unsigned long ctrl, thread_switch_control;
46 if (!prep_irq_for_idle())
49 ctrl =
mfspr(SPRN_CTRLF);
52 thread_switch_control =
mfspr(SPRN_TSC_CELL);
53 thread_switch_control |= TSC_CELL_EE_ENABLE | TSC_CELL_EE_BOOST;
55 switch (ctrl & CTRL_CT) {
57 thread_switch_control |= TSC_CELL_DEC_ENABLE_0;
60 thread_switch_control |= TSC_CELL_DEC_ENABLE_1;
67 mtspr(SPRN_TSC_CELL, thread_switch_control);
80 ctrl &= ~(CTRL_RUNLATCH | CTRL_TE);
81 mtspr(SPRN_CTRLT, ctrl);
87 static int cbe_system_reset_exception(
struct pt_regs *
regs)
89 switch (regs->
msr & SRR1_WAKEMASK) {
97 return cbe_sysreset_hack();
127 out_be64(®s->
pmcr, in_be64(®s->
pmcr) |
131 ppc_md.power_save = cbe_power_save;
132 ppc_md.system_reset_exception = cbe_system_reset_exception;