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