1 // SPDX-License-Identifier: GPL-2.0-only
3 * Generic PowerPC 40x platform support
5 * Copyright 2008 IBM Corporation
7 * This implements simple platform support for PowerPC 44x chips. This is
8 * mostly used for eval boards or other simple and "generic" 44x boards. If
9 * your board has custom functions or hardware, then you will likely want to
10 * implement your own board.c file to accommodate it.
13 #include <asm/machdep.h>
14 #include <asm/pci-bridge.h>
15 #include <asm/ppc4xx.h>
21 #include <linux/init.h>
22 #include <linux/of_platform.h>
24 static 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", },
33 static int __init ppc40x_device_probe(void)
35 of_platform_bus_probe(NULL, ppc40x_of_bus, NULL);
39 machine_device_initcall(ppc40x_simple, ppc40x_device_probe);
41 /* This is the list of boards that can be supported by this simple
42 * platform code. This does _not_ mean the boards are compatible,
43 * as they most certainly are not from a device tree perspective.
44 * However, their differences are handled by the device tree and the
45 * drivers and therefore they don't need custom board support files.
47 * Again, if your board needs to do things differently then create a
48 * board.c file for it rather than adding it to this list.
50 static const char * const board[] __initconst = {
61 static int __init ppc40x_probe(void)
63 if (of_device_compatible_match(of_root, board)) {
64 pci_set_flags(PCI_REASSIGN_ALL_RSRC);
71 define_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,