aboutsummaryrefslogtreecommitdiffstats
path: root/arch/powerpc/platforms/40x
diff options
context:
space:
mode:
authorJosh Boyer <jwboyer@linux.vnet.ibm.com>2008-09-03 20:58:22 -0400
committerJosh Boyer <jwboyer@linux.vnet.ibm.com>2008-10-17 10:31:18 -0400
commit8105fa88593c87f8aba0e7e829d7dc0ee94fe2cf (patch)
tree4ed396580dfdcced402f31b1ead260482c7677c6 /arch/powerpc/platforms/40x
parentdf8f71faa8e9b8b8df8b22b57889630fece25696 (diff)
powerpc/40x: Add PowerPC 40x simple platform support
This adds a common board file for almost all of the "simple" PowerPC 40x boards that exist today. This is intended to be a single place to add support for boards that do not differ in platform support from most of the evaluation boards that are used as reference platforms. Boards that have specific requirements or custom hardware setup should still have their own board.c file. The first board ported to this is the AMCC PowerPC 405EZ Acadia board. Signed-off-by: Josh Boyer <jwboyer@linux.vnet.ibm.com>
Diffstat (limited to 'arch/powerpc/platforms/40x')
-rw-r--r--arch/powerpc/platforms/40x/Kconfig22
-rw-r--r--arch/powerpc/platforms/40x/Makefile1
-rw-r--r--arch/powerpc/platforms/40x/ppc40x_simple.c80
3 files changed, 103 insertions, 0 deletions
diff --git a/arch/powerpc/platforms/40x/Kconfig b/arch/powerpc/platforms/40x/Kconfig
index a9260e21451e..72ba3a7289fe 100644
--- a/arch/powerpc/platforms/40x/Kconfig
+++ b/arch/powerpc/platforms/40x/Kconfig
@@ -14,6 +14,15 @@
14# help 14# help
15# This option enables support for the CPCI405 board. 15# This option enables support for the CPCI405 board.
16 16
17config ACADIA
18 bool "Acadia"
19 depends on 40x
20 default n
21 select PPC40x_SIMPLE
22 select 405EZ
23 help
24 This option enables support for the AMCC 405EZ Acadia evaluation board.
25
17config EP405 26config EP405
18 bool "EP405/EP405PC" 27 bool "EP405/EP405PC"
19 depends on 40x 28 depends on 40x
@@ -93,6 +102,13 @@ config XILINX_VIRTEX_GENERIC_BOARD
93 Most Virtex designs should use this unless it needs to do some 102 Most Virtex designs should use this unless it needs to do some
94 special configuration at board probe time. 103 special configuration at board probe time.
95 104
105config PPC40x_SIMPLE
106 bool "Simple PowerPC 40x board support"
107 depends on 40x
108 default n
109 help
110 This option enables the simple PowerPC 40x platform support.
111
96# 40x specific CPU modules, selected based on the board above. 112# 40x specific CPU modules, selected based on the board above.
97config NP405H 113config NP405H
98 bool 114 bool
@@ -118,6 +134,12 @@ config 405EX
118 select IBM_NEW_EMAC_EMAC4 134 select IBM_NEW_EMAC_EMAC4
119 select IBM_NEW_EMAC_RGMII 135 select IBM_NEW_EMAC_RGMII
120 136
137config 405EZ
138 bool
139 select IBM_NEW_EMAC_NO_FLOW_CTRL
140 select IBM_NEW_EMAC_MAL_CLR_ICINTSTAT
141 select IBM_NEW_EMAC_MAL_COMMON_ERR
142
121config 405GPR 143config 405GPR
122 bool 144 bool
123 145
diff --git a/arch/powerpc/platforms/40x/Makefile b/arch/powerpc/platforms/40x/Makefile
index 5533a5c8ce4e..1d93273a1db1 100644
--- a/arch/powerpc/platforms/40x/Makefile
+++ b/arch/powerpc/platforms/40x/Makefile
@@ -3,3 +3,4 @@ obj-$(CONFIG_MAKALU) += makalu.o
3obj-$(CONFIG_WALNUT) += walnut.o 3obj-$(CONFIG_WALNUT) += walnut.o
4obj-$(CONFIG_XILINX_VIRTEX_GENERIC_BOARD) += virtex.o 4obj-$(CONFIG_XILINX_VIRTEX_GENERIC_BOARD) += virtex.o
5obj-$(CONFIG_EP405) += ep405.o 5obj-$(CONFIG_EP405) += ep405.o
6obj-$(CONFIG_PPC40x_SIMPLE) += ppc40x_simple.o
diff --git a/arch/powerpc/platforms/40x/ppc40x_simple.c b/arch/powerpc/platforms/40x/ppc40x_simple.c
new file mode 100644
index 000000000000..4498a86b46c3
--- /dev/null
+++ b/arch/powerpc/platforms/40x/ppc40x_simple.c
@@ -0,0 +1,80 @@
1/*
2 * Generic PowerPC 40x platform support
3 *
4 * Copyright 2008 IBM Corporation
5 *
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.
9 *
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.
14 */
15
16#include <asm/machdep.h>
17#include <asm/pci-bridge.h>
18#include <asm/ppc4xx.h>
19#include <asm/prom.h>
20#include <asm/time.h>
21#include <asm/udbg.h>
22#include <asm/uic.h>
23
24#include <linux/init.h>
25#include <linux/of_platform.h>
26
27static __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", },
33 {},
34};
35
36static int __init ppc40x_device_probe(void)
37{
38 of_platform_bus_probe(NULL, ppc40x_of_bus, NULL);
39
40 return 0;
41}
42machine_device_initcall(ppc40x_simple, ppc40x_device_probe);
43
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.
49 *
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.
52 */
53static char *board[] __initdata = {
54 "amcc,acadia"
55};
56
57static int __init ppc40x_probe(void)
58{
59 unsigned long root = of_get_flat_dt_root();
60 int i = 0;
61
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;
65 return 1;
66 }
67 }
68
69 return 0;
70}
71
72define_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,
80};