aboutsummaryrefslogtreecommitdiffstats
path: root/arch/powerpc/platforms
diff options
context:
space:
mode:
authorStef van Os <stef.van.os@Prodrive.nl>2013-02-13 09:09:00 -0500
committerKumar Gala <galak@kernel.crashing.org>2013-02-15 14:54:10 -0500
commite0e8398e3a06580583b08ed756567a0c66fd725b (patch)
treef3003b6d1a5565f3127b31cd287c2772c3d6b94e /arch/powerpc/platforms
parentd4d801d13b522099493f56b5909b1c44e63e3e2f (diff)
powerpc/85xx: Board support for ppa8548
Initial board support for the Prodrive PPA8548 AMC module. Board is an MPC8548 AMC platform used in RapidIO systems. This module is also used to test/work on mainline linux RapidIO software. PPA8548 overview: - 1.3 GHz Freescale PowerQUICC III MPC8548 processor - 1 GB DDR2 @ 266 MHz - 8 MB NOR flash - Serial RapidIO 1.2 - 1 x 10/100/1000 BASE-T front ethernet - 1 x 1000 BASE-BX ethernet on AMC connector Signed-off-by: Stef van Os <stef.van.os@prodrive.nl> Acked-by: Timur Tabi <timur@tabi.org> Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
Diffstat (limited to 'arch/powerpc/platforms')
-rw-r--r--arch/powerpc/platforms/85xx/Kconfig7
-rw-r--r--arch/powerpc/platforms/85xx/Makefile1
-rw-r--r--arch/powerpc/platforms/85xx/ppa8548.c98
3 files changed, 106 insertions, 0 deletions
diff --git a/arch/powerpc/platforms/85xx/Kconfig b/arch/powerpc/platforms/85xx/Kconfig
index 651788cbc6e6..bcc53aa09bf7 100644
--- a/arch/powerpc/platforms/85xx/Kconfig
+++ b/arch/powerpc/platforms/85xx/Kconfig
@@ -191,6 +191,13 @@ config SBC8548
191 help 191 help
192 This option enables support for the Wind River SBC8548 board 192 This option enables support for the Wind River SBC8548 board
193 193
194config PPA8548
195 bool "Prodrive PPA8548"
196 help
197 This option enables support for the Prodrive PPA8548 board.
198 select DEFAULT_UIMAGE
199 select HAS_RAPIDIO
200
194config GE_IMP3A 201config GE_IMP3A
195 bool "GE Intelligent Platforms IMP3A" 202 bool "GE Intelligent Platforms IMP3A"
196 select DEFAULT_UIMAGE 203 select DEFAULT_UIMAGE
diff --git a/arch/powerpc/platforms/85xx/Makefile b/arch/powerpc/platforms/85xx/Makefile
index 9db31dcbd320..07d0dbb141c0 100644
--- a/arch/powerpc/platforms/85xx/Makefile
+++ b/arch/powerpc/platforms/85xx/Makefile
@@ -25,6 +25,7 @@ obj-$(CONFIG_P5040_DS) += p5040_ds.o corenet_ds.o
25obj-$(CONFIG_STX_GP3) += stx_gp3.o 25obj-$(CONFIG_STX_GP3) += stx_gp3.o
26obj-$(CONFIG_TQM85xx) += tqm85xx.o 26obj-$(CONFIG_TQM85xx) += tqm85xx.o
27obj-$(CONFIG_SBC8548) += sbc8548.o 27obj-$(CONFIG_SBC8548) += sbc8548.o
28obj-$(CONFIG_PPA8548) += ppa8548.o
28obj-$(CONFIG_SOCRATES) += socrates.o socrates_fpga_pic.o 29obj-$(CONFIG_SOCRATES) += socrates.o socrates_fpga_pic.o
29obj-$(CONFIG_KSI8560) += ksi8560.o 30obj-$(CONFIG_KSI8560) += ksi8560.o
30obj-$(CONFIG_XES_MPC85xx) += xes_mpc85xx.o 31obj-$(CONFIG_XES_MPC85xx) += xes_mpc85xx.o
diff --git a/arch/powerpc/platforms/85xx/ppa8548.c b/arch/powerpc/platforms/85xx/ppa8548.c
new file mode 100644
index 000000000000..6a7704b92c3b
--- /dev/null
+++ b/arch/powerpc/platforms/85xx/ppa8548.c
@@ -0,0 +1,98 @@
1/*
2 * ppa8548 setup and early boot code.
3 *
4 * Copyright 2009 Prodrive B.V..
5 *
6 * By Stef van Os (see MAINTAINERS for contact information)
7 *
8 * Based on the SBC8548 support - Copyright 2007 Wind River Systems Inc.
9 * Based on the MPC8548CDS support - Copyright 2005 Freescale Inc.
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/stddef.h>
18#include <linux/kernel.h>
19#include <linux/init.h>
20#include <linux/reboot.h>
21#include <linux/seq_file.h>
22#include <linux/of_platform.h>
23
24#include <asm/machdep.h>
25#include <asm/udbg.h>
26#include <asm/mpic.h>
27
28#include <sysdev/fsl_soc.h>
29
30static void __init ppa8548_pic_init(void)
31{
32 struct mpic *mpic = mpic_alloc(NULL, 0, MPIC_BIG_ENDIAN,
33 0, 256, " OpenPIC ");
34 BUG_ON(mpic == NULL);
35 mpic_init(mpic);
36}
37
38/*
39 * Setup the architecture
40 */
41static void __init ppa8548_setup_arch(void)
42{
43 if (ppc_md.progress)
44 ppc_md.progress("ppa8548_setup_arch()", 0);
45}
46
47static void ppa8548_show_cpuinfo(struct seq_file *m)
48{
49 uint32_t svid, phid1;
50
51 svid = mfspr(SPRN_SVR);
52
53 seq_printf(m, "Vendor\t\t: Prodrive B.V.\n");
54 seq_printf(m, "SVR\t\t: 0x%x\n", svid);
55
56 /* Display cpu Pll setting */
57 phid1 = mfspr(SPRN_HID1);
58 seq_printf(m, "PLL setting\t: 0x%x\n", ((phid1 >> 24) & 0x3f));
59}
60
61static struct of_device_id __initdata of_bus_ids[] = {
62 { .name = "soc", },
63 { .type = "soc", },
64 { .compatible = "simple-bus", },
65 { .compatible = "gianfar", },
66 { .compatible = "fsl,srio", },
67 {},
68};
69
70static int __init declare_of_platform_devices(void)
71{
72 of_platform_bus_probe(NULL, of_bus_ids, NULL);
73
74 return 0;
75}
76machine_device_initcall(ppa8548, declare_of_platform_devices);
77
78/*
79 * Called very early, device-tree isn't unflattened
80 */
81static int __init ppa8548_probe(void)
82{
83 unsigned long root = of_get_flat_dt_root();
84
85 return of_flat_dt_is_compatible(root, "ppa8548");
86}
87
88define_machine(ppa8548) {
89 .name = "ppa8548",
90 .probe = ppa8548_probe,
91 .setup_arch = ppa8548_setup_arch,
92 .init_IRQ = ppa8548_pic_init,
93 .show_cpuinfo = ppa8548_show_cpuinfo,
94 .get_irq = mpic_get_irq,
95 .restart = fsl_rstcr_restart,
96 .calibrate_decr = generic_calibrate_decr,
97 .progress = udbg_progress,
98};