aboutsummaryrefslogtreecommitdiffstats
path: root/arch
diff options
context:
space:
mode:
authorPaul Gortmaker <paul.gortmaker@windriver.com>2008-01-24 18:41:30 -0500
committerKumar Gala <galak@kernel.crashing.org>2008-01-28 09:30:54 -0500
commita43414ccb49c7866febd7f9c70adc124f6bba636 (patch)
tree54226dabfb8284448bc98b3d6b8aa38737d04744 /arch
parente1e90c6f93e6ae6b7abef226e17c7f25ee998e8a (diff)
[POWERPC] 83xx: Add support for Wind River SBC834x boards
This adds the basic support for the Wind River SBC834x boards. The SBC8349 is more common, although it should work on the SBC8347 board as well. Support is heavily based on the existing MPC834x_MDS code. Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com> Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
Diffstat (limited to 'arch')
-rw-r--r--arch/powerpc/platforms/83xx/Kconfig9
-rw-r--r--arch/powerpc/platforms/83xx/Makefile1
-rw-r--r--arch/powerpc/platforms/83xx/sbc834x.c115
3 files changed, 124 insertions, 1 deletions
diff --git a/arch/powerpc/platforms/83xx/Kconfig b/arch/powerpc/platforms/83xx/Kconfig
index 2430ac840493..782bff0c3229 100644
--- a/arch/powerpc/platforms/83xx/Kconfig
+++ b/arch/powerpc/platforms/83xx/Kconfig
@@ -55,6 +55,13 @@ config MPC837x_MDS
55 select DEFAULT_UIMAGE 55 select DEFAULT_UIMAGE
56 help 56 help
57 This option enables support for the MPC837x MDS Processor Board. 57 This option enables support for the MPC837x MDS Processor Board.
58
59config SBC834x
60 bool "Wind River SBC834x"
61 select DEFAULT_UIMAGE
62 help
63 This option enables support for the Wind River SBC834x board.
64
58endchoice 65endchoice
59 66
60config PPC_MPC831x 67config PPC_MPC831x
@@ -73,7 +80,7 @@ config MPC834x
73 bool 80 bool
74 select PPC_UDBG_16550 81 select PPC_UDBG_16550
75 select PPC_INDIRECT_PCI 82 select PPC_INDIRECT_PCI
76 default y if MPC834x_MDS || MPC834x_ITX 83 default y if MPC834x_MDS || MPC834x_ITX || SBC834x
77 84
78config PPC_MPC836x 85config PPC_MPC836x
79 bool 86 bool
diff --git a/arch/powerpc/platforms/83xx/Makefile b/arch/powerpc/platforms/83xx/Makefile
index df4662999a95..3a35242ba890 100644
--- a/arch/powerpc/platforms/83xx/Makefile
+++ b/arch/powerpc/platforms/83xx/Makefile
@@ -10,3 +10,4 @@ obj-$(CONFIG_MPC834x_ITX) += mpc834x_itx.o
10obj-$(CONFIG_MPC836x_MDS) += mpc836x_mds.o 10obj-$(CONFIG_MPC836x_MDS) += mpc836x_mds.o
11obj-$(CONFIG_MPC832x_MDS) += mpc832x_mds.o 11obj-$(CONFIG_MPC832x_MDS) += mpc832x_mds.o
12obj-$(CONFIG_MPC837x_MDS) += mpc837x_mds.o 12obj-$(CONFIG_MPC837x_MDS) += mpc837x_mds.o
13obj-$(CONFIG_SBC834x) += sbc834x.o
diff --git a/arch/powerpc/platforms/83xx/sbc834x.c b/arch/powerpc/platforms/83xx/sbc834x.c
new file mode 100644
index 000000000000..cf382474a83d
--- /dev/null
+++ b/arch/powerpc/platforms/83xx/sbc834x.c
@@ -0,0 +1,115 @@
1/*
2 * arch/powerpc/platforms/83xx/sbc834x.c
3 *
4 * Wind River SBC834x board specific routines
5 *
6 * By Paul Gortmaker (see MAINTAINERS for contact information)
7 *
8 * Based largely on the mpc834x_mds.c support by Kumar Gala.
9 *
10 * This program is free software; you can redistribute it and/or modify it
11 * under the terms of the GNU General Public License as published by the
12 * Free Software Foundation; either version 2 of the License, or (at your
13 * option) any later version.
14 */
15
16#include <linux/stddef.h>
17#include <linux/kernel.h>
18#include <linux/init.h>
19#include <linux/errno.h>
20#include <linux/reboot.h>
21#include <linux/pci.h>
22#include <linux/kdev_t.h>
23#include <linux/major.h>
24#include <linux/console.h>
25#include <linux/delay.h>
26#include <linux/seq_file.h>
27#include <linux/root_dev.h>
28#include <linux/of_platform.h>
29
30#include <asm/system.h>
31#include <asm/atomic.h>
32#include <asm/time.h>
33#include <asm/io.h>
34#include <asm/machdep.h>
35#include <asm/ipic.h>
36#include <asm/irq.h>
37#include <asm/prom.h>
38#include <asm/udbg.h>
39#include <sysdev/fsl_soc.h>
40
41#include "mpc83xx.h"
42
43/* ************************************************************************
44 *
45 * Setup the architecture
46 *
47 */
48static void __init sbc834x_setup_arch(void)
49{
50#ifdef CONFIG_PCI
51 struct device_node *np;
52#endif
53
54 if (ppc_md.progress)
55 ppc_md.progress("sbc834x_setup_arch()", 0);
56
57#ifdef CONFIG_PCI
58 for_each_compatible_node(np, "pci", "fsl,mpc8349-pci")
59 mpc83xx_add_bridge(np);
60#endif
61
62}
63
64static void __init sbc834x_init_IRQ(void)
65{
66 struct device_node *np;
67
68 np = of_find_node_by_type(NULL, "ipic");
69 if (!np)
70 return;
71
72 ipic_init(np, 0);
73
74 /* Initialize the default interrupt mapping priorities,
75 * in case the boot rom changed something on us.
76 */
77 ipic_set_default_priority();
78
79 of_node_put(np);
80}
81
82static struct __initdata of_device_id sbc834x_ids[] = {
83 { .type = "soc", },
84 { .compatible = "soc", },
85 {},
86};
87
88static int __init sbc834x_declare_of_platform_devices(void)
89{
90 of_platform_bus_probe(NULL, sbc834x_ids, NULL);
91 return 0;
92}
93machine_device_initcall(sbc834x, sbc834x_declare_of_platform_devices);
94
95/*
96 * Called very early, MMU is off, device-tree isn't unflattened
97 */
98static int __init sbc834x_probe(void)
99{
100 unsigned long root = of_get_flat_dt_root();
101
102 return of_flat_dt_is_compatible(root, "SBC834x");
103}
104
105define_machine(sbc834x) {
106 .name = "SBC834x",
107 .probe = sbc834x_probe,
108 .setup_arch = sbc834x_setup_arch,
109 .init_IRQ = sbc834x_init_IRQ,
110 .get_irq = ipic_get_irq,
111 .restart = mpc83xx_restart,
112 .time_init = mpc83xx_time_init,
113 .calibrate_decr = generic_calibrate_decr,
114 .progress = udbg_progress,
115};