Linux Kernel  3.7.1
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
psr2.c
Go to the documentation of this file.
1 /*
2  * Copyright 2008-2011, IBM Corporation
3  *
4  * This program is free software; you can redistribute it and/or
5  * modify it under the terms of the GNU General Public License
6  * as published by the Free Software Foundation; either version
7  * 2 of the License, or (at your option) any later version.
8  */
9 
10 #include <linux/delay.h>
11 #include <linux/init.h>
12 #include <linux/irq.h>
13 #include <linux/kernel.h>
14 #include <linux/mm.h>
15 #include <linux/of.h>
16 #include <linux/smp.h>
17 #include <linux/time.h>
18 
19 #include <asm/machdep.h>
20 #include <asm/udbg.h>
21 
22 #include "ics.h"
23 #include "wsp.h"
24 
25 
26 static void psr2_spin(void)
27 {
29  for (;;)
30  continue;
31 }
32 
33 static void psr2_restart(char *cmd)
34 {
35  psr2_spin();
36 }
37 
38 static int __init psr2_probe(void)
39 {
40  unsigned long root = of_get_flat_dt_root();
41 
42  if (of_flat_dt_is_compatible(root, "ibm,wsp-chroma")) {
43  /* chroma systems also claim they are psr2s */
44  return 0;
45  }
46 
47  if (!of_flat_dt_is_compatible(root, "ibm,psr2"))
48  return 0;
49 
50  return 1;
51 }
52 
53 define_machine(psr2_md) {
54  .name = "PSR2 A2",
55  .probe = psr2_probe,
56  .setup_arch = wsp_setup_arch,
57  .restart = psr2_restart,
58  .power_off = psr2_spin,
59  .halt = psr2_spin,
60  .calibrate_decr = generic_calibrate_decr,
61  .init_IRQ = wsp_setup_irq,
62  .progress = udbg_progress,
63  .power_save = book3e_idle,
64 };
65