2 * Generic PowerPC 40x platform support
4 * Copyright 2008 IBM Corporation
6 * This program is free software; you can redistribute it and/or modify it
7 * under the terms of the GNU General Public License as published by the
8 * Free Software Foundation; version 2 of the License.
10 * This implements simple platform support for PowerPC 44x chips. This is
11 * mostly used for eval boards or other simple and "generic" 44x boards. If
12 * your board has custom functions or hardware, then you will likely want to
13 * implement your own board.c file to accommodate it.
16 #include <asm/machdep.h>
17 #include <asm/pci-bridge.h>
18 #include <asm/ppc4xx.h>
24 #include <linux/init.h>
25 #include <linux/of_platform.h>
27 static __initdata struct of_device_id ppc40x_of_bus[] = {
28 { .compatible = "ibm,plb3", },
29 { .compatible = "ibm,plb4", },
30 { .compatible = "ibm,opb", },
31 { .compatible = "ibm,ebc", },
32 { .compatible = "simple-bus", },
36 static int __init ppc40x_device_probe(void)
38 of_platform_bus_probe(NULL, ppc40x_of_bus, NULL);
42 machine_device_initcall(ppc40x_simple, ppc40x_device_probe);
44 /* This is the list of boards that can be supported by this simple
45 * platform code. This does _not_ mean the boards are compatible,
46 * as they most certainly are not from a device tree perspective.
47 * However, their differences are handled by the device tree and the
48 * drivers and therefore they don't need custom board support files.
50 * Again, if your board needs to do things differently then create a
51 * board.c file for it rather than adding it to this list.
53 static char *board[] __initdata = {
57 static int __init ppc40x_probe(void)
59 unsigned long root = of_get_flat_dt_root();
62 for (i = 0; i < ARRAY_SIZE(board); i++) {
63 if (of_flat_dt_is_compatible(root, board[i])) {
64 ppc_pci_flags = PPC_PCI_REASSIGN_ALL_RSRC;
72 define_machine(ppc40x_simple) {
73 .name = "PowerPC 40x Platform",
74 .probe = ppc40x_probe,
75 .progress = udbg_progress,
76 .init_IRQ = uic_init_tree,
77 .get_irq = uic_get_irq,
78 .restart = ppc4xx_reset_system,
79 .calibrate_decr = generic_calibrate_decr,