aboutsummaryrefslogtreecommitdiffstats
path: root/arch/powerpc/platforms/83xx
diff options
context:
space:
mode:
authorMichael Barkowski <michael.barkowski@freescale.com>2007-03-19 10:15:28 -0400
committerKumar Gala <galak@kernel.crashing.org>2007-03-29 15:54:39 -0400
commit23308c54d559a210019a576c5741cfb762af69d6 (patch)
tree1f72655a46689747eccb3f9ca7f4e526ce6e9b69 /arch/powerpc/platforms/83xx
parent1a4d9399a921c287eb175d29f288d1d92d02b302 (diff)
[POWERPC] 83xx: Add MPC832x RDB board support.
Add support for the MPC8323E Reference Development Board (RDB). The board is a mini-ITX reference board with 64M DDR2, 16M flash, USB, PCI, 10/100 ethernet, serial, and phone ports. Signed-off-by: Michael Barkowski <michael.barkowski@freescale.com> Signed-off-by: Kim Phillips <kim.phillips@freescale.com> Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
Diffstat (limited to 'arch/powerpc/platforms/83xx')
-rw-r--r--arch/powerpc/platforms/83xx/Kconfig9
-rw-r--r--arch/powerpc/platforms/83xx/Makefile1
-rw-r--r--arch/powerpc/platforms/83xx/mpc832x_rdb.c138
3 files changed, 147 insertions, 1 deletions
diff --git a/arch/powerpc/platforms/83xx/Kconfig b/arch/powerpc/platforms/83xx/Kconfig
index 713b31a16ce9..2a23392bb92e 100644
--- a/arch/powerpc/platforms/83xx/Kconfig
+++ b/arch/powerpc/platforms/83xx/Kconfig
@@ -18,6 +18,13 @@ config MPC832x_MDS
18 help 18 help
19 This option enables support for the MPC832x MDS evaluation board. 19 This option enables support for the MPC832x MDS evaluation board.
20 20
21config MPC832x_RDB
22 bool "Freescale MPC832x RDB"
23 select DEFAULT_UIMAGE
24 select QUICC_ENGINE
25 help
26 This option enables support for the MPC8323 RDB board.
27
21config MPC834x_MDS 28config MPC834x_MDS
22 bool "Freescale MPC834x MDS" 29 bool "Freescale MPC834x MDS"
23 select DEFAULT_UIMAGE 30 select DEFAULT_UIMAGE
@@ -57,7 +64,7 @@ config PPC_MPC832x
57 bool 64 bool
58 select PPC_UDBG_16550 65 select PPC_UDBG_16550
59 select PPC_INDIRECT_PCI 66 select PPC_INDIRECT_PCI
60 default y if MPC832x_MDS 67 default y if MPC832x_MDS || MPC832x_RDB
61 68
62config MPC834x 69config MPC834x
63 bool 70 bool
diff --git a/arch/powerpc/platforms/83xx/Makefile b/arch/powerpc/platforms/83xx/Makefile
index dfc970d0df10..31a91b53f528 100644
--- a/arch/powerpc/platforms/83xx/Makefile
+++ b/arch/powerpc/platforms/83xx/Makefile
@@ -4,6 +4,7 @@
4obj-y := misc.o 4obj-y := misc.o
5obj-$(CONFIG_PCI) += pci.o 5obj-$(CONFIG_PCI) += pci.o
6obj-$(CONFIG_MPC8313_RDB) += mpc8313_rdb.o 6obj-$(CONFIG_MPC8313_RDB) += mpc8313_rdb.o
7obj-$(CONFIG_MPC832x_RDB) += mpc832x_rdb.o
7obj-$(CONFIG_MPC834x_MDS) += mpc834x_mds.o 8obj-$(CONFIG_MPC834x_MDS) += mpc834x_mds.o
8obj-$(CONFIG_MPC834x_ITX) += mpc834x_itx.o 9obj-$(CONFIG_MPC834x_ITX) += mpc834x_itx.o
9obj-$(CONFIG_MPC836x_MDS) += mpc836x_mds.o 10obj-$(CONFIG_MPC836x_MDS) += mpc836x_mds.o
diff --git a/arch/powerpc/platforms/83xx/mpc832x_rdb.c b/arch/powerpc/platforms/83xx/mpc832x_rdb.c
new file mode 100644
index 000000000000..6b71e9ffb11a
--- /dev/null
+++ b/arch/powerpc/platforms/83xx/mpc832x_rdb.c
@@ -0,0 +1,138 @@
1/*
2 * arch/powerpc/platforms/83xx/mpc832x_rdb.c
3 *
4 * Copyright (C) Freescale Semiconductor, Inc. 2007. All rights reserved.
5 *
6 * Description:
7 * MPC832x RDB board specific routines.
8 * This file is based on mpc832x_mds.c and mpc8313_rdb.c
9 * Author: Michael Barkowski <michael.barkowski@freescale.com>
10 *
11 * This program is free software; you can redistribute it and/or modify it
12 * under the terms of the GNU General Public License as published by the
13 * Free Software Foundation; either version 2 of the License, or (at your
14 * option) any later version.
15 */
16
17#include <linux/pci.h>
18
19#include <asm/of_platform.h>
20#include <asm/time.h>
21#include <asm/ipic.h>
22#include <asm/udbg.h>
23#include <asm/qe.h>
24#include <asm/qe_ic.h>
25
26#include "mpc83xx.h"
27
28#undef DEBUG
29#ifdef DEBUG
30#define DBG(fmt...) udbg_printf(fmt)
31#else
32#define DBG(fmt...)
33#endif
34
35#ifndef CONFIG_PCI
36unsigned long isa_io_base = 0;
37unsigned long isa_mem_base = 0;
38#endif
39
40/* ************************************************************************
41 *
42 * Setup the architecture
43 *
44 */
45static void __init mpc832x_rdb_setup_arch(void)
46{
47 struct device_node *np;
48
49 if (ppc_md.progress)
50 ppc_md.progress("mpc832x_rdb_setup_arch()", 0);
51
52#ifdef CONFIG_PCI
53 for (np = NULL; (np = of_find_node_by_type(np, "pci")) != NULL;)
54 add_bridge(np);
55
56 ppc_md.pci_exclude_device = mpc83xx_exclude_device;
57#endif
58
59#ifdef CONFIG_QUICC_ENGINE
60 qe_reset();
61
62 if ((np = of_find_node_by_name(np, "par_io")) != NULL) {
63 par_io_init(np);
64 of_node_put(np);
65
66 for (np = NULL; (np = of_find_node_by_name(np, "ucc")) != NULL;)
67 par_io_of_config(np);
68 }
69#endif /* CONFIG_QUICC_ENGINE */
70}
71
72static struct of_device_id mpc832x_ids[] = {
73 { .type = "soc", },
74 { .compatible = "soc", },
75 { .type = "qe", },
76 {},
77};
78
79static int __init mpc832x_declare_of_platform_devices(void)
80{
81 if (!machine_is(mpc832x_rdb))
82 return 0;
83
84 /* Publish the QE devices */
85 of_platform_bus_probe(NULL, mpc832x_ids, NULL);
86
87 return 0;
88}
89device_initcall(mpc832x_declare_of_platform_devices);
90
91void __init mpc832x_rdb_init_IRQ(void)
92{
93
94 struct device_node *np;
95
96 np = of_find_node_by_type(NULL, "ipic");
97 if (!np)
98 return;
99
100 ipic_init(np, 0);
101
102 /* Initialize the default interrupt mapping priorities,
103 * in case the boot rom changed something on us.
104 */
105 ipic_set_default_priority();
106 of_node_put(np);
107
108#ifdef CONFIG_QUICC_ENGINE
109 np = of_find_node_by_type(NULL, "qeic");
110 if (!np)
111 return;
112
113 qe_ic_init(np, 0);
114 of_node_put(np);
115#endif /* CONFIG_QUICC_ENGINE */
116}
117
118/*
119 * Called very early, MMU is off, device-tree isn't unflattened
120 */
121static int __init mpc832x_rdb_probe(void)
122{
123 unsigned long root = of_get_flat_dt_root();
124
125 return of_flat_dt_is_compatible(root, "MPC832xRDB");
126}
127
128define_machine(mpc832x_rdb) {
129 .name = "MPC832x RDB",
130 .probe = mpc832x_rdb_probe,
131 .setup_arch = mpc832x_rdb_setup_arch,
132 .init_IRQ = mpc832x_rdb_init_IRQ,
133 .get_irq = ipic_get_irq,
134 .restart = mpc83xx_restart,
135 .time_init = mpc83xx_time_init,
136 .calibrate_decr = generic_calibrate_decr,
137 .progress = udbg_progress,
138};