aboutsummaryrefslogtreecommitdiffstats
path: root/arch/powerpc/platforms
diff options
context:
space:
mode:
Diffstat (limited to 'arch/powerpc/platforms')
-rw-r--r--arch/powerpc/platforms/86xx/Kconfig9
-rw-r--r--arch/powerpc/platforms/86xx/Makefile1
-rw-r--r--arch/powerpc/platforms/86xx/gef_sbc610.c149
3 files changed, 158 insertions, 1 deletions
diff --git a/arch/powerpc/platforms/86xx/Kconfig b/arch/powerpc/platforms/86xx/Kconfig
index 9355a5269431..77dd797a2580 100644
--- a/arch/powerpc/platforms/86xx/Kconfig
+++ b/arch/powerpc/platforms/86xx/Kconfig
@@ -31,6 +31,13 @@ config MPC8610_HPCD
31 help 31 help
32 This option enables support for the MPC8610 HPCD board. 32 This option enables support for the MPC8610 HPCD board.
33 33
34config GEF_SBC610
35 bool "GE Fanuc SBC610"
36 select DEFAULT_UIMAGE
37 select HAS_RAPIDIO
38 help
39 This option enables support for GE Fanuc's SBC610.
40
34endif 41endif
35 42
36config MPC8641 43config MPC8641
@@ -39,7 +46,7 @@ config MPC8641
39 select FSL_PCI if PCI 46 select FSL_PCI if PCI
40 select PPC_UDBG_16550 47 select PPC_UDBG_16550
41 select MPIC 48 select MPIC
42 default y if MPC8641_HPCN || SBC8641D 49 default y if MPC8641_HPCN || SBC8641D || GEF_SBC610
43 50
44config MPC8610 51config MPC8610
45 bool 52 bool
diff --git a/arch/powerpc/platforms/86xx/Makefile b/arch/powerpc/platforms/86xx/Makefile
index 8fee37dec795..cb9fc8f4360b 100644
--- a/arch/powerpc/platforms/86xx/Makefile
+++ b/arch/powerpc/platforms/86xx/Makefile
@@ -7,3 +7,4 @@ obj-$(CONFIG_SMP) += mpc86xx_smp.o
7obj-$(CONFIG_MPC8641_HPCN) += mpc86xx_hpcn.o 7obj-$(CONFIG_MPC8641_HPCN) += mpc86xx_hpcn.o
8obj-$(CONFIG_SBC8641D) += sbc8641d.o 8obj-$(CONFIG_SBC8641D) += sbc8641d.o
9obj-$(CONFIG_MPC8610_HPCD) += mpc8610_hpcd.o 9obj-$(CONFIG_MPC8610_HPCD) += mpc8610_hpcd.o
10obj-$(CONFIG_GEF_SBC610) += gef_sbc610.o
diff --git a/arch/powerpc/platforms/86xx/gef_sbc610.c b/arch/powerpc/platforms/86xx/gef_sbc610.c
new file mode 100644
index 000000000000..3543a9e67618
--- /dev/null
+++ b/arch/powerpc/platforms/86xx/gef_sbc610.c
@@ -0,0 +1,149 @@
1/*
2 * GE Fanuc SBC610 board support
3 *
4 * Author: Martyn Welch <martyn.welch@gefanuc.com>
5 *
6 * Copyright 2008 GE Fanuc Intelligent Platforms Embedded Systems, Inc.
7 *
8 * This program is free software; you can redistribute it and/or modify it
9 * under the terms of the GNU General Public License as published by the
10 * Free Software Foundation; either version 2 of the License, or (at your
11 * option) any later version.
12 *
13 * Based on: mpc86xx_hpcn.c (MPC86xx HPCN board specific routines)
14 * Copyright 2006 Freescale Semiconductor Inc.
15 */
16
17#include <linux/stddef.h>
18#include <linux/kernel.h>
19#include <linux/pci.h>
20#include <linux/kdev_t.h>
21#include <linux/delay.h>
22#include <linux/seq_file.h>
23#include <linux/of_platform.h>
24
25#include <asm/system.h>
26#include <asm/time.h>
27#include <asm/machdep.h>
28#include <asm/pci-bridge.h>
29#include <asm/mpc86xx.h>
30#include <asm/prom.h>
31#include <mm/mmu_decl.h>
32#include <asm/udbg.h>
33
34#include <asm/mpic.h>
35
36#include <sysdev/fsl_pci.h>
37#include <sysdev/fsl_soc.h>
38
39#include "mpc86xx.h"
40
41#undef DEBUG
42
43#ifdef DEBUG
44#define DBG (fmt...) do { printk(KERN_ERR "SBC610: " fmt); } while (0)
45#else
46#define DBG (fmt...) do { } while (0)
47#endif
48
49static void __init gef_sbc610_setup_arch(void)
50{
51#ifdef CONFIG_PCI
52 struct device_node *np;
53
54 for_each_compatible_node(np, "pci", "fsl,mpc8641-pcie") {
55 fsl_add_bridge(np, 1);
56 }
57#endif
58
59 printk(KERN_INFO "GE Fanuc Intelligent Platforms SBC610 6U VPX SBC\n");
60
61#ifdef CONFIG_SMP
62 mpc86xx_smp_init();
63#endif
64}
65
66
67static void gef_sbc610_show_cpuinfo(struct seq_file *m)
68{
69 struct device_node *root;
70 uint memsize = total_memory;
71 const char *model = "";
72 uint svid = mfspr(SPRN_SVR);
73
74 seq_printf(m, "Vendor\t\t: GE Fanuc Intelligent Platforms\n");
75
76 root = of_find_node_by_path("/");
77 if (root)
78 model = of_get_property(root, "model", NULL);
79 seq_printf(m, "Machine\t\t: %s\n", model);
80 of_node_put(root);
81
82 seq_printf(m, "SVR\t\t: 0x%x\n", svid);
83 seq_printf(m, "Memory\t\t: %d MB\n", memsize / (1024 * 1024));
84}
85
86
87/*
88 * Called very early, device-tree isn't unflattened
89 *
90 * This function is called to determine whether the BSP is compatible with the
91 * supplied device-tree, which is assumed to be the correct one for the actual
92 * board. It is expected thati, in the future, a kernel may support multiple
93 * boards.
94 */
95static int __init gef_sbc610_probe(void)
96{
97 unsigned long root = of_get_flat_dt_root();
98
99 if (of_flat_dt_is_compatible(root, "gef,sbc610"))
100 return 1;
101
102 return 0;
103}
104
105static long __init mpc86xx_time_init(void)
106{
107 unsigned int temp;
108
109 /* Set the time base to zero */
110 mtspr(SPRN_TBWL, 0);
111 mtspr(SPRN_TBWU, 0);
112
113 temp = mfspr(SPRN_HID0);
114 temp |= HID0_TBEN;
115 mtspr(SPRN_HID0, temp);
116 asm volatile("isync");
117
118 return 0;
119}
120
121static __initdata struct of_device_id of_bus_ids[] = {
122 { .compatible = "simple-bus", },
123 {},
124};
125
126static int __init declare_of_platform_devices(void)
127{
128 printk(KERN_DEBUG "Probe platform devices\n");
129 of_platform_bus_probe(NULL, of_bus_ids, NULL);
130
131 return 0;
132}
133machine_device_initcall(gef_sbc610, declare_of_platform_devices);
134
135define_machine(gef_sbc610) {
136 .name = "GE Fanuc SBC610",
137 .probe = gef_sbc610_probe,
138 .setup_arch = gef_sbc610_setup_arch,
139 .init_IRQ = mpc86xx_init_irq,
140 .show_cpuinfo = gef_sbc610_show_cpuinfo,
141 .get_irq = mpic_get_irq,
142 .restart = fsl_rstcr_restart,
143 .time_init = mpc86xx_time_init,
144 .calibrate_decr = generic_calibrate_decr,
145 .progress = udbg_progress,
146#ifdef CONFIG_PCI
147 .pcibios_fixup_bus = fsl_pcibios_fixup_bus,
148#endif
149};