1 --- a/arch/powerpc/platforms/40x/Kconfig
2 +++ b/arch/powerpc/platforms/40x/Kconfig
5 # This option enables support for the CPCI405 board.
11 + select PPC40x_SIMPLE
14 + This option enables support for the AMCC 405EZ Acadia evaluation board.
19 @@ -93,6 +102,13 @@ config XILINX_VIRTEX_GENERIC_BOARD
20 Most Virtex designs should use this unless it needs to do some
21 special configuration at board probe time.
24 + bool "Simple PowerPC 40x board support"
28 + This option enables the simple PowerPC 40x platform support.
30 # 40x specific CPU modules, selected based on the board above.
33 @@ -118,6 +134,12 @@ config 405EX
34 select IBM_NEW_EMAC_EMAC4
35 select IBM_NEW_EMAC_RGMII
39 + select IBM_NEW_EMAC_NO_FLOW_CTRL
40 + select IBM_NEW_EMAC_MAL_CLR_ICINTSTAT
41 + select IBM_NEW_EMAC_MAL_COMMON_ERR
46 --- a/arch/powerpc/platforms/40x/Makefile
47 +++ b/arch/powerpc/platforms/40x/Makefile
48 @@ -3,3 +3,4 @@ obj-$(CONFIG_MAKALU) += makalu.o
49 obj-$(CONFIG_WALNUT) += walnut.o
50 obj-$(CONFIG_XILINX_VIRTEX_GENERIC_BOARD) += virtex.o
51 obj-$(CONFIG_EP405) += ep405.o
52 +obj-$(CONFIG_PPC40x_SIMPLE) += ppc40x_simple.o
54 +++ b/arch/powerpc/platforms/40x/ppc40x_simple.c
57 + * Generic PowerPC 40x platform support
59 + * Copyright 2008 IBM Corporation
61 + * This program is free software; you can redistribute it and/or modify it
62 + * under the terms of the GNU General Public License as published by the
63 + * Free Software Foundation; version 2 of the License.
65 + * This implements simple platform support for PowerPC 44x chips. This is
66 + * mostly used for eval boards or other simple and "generic" 44x boards. If
67 + * your board has custom functions or hardware, then you will likely want to
68 + * implement your own board.c file to accommodate it.
71 +#include <asm/machdep.h>
72 +#include <asm/pci-bridge.h>
73 +#include <asm/ppc4xx.h>
74 +#include <asm/prom.h>
75 +#include <asm/time.h>
76 +#include <asm/udbg.h>
79 +#include <linux/init.h>
80 +#include <linux/of_platform.h>
82 +static __initdata struct of_device_id ppc40x_of_bus[] = {
83 + { .compatible = "ibm,plb3", },
84 + { .compatible = "ibm,plb4", },
85 + { .compatible = "ibm,opb", },
86 + { .compatible = "ibm,ebc", },
87 + { .compatible = "simple-bus", },
91 +static int __init ppc40x_device_probe(void)
93 + of_platform_bus_probe(NULL, ppc40x_of_bus, NULL);
97 +machine_device_initcall(ppc40x_simple, ppc40x_device_probe);
99 +/* This is the list of boards that can be supported by this simple
100 + * platform code. This does _not_ mean the boards are compatible,
101 + * as they most certainly are not from a device tree perspective.
102 + * However, their differences are handled by the device tree and the
103 + * drivers and therefore they don't need custom board support files.
105 + * Again, if your board needs to do things differently then create a
106 + * board.c file for it rather than adding it to this list.
108 +static char *board[] __initdata = {
112 +static int __init ppc40x_probe(void)
114 + unsigned long root = of_get_flat_dt_root();
117 + for (i = 0; i < ARRAY_SIZE(board); i++) {
118 + if (of_flat_dt_is_compatible(root, board[i])) {
119 + ppc_pci_flags = PPC_PCI_REASSIGN_ALL_RSRC;
127 +define_machine(ppc40x_simple) {
128 + .name = "PowerPC 40x Platform",
129 + .probe = ppc40x_probe,
130 + .progress = udbg_progress,
131 + .init_IRQ = uic_init_tree,
132 + .get_irq = uic_get_irq,
133 + .restart = ppc4xx_reset_system,
134 + .calibrate_decr = generic_calibrate_decr,