1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19#include <linux/init.h>
20#include <linux/of_platform.h>
21#include <linux/rtc.h>
22
23#include <asm/machdep.h>
24#include <asm/prom.h>
25#include <asm/udbg.h>
26#include <asm/time.h>
27#include <asm/uic.h>
28#include <asm/pci-bridge.h>
29#include <asm/ppc4xx.h>
30
31static const struct of_device_id walnut_of_bus[] __initconst = {
32 { .compatible = "ibm,plb3", },
33 { .compatible = "ibm,opb", },
34 { .compatible = "ibm,ebc", },
35 {},
36};
37
38static int __init walnut_device_probe(void)
39{
40 of_platform_bus_probe(NULL, walnut_of_bus, NULL);
41 of_instantiate_rtc();
42
43 return 0;
44}
45machine_device_initcall(walnut, walnut_device_probe);
46
47static int __init walnut_probe(void)
48{
49 if (!of_machine_is_compatible("ibm,walnut"))
50 return 0;
51
52 pci_set_flags(PCI_REASSIGN_ALL_RSRC);
53
54 return 1;
55}
56
57define_machine(walnut) {
58 .name = "Walnut",
59 .probe = walnut_probe,
60 .progress = udbg_progress,
61 .init_IRQ = uic_init_tree,
62 .get_irq = uic_get_irq,
63 .restart = ppc4xx_reset_system,
64 .calibrate_decr = generic_calibrate_decr,
65};
66