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 ppc44x_of_bus[] __initconst = {
28 { .compatible = "ibm,plb4", },
29 { .compatible = "ibm,opb", },
30 { .compatible = "ibm,ebc", },
31 { .compatible = "simple-bus", },
32 {},
33};
34
35static int __init ppc44x_device_probe(void)
36{
37 of_platform_bus_probe(NULL, ppc44x_of_bus, NULL);
38
39 return 0;
40}
41machine_device_initcall(ppc44x_simple, ppc44x_device_probe);
42
43
44
45
46
47
48
49
50
51
52static char *board[] __initdata = {
53 "amcc,arches",
54 "amcc,bamboo",
55 "apm,bluestone",
56 "amcc,glacier",
57 "ibm,ebony",
58 "amcc,eiger",
59 "amcc,katmai",
60 "amcc,rainier",
61 "amcc,redwood",
62 "amcc,sequoia",
63 "amcc,taishan",
64 "amcc,yosemite",
65 "mosaixtech,icon"
66};
67
68static int __init ppc44x_probe(void)
69{
70 unsigned long root = of_get_flat_dt_root();
71 int i = 0;
72
73 for (i = 0; i < ARRAY_SIZE(board); i++) {
74 if (of_flat_dt_is_compatible(root, board[i])) {
75 pci_set_flags(PCI_REASSIGN_ALL_RSRC);
76 return 1;
77 }
78 }
79
80 return 0;
81}
82
83define_machine(ppc44x_simple) {
84 .name = "PowerPC 44x Platform",
85 .probe = ppc44x_probe,
86 .progress = udbg_progress,
87 .init_IRQ = uic_init_tree,
88 .get_irq = uic_get_irq,
89 .restart = ppc4xx_reset_system,
90 .calibrate_decr = generic_calibrate_decr,
91};
92