This source file includes following definitions.
- ps3_sys_manager_register_ops
 
- ps3_sys_manager_power_off
 
- ps3_sys_manager_restart
 
- ps3_sys_manager_halt
 
   1 
   2 
   3 
   4 
   5 
   6 
   7 
   8 
   9 #include <linux/kernel.h>
  10 #include <linux/export.h>
  11 #include <asm/lv1call.h>
  12 #include <asm/ps3.h>
  13 
  14 
  15 
  16 
  17 
  18 
  19 static struct ps3_sys_manager_ops ps3_sys_manager_ops;
  20 
  21 
  22 
  23 
  24 
  25 
  26 
  27 
  28 
  29 
  30 void ps3_sys_manager_register_ops(const struct ps3_sys_manager_ops *ops)
  31 {
  32         BUG_ON(!ops);
  33         BUG_ON(!ops->dev);
  34         ps3_sys_manager_ops = ops ? *ops : ps3_sys_manager_ops;
  35 }
  36 EXPORT_SYMBOL_GPL(ps3_sys_manager_register_ops);
  37 
  38 void __noreturn ps3_sys_manager_power_off(void)
  39 {
  40         if (ps3_sys_manager_ops.power_off)
  41                 ps3_sys_manager_ops.power_off(ps3_sys_manager_ops.dev);
  42 
  43         ps3_sys_manager_halt();
  44 }
  45 
  46 void __noreturn ps3_sys_manager_restart(void)
  47 {
  48         if (ps3_sys_manager_ops.restart)
  49                 ps3_sys_manager_ops.restart(ps3_sys_manager_ops.dev);
  50 
  51         ps3_sys_manager_halt();
  52 }
  53 
  54 void __noreturn ps3_sys_manager_halt(void)
  55 {
  56         pr_emerg("System Halted, OK to turn off power\n");
  57         local_irq_disable();
  58         while (1)
  59                 lv1_pause(1);
  60 }
  61