1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16#include <asm/machdep.h>
17#include <asm/pci-bridge.h>
18#include <asm/ppc4xx.h>
19#include <asm/prom.h>
20#include <asm/time.h>
21#include <asm/udbg.h>
22#include <asm/uic.h>
23
24#include <linux/init.h>
25#include <linux/of_platform.h>
26
27static const struct of_device_id ppc40x_of_bus[] __initconst = {
28 { .compatible = "ibm,plb3", },
29 { .compatible = "ibm,plb4", },
30 { .compatible = "ibm,opb", },
31 { .compatible = "ibm,ebc", },
32 { .compatible = "simple-bus", },
33 {},
34};
35
36static int __init ppc40x_device_probe(void)
37{
38 of_platform_bus_probe(NULL, ppc40x_of_bus, NULL);
39
40 return 0;
41}
42machine_device_initcall(ppc40x_simple, ppc40x_device_probe);
43
44
45
46
47
48
49
50
51
52
53static const char * const board[] __initconst = {
54 "amcc,acadia",
55 "amcc,haleakala",
56 "amcc,kilauea",
57 "amcc,makalu",
58 "apm,klondike",
59 "est,hotfoot",
60 "plathome,obs600",
61 NULL
62};
63
64static int __init ppc40x_probe(void)
65{
66 if (of_device_compatible_match(of_root, board)) {
67 pci_set_flags(PCI_REASSIGN_ALL_RSRC);
68 return 1;
69 }
70
71 return 0;
72}
73
74define_machine(ppc40x_simple) {
75 .name = "PowerPC 40x Platform",
76 .probe = ppc40x_probe,
77 .progress = udbg_progress,
78 .init_IRQ = uic_init_tree,
79 .get_irq = uic_get_irq,
80 .restart = ppc4xx_reset_system,
81 .calibrate_decr = generic_calibrate_decr,
82};
83