Commit | Line | Data |
---|---|---|
545c069c JB |
1 | /* |
2 | * Architecture- / platform-specific boot-time initialization code for | |
3 | * IBM PowerPC 4xx based boards. Adapted from original | |
4 | * code by Gary Thomas, Cort Dougan <cort@fsmlabs.com>, and Dan Malek | |
5 | * <dan@net4x.com>. | |
6 | * | |
7 | * Copyright(c) 1999-2000 Grant Erickson <grant@lcse.umn.edu> | |
8 | * | |
9 | * Rewritten and ported to the merged powerpc tree: | |
10 | * Copyright 2007 IBM Corporation | |
11 | * Josh Boyer <jwboyer@linux.vnet.ibm.com> | |
12 | * | |
13 | * 2002 (c) MontaVista, Software, Inc. This file is licensed under | |
14 | * the terms of the GNU General Public License version 2. This program | |
15 | * is licensed "as is" without any warranty of any kind, whether express | |
16 | * or implied. | |
17 | */ | |
18 | ||
19 | #include <linux/init.h> | |
ed08aff7 | 20 | #include <linux/of_platform.h> |
fde9d16f | 21 | #include <linux/rtc.h> |
ed08aff7 | 22 | |
545c069c JB |
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> | |
25c24f3d | 28 | #include <asm/pci-bridge.h> |
93173ce2 | 29 | #include <asm/ppc4xx.h> |
545c069c | 30 | |
ce6d73c9 | 31 | static const struct of_device_id walnut_of_bus[] __initconst = { |
545c069c JB |
32 | { .compatible = "ibm,plb3", }, |
33 | { .compatible = "ibm,opb", }, | |
34 | { .compatible = "ibm,ebc", }, | |
35 | {}, | |
36 | }; | |
37 | ||
38 | static int __init walnut_device_probe(void) | |
39 | { | |
545c069c | 40 | of_platform_bus_probe(NULL, walnut_of_bus, NULL); |
22258fa4 | 41 | of_instantiate_rtc(); |
545c069c JB |
42 | |
43 | return 0; | |
44 | } | |
3f8c5c3b | 45 | machine_device_initcall(walnut, walnut_device_probe); |
545c069c JB |
46 | |
47 | static int __init walnut_probe(void) | |
48 | { | |
56571384 | 49 | if (!of_machine_is_compatible("ibm,walnut")) |
545c069c JB |
50 | return 0; |
51 | ||
0e47ff1c | 52 | pci_set_flags(PCI_REASSIGN_ALL_RSRC); |
25c24f3d | 53 | |
545c069c JB |
54 | return 1; |
55 | } | |
56 | ||
545c069c JB |
57 | define_machine(walnut) { |
58 | .name = "Walnut", | |
59 | .probe = walnut_probe, | |
545c069c JB |
60 | .progress = udbg_progress, |
61 | .init_IRQ = uic_init_tree, | |
62 | .get_irq = uic_get_irq, | |
93173ce2 SR |
63 | .restart = ppc4xx_reset_system, |
64 | .calibrate_decr = generic_calibrate_decr, | |
545c069c | 65 | }; |