This source file includes following definitions.
- ppa8548_pic_init
- ppa8548_setup_arch
- ppa8548_show_cpuinfo
- declare_of_platform_devices
- ppa8548_probe
- define_machine
1
2
3
4
5
6
7
8
9
10
11
12
13 #include <linux/stddef.h>
14 #include <linux/kernel.h>
15 #include <linux/init.h>
16 #include <linux/reboot.h>
17 #include <linux/seq_file.h>
18 #include <linux/of_fdt.h>
19 #include <linux/of_platform.h>
20
21 #include <asm/machdep.h>
22 #include <asm/udbg.h>
23 #include <asm/mpic.h>
24
25 #include <sysdev/fsl_soc.h>
26
27 static void __init ppa8548_pic_init(void)
28 {
29 struct mpic *mpic = mpic_alloc(NULL, 0, MPIC_BIG_ENDIAN,
30 0, 256, " OpenPIC ");
31 BUG_ON(mpic == NULL);
32 mpic_init(mpic);
33 }
34
35
36
37
38 static void __init ppa8548_setup_arch(void)
39 {
40 if (ppc_md.progress)
41 ppc_md.progress("ppa8548_setup_arch()", 0);
42 }
43
44 static void ppa8548_show_cpuinfo(struct seq_file *m)
45 {
46 uint32_t svid, phid1;
47
48 svid = mfspr(SPRN_SVR);
49
50 seq_printf(m, "Vendor\t\t: Prodrive B.V.\n");
51 seq_printf(m, "SVR\t\t: 0x%x\n", svid);
52
53
54 phid1 = mfspr(SPRN_HID1);
55 seq_printf(m, "PLL setting\t: 0x%x\n", ((phid1 >> 24) & 0x3f));
56 }
57
58 static const struct of_device_id of_bus_ids[] __initconst = {
59 { .name = "soc", },
60 { .type = "soc", },
61 { .compatible = "simple-bus", },
62 { .compatible = "gianfar", },
63 { .compatible = "fsl,srio", },
64 {},
65 };
66
67 static int __init declare_of_platform_devices(void)
68 {
69 of_platform_bus_probe(NULL, of_bus_ids, NULL);
70
71 return 0;
72 }
73 machine_device_initcall(ppa8548, declare_of_platform_devices);
74
75
76
77
78 static int __init ppa8548_probe(void)
79 {
80 return of_machine_is_compatible("ppa8548");
81 }
82
83 define_machine(ppa8548) {
84 .name = "ppa8548",
85 .probe = ppa8548_probe,
86 .setup_arch = ppa8548_setup_arch,
87 .init_IRQ = ppa8548_pic_init,
88 .show_cpuinfo = ppa8548_show_cpuinfo,
89 .get_irq = mpic_get_irq,
90 .calibrate_decr = generic_calibrate_decr,
91 .progress = udbg_progress,
92 };