diff options
Diffstat (limited to 'arch')
-rw-r--r-- | arch/powerpc/configs/chroma_defconfig | 307 | ||||
-rw-r--r-- | arch/powerpc/platforms/wsp/Kconfig | 11 | ||||
-rw-r--r-- | arch/powerpc/platforms/wsp/Makefile | 8 | ||||
-rw-r--r-- | arch/powerpc/platforms/wsp/chroma.c | 56 | ||||
-rw-r--r-- | arch/powerpc/platforms/wsp/h8.c | 134 | ||||
-rw-r--r-- | arch/powerpc/platforms/wsp/psr2.c | 56 | ||||
-rw-r--r-- | arch/powerpc/platforms/wsp/wsp.c | 115 | ||||
-rw-r--r-- | arch/powerpc/platforms/wsp/wsp.h | 16 |
8 files changed, 651 insertions, 52 deletions
diff --git a/arch/powerpc/configs/chroma_defconfig b/arch/powerpc/configs/chroma_defconfig new file mode 100644 index 000000000000..acf7fb280464 --- /dev/null +++ b/arch/powerpc/configs/chroma_defconfig | |||
@@ -0,0 +1,307 @@ | |||
1 | CONFIG_PPC64=y | ||
2 | CONFIG_PPC_BOOK3E_64=y | ||
3 | # CONFIG_VIRT_CPU_ACCOUNTING is not set | ||
4 | CONFIG_SMP=y | ||
5 | CONFIG_NR_CPUS=256 | ||
6 | CONFIG_EXPERIMENTAL=y | ||
7 | CONFIG_SYSVIPC=y | ||
8 | CONFIG_POSIX_MQUEUE=y | ||
9 | CONFIG_BSD_PROCESS_ACCT=y | ||
10 | CONFIG_TASKSTATS=y | ||
11 | CONFIG_TASK_DELAY_ACCT=y | ||
12 | CONFIG_TASK_XACCT=y | ||
13 | CONFIG_TASK_IO_ACCOUNTING=y | ||
14 | CONFIG_AUDIT=y | ||
15 | CONFIG_AUDITSYSCALL=y | ||
16 | CONFIG_IKCONFIG=y | ||
17 | CONFIG_IKCONFIG_PROC=y | ||
18 | CONFIG_LOG_BUF_SHIFT=19 | ||
19 | CONFIG_CGROUPS=y | ||
20 | CONFIG_CGROUP_DEVICE=y | ||
21 | CONFIG_CPUSETS=y | ||
22 | CONFIG_CGROUP_CPUACCT=y | ||
23 | CONFIG_RESOURCE_COUNTERS=y | ||
24 | CONFIG_CGROUP_MEM_RES_CTLR=y | ||
25 | CONFIG_CGROUP_MEM_RES_CTLR_SWAP=y | ||
26 | CONFIG_NAMESPACES=y | ||
27 | CONFIG_RELAY=y | ||
28 | CONFIG_BLK_DEV_INITRD=y | ||
29 | CONFIG_INITRAMFS_SOURCE="" | ||
30 | CONFIG_RD_BZIP2=y | ||
31 | CONFIG_RD_LZMA=y | ||
32 | CONFIG_INITRAMFS_COMPRESSION_GZIP=y | ||
33 | CONFIG_KALLSYMS_ALL=y | ||
34 | CONFIG_EMBEDDED=y | ||
35 | CONFIG_PERF_COUNTERS=y | ||
36 | CONFIG_PROFILING=y | ||
37 | CONFIG_OPROFILE=y | ||
38 | CONFIG_KPROBES=y | ||
39 | CONFIG_MODULES=y | ||
40 | CONFIG_MODULE_FORCE_LOAD=y | ||
41 | CONFIG_MODULE_UNLOAD=y | ||
42 | CONFIG_MODULE_FORCE_UNLOAD=y | ||
43 | CONFIG_MODVERSIONS=y | ||
44 | CONFIG_MODULE_SRCVERSION_ALL=y | ||
45 | CONFIG_SCOM_DEBUGFS=y | ||
46 | CONFIG_PPC_A2_DD2=y | ||
47 | CONFIG_KVM_GUEST=y | ||
48 | CONFIG_NO_HZ=y | ||
49 | CONFIG_HIGH_RES_TIMERS=y | ||
50 | CONFIG_HZ_100=y | ||
51 | # CONFIG_CORE_DUMP_DEFAULT_ELF_HEADERS is not set | ||
52 | CONFIG_BINFMT_MISC=y | ||
53 | CONFIG_NUMA=y | ||
54 | # CONFIG_MIGRATION is not set | ||
55 | CONFIG_PPC_64K_PAGES=y | ||
56 | CONFIG_SCHED_SMT=y | ||
57 | CONFIG_CMDLINE_BOOL=y | ||
58 | CONFIG_CMDLINE="" | ||
59 | # CONFIG_SECCOMP is not set | ||
60 | CONFIG_PCIEPORTBUS=y | ||
61 | # CONFIG_PCIEASPM is not set | ||
62 | CONFIG_PCI_MSI=y | ||
63 | CONFIG_PACKET=y | ||
64 | CONFIG_UNIX=y | ||
65 | CONFIG_XFRM_USER=m | ||
66 | CONFIG_XFRM_SUB_POLICY=y | ||
67 | CONFIG_XFRM_STATISTICS=y | ||
68 | CONFIG_NET_KEY=m | ||
69 | CONFIG_NET_KEY_MIGRATE=y | ||
70 | CONFIG_INET=y | ||
71 | CONFIG_IP_MULTICAST=y | ||
72 | CONFIG_IP_ADVANCED_ROUTER=y | ||
73 | CONFIG_IP_ROUTE_MULTIPATH=y | ||
74 | CONFIG_IP_ROUTE_VERBOSE=y | ||
75 | CONFIG_IP_PNP=y | ||
76 | CONFIG_IP_PNP_DHCP=y | ||
77 | CONFIG_IP_PNP_BOOTP=y | ||
78 | CONFIG_NET_IPIP=y | ||
79 | CONFIG_IP_MROUTE=y | ||
80 | CONFIG_IP_PIMSM_V1=y | ||
81 | CONFIG_IP_PIMSM_V2=y | ||
82 | CONFIG_SYN_COOKIES=y | ||
83 | CONFIG_INET_AH=m | ||
84 | CONFIG_INET_ESP=m | ||
85 | CONFIG_INET_IPCOMP=m | ||
86 | CONFIG_IPV6=y | ||
87 | CONFIG_IPV6_PRIVACY=y | ||
88 | CONFIG_IPV6_ROUTER_PREF=y | ||
89 | CONFIG_IPV6_ROUTE_INFO=y | ||
90 | CONFIG_IPV6_OPTIMISTIC_DAD=y | ||
91 | CONFIG_INET6_AH=y | ||
92 | CONFIG_INET6_ESP=y | ||
93 | CONFIG_INET6_IPCOMP=y | ||
94 | CONFIG_IPV6_MIP6=y | ||
95 | CONFIG_INET6_XFRM_MODE_ROUTEOPTIMIZATION=y | ||
96 | CONFIG_IPV6_TUNNEL=y | ||
97 | CONFIG_IPV6_MULTIPLE_TABLES=y | ||
98 | CONFIG_IPV6_SUBTREES=y | ||
99 | CONFIG_IPV6_MROUTE=y | ||
100 | CONFIG_IPV6_PIMSM_V2=y | ||
101 | CONFIG_NETFILTER=y | ||
102 | CONFIG_NF_CONNTRACK=m | ||
103 | CONFIG_NF_CONNTRACK_EVENTS=y | ||
104 | CONFIG_NF_CT_PROTO_UDPLITE=m | ||
105 | CONFIG_NF_CONNTRACK_FTP=m | ||
106 | CONFIG_NF_CONNTRACK_IRC=m | ||
107 | CONFIG_NF_CONNTRACK_TFTP=m | ||
108 | CONFIG_NF_CT_NETLINK=m | ||
109 | CONFIG_NETFILTER_XT_TARGET_CLASSIFY=m | ||
110 | CONFIG_NETFILTER_XT_TARGET_CONNMARK=m | ||
111 | CONFIG_NETFILTER_XT_TARGET_MARK=m | ||
112 | CONFIG_NETFILTER_XT_TARGET_NFLOG=m | ||
113 | CONFIG_NETFILTER_XT_TARGET_NFQUEUE=m | ||
114 | CONFIG_NETFILTER_XT_TARGET_TCPMSS=m | ||
115 | CONFIG_NETFILTER_XT_MATCH_COMMENT=m | ||
116 | CONFIG_NETFILTER_XT_MATCH_CONNBYTES=m | ||
117 | CONFIG_NETFILTER_XT_MATCH_CONNLIMIT=m | ||
118 | CONFIG_NETFILTER_XT_MATCH_CONNMARK=m | ||
119 | CONFIG_NETFILTER_XT_MATCH_CONNTRACK=m | ||
120 | CONFIG_NETFILTER_XT_MATCH_DCCP=m | ||
121 | CONFIG_NETFILTER_XT_MATCH_DSCP=m | ||
122 | CONFIG_NETFILTER_XT_MATCH_ESP=m | ||
123 | CONFIG_NETFILTER_XT_MATCH_HASHLIMIT=m | ||
124 | CONFIG_NETFILTER_XT_MATCH_HELPER=m | ||
125 | CONFIG_NETFILTER_XT_MATCH_IPRANGE=m | ||
126 | CONFIG_NETFILTER_XT_MATCH_LENGTH=m | ||
127 | CONFIG_NETFILTER_XT_MATCH_LIMIT=m | ||
128 | CONFIG_NETFILTER_XT_MATCH_MAC=m | ||
129 | CONFIG_NETFILTER_XT_MATCH_MARK=m | ||
130 | CONFIG_NETFILTER_XT_MATCH_MULTIPORT=m | ||
131 | CONFIG_NETFILTER_XT_MATCH_OWNER=m | ||
132 | CONFIG_NETFILTER_XT_MATCH_POLICY=m | ||
133 | CONFIG_NETFILTER_XT_MATCH_PKTTYPE=m | ||
134 | CONFIG_NETFILTER_XT_MATCH_QUOTA=m | ||
135 | CONFIG_NETFILTER_XT_MATCH_RATEEST=m | ||
136 | CONFIG_NETFILTER_XT_MATCH_REALM=m | ||
137 | CONFIG_NETFILTER_XT_MATCH_RECENT=m | ||
138 | CONFIG_NETFILTER_XT_MATCH_SCTP=m | ||
139 | CONFIG_NETFILTER_XT_MATCH_STATE=m | ||
140 | CONFIG_NETFILTER_XT_MATCH_STATISTIC=m | ||
141 | CONFIG_NETFILTER_XT_MATCH_STRING=m | ||
142 | CONFIG_NETFILTER_XT_MATCH_TCPMSS=m | ||
143 | CONFIG_NETFILTER_XT_MATCH_TIME=m | ||
144 | CONFIG_NETFILTER_XT_MATCH_U32=m | ||
145 | CONFIG_NF_CONNTRACK_IPV4=m | ||
146 | CONFIG_IP_NF_QUEUE=m | ||
147 | CONFIG_IP_NF_IPTABLES=m | ||
148 | CONFIG_IP_NF_MATCH_AH=m | ||
149 | CONFIG_IP_NF_MATCH_ECN=m | ||
150 | CONFIG_IP_NF_MATCH_TTL=m | ||
151 | CONFIG_IP_NF_FILTER=m | ||
152 | CONFIG_IP_NF_TARGET_REJECT=m | ||
153 | CONFIG_IP_NF_TARGET_LOG=m | ||
154 | CONFIG_IP_NF_TARGET_ULOG=m | ||
155 | CONFIG_NF_NAT=m | ||
156 | CONFIG_IP_NF_TARGET_MASQUERADE=m | ||
157 | CONFIG_IP_NF_TARGET_NETMAP=m | ||
158 | CONFIG_IP_NF_TARGET_REDIRECT=m | ||
159 | CONFIG_NET_TCPPROBE=y | ||
160 | # CONFIG_WIRELESS is not set | ||
161 | CONFIG_NET_9P=y | ||
162 | CONFIG_NET_9P_DEBUG=y | ||
163 | CONFIG_UEVENT_HELPER_PATH="/sbin/hotplug" | ||
164 | CONFIG_DEVTMPFS=y | ||
165 | CONFIG_MTD=y | ||
166 | CONFIG_MTD_CHAR=y | ||
167 | CONFIG_MTD_BLOCK=y | ||
168 | CONFIG_MTD_CFI=y | ||
169 | CONFIG_MTD_CFI_ADV_OPTIONS=y | ||
170 | CONFIG_MTD_CFI_LE_BYTE_SWAP=y | ||
171 | CONFIG_MTD_CFI_INTELEXT=y | ||
172 | CONFIG_MTD_CFI_AMDSTD=y | ||
173 | CONFIG_MTD_CFI_STAA=y | ||
174 | CONFIG_MTD_PHYSMAP_OF=y | ||
175 | CONFIG_PROC_DEVICETREE=y | ||
176 | CONFIG_BLK_DEV_LOOP=y | ||
177 | CONFIG_BLK_DEV_CRYPTOLOOP=y | ||
178 | CONFIG_BLK_DEV_NBD=m | ||
179 | CONFIG_BLK_DEV_RAM=y | ||
180 | CONFIG_BLK_DEV_RAM_SIZE=65536 | ||
181 | CONFIG_CDROM_PKTCDVD=y | ||
182 | CONFIG_MISC_DEVICES=y | ||
183 | CONFIG_BLK_DEV_SD=y | ||
184 | CONFIG_BLK_DEV_SR=y | ||
185 | CONFIG_BLK_DEV_SR_VENDOR=y | ||
186 | CONFIG_CHR_DEV_SG=y | ||
187 | CONFIG_SCSI_MULTI_LUN=y | ||
188 | CONFIG_SCSI_CONSTANTS=y | ||
189 | CONFIG_SCSI_SPI_ATTRS=y | ||
190 | CONFIG_SCSI_FC_ATTRS=y | ||
191 | CONFIG_SCSI_ISCSI_ATTRS=m | ||
192 | CONFIG_SCSI_SAS_ATTRS=m | ||
193 | CONFIG_SCSI_SRP_ATTRS=y | ||
194 | CONFIG_ATA=y | ||
195 | CONFIG_SATA_AHCI=y | ||
196 | CONFIG_SATA_SIL24=y | ||
197 | CONFIG_SATA_MV=y | ||
198 | CONFIG_SATA_SIL=y | ||
199 | CONFIG_PATA_CMD64X=y | ||
200 | CONFIG_PATA_MARVELL=y | ||
201 | CONFIG_PATA_SIL680=y | ||
202 | CONFIG_MD=y | ||
203 | CONFIG_BLK_DEV_MD=y | ||
204 | CONFIG_MD_LINEAR=y | ||
205 | CONFIG_BLK_DEV_DM=y | ||
206 | CONFIG_DM_CRYPT=y | ||
207 | CONFIG_DM_SNAPSHOT=y | ||
208 | CONFIG_DM_MIRROR=y | ||
209 | CONFIG_DM_ZERO=y | ||
210 | CONFIG_DM_UEVENT=y | ||
211 | CONFIG_NETDEVICES=y | ||
212 | CONFIG_TUN=y | ||
213 | CONFIG_E1000E=y | ||
214 | CONFIG_TIGON3=y | ||
215 | # CONFIG_WLAN is not set | ||
216 | # CONFIG_INPUT is not set | ||
217 | # CONFIG_SERIO is not set | ||
218 | # CONFIG_VT is not set | ||
219 | CONFIG_DEVPTS_MULTIPLE_INSTANCES=y | ||
220 | CONFIG_SERIAL_8250=y | ||
221 | CONFIG_SERIAL_8250_CONSOLE=y | ||
222 | CONFIG_HW_RANDOM=y | ||
223 | CONFIG_RAW_DRIVER=y | ||
224 | CONFIG_MAX_RAW_DEVS=1024 | ||
225 | # CONFIG_HWMON is not set | ||
226 | # CONFIG_VGA_ARB is not set | ||
227 | # CONFIG_USB_SUPPORT is not set | ||
228 | CONFIG_EDAC=y | ||
229 | CONFIG_EDAC_MM_EDAC=y | ||
230 | CONFIG_RTC_CLASS=y | ||
231 | CONFIG_RTC_DRV_DS1511=y | ||
232 | CONFIG_RTC_DRV_DS1553=y | ||
233 | CONFIG_EXT2_FS=y | ||
234 | CONFIG_EXT2_FS_XATTR=y | ||
235 | CONFIG_EXT2_FS_POSIX_ACL=y | ||
236 | CONFIG_EXT2_FS_SECURITY=y | ||
237 | CONFIG_EXT2_FS_XIP=y | ||
238 | CONFIG_EXT3_FS=y | ||
239 | # CONFIG_EXT3_DEFAULTS_TO_ORDERED is not set | ||
240 | CONFIG_EXT3_FS_POSIX_ACL=y | ||
241 | CONFIG_EXT3_FS_SECURITY=y | ||
242 | CONFIG_EXT4_FS=y | ||
243 | # CONFIG_DNOTIFY is not set | ||
244 | CONFIG_FUSE_FS=y | ||
245 | CONFIG_ISO9660_FS=y | ||
246 | CONFIG_JOLIET=y | ||
247 | CONFIG_ZISOFS=y | ||
248 | CONFIG_UDF_FS=m | ||
249 | CONFIG_MSDOS_FS=y | ||
250 | CONFIG_VFAT_FS=y | ||
251 | CONFIG_PROC_KCORE=y | ||
252 | CONFIG_TMPFS=y | ||
253 | CONFIG_TMPFS_POSIX_ACL=y | ||
254 | CONFIG_CONFIGFS_FS=m | ||
255 | CONFIG_CRAMFS=y | ||
256 | CONFIG_NFS_FS=y | ||
257 | CONFIG_NFS_V3=y | ||
258 | CONFIG_NFS_V3_ACL=y | ||
259 | CONFIG_NFS_V4=y | ||
260 | CONFIG_NFS_V4_1=y | ||
261 | CONFIG_ROOT_NFS=y | ||
262 | CONFIG_CIFS=y | ||
263 | CONFIG_CIFS_WEAK_PW_HASH=y | ||
264 | CONFIG_CIFS_XATTR=y | ||
265 | CONFIG_CIFS_POSIX=y | ||
266 | CONFIG_NLS_CODEPAGE_437=y | ||
267 | CONFIG_NLS_ASCII=y | ||
268 | CONFIG_NLS_ISO8859_1=y | ||
269 | CONFIG_CRC_CCITT=m | ||
270 | CONFIG_CRC_T10DIF=y | ||
271 | CONFIG_LIBCRC32C=m | ||
272 | CONFIG_PRINTK_TIME=y | ||
273 | CONFIG_MAGIC_SYSRQ=y | ||
274 | CONFIG_STRIP_ASM_SYMS=y | ||
275 | CONFIG_DETECT_HUNG_TASK=y | ||
276 | # CONFIG_SCHED_DEBUG is not set | ||
277 | CONFIG_DEBUG_INFO=y | ||
278 | CONFIG_FTRACE_SYSCALLS=y | ||
279 | CONFIG_PPC_EMULATED_STATS=y | ||
280 | CONFIG_XMON=y | ||
281 | CONFIG_XMON_DEFAULT=y | ||
282 | CONFIG_VIRQ_DEBUG=y | ||
283 | CONFIG_PPC_EARLY_DEBUG=y | ||
284 | CONFIG_KEYS_DEBUG_PROC_KEYS=y | ||
285 | CONFIG_CRYPTO_NULL=m | ||
286 | CONFIG_CRYPTO_TEST=m | ||
287 | CONFIG_CRYPTO_CCM=m | ||
288 | CONFIG_CRYPTO_GCM=m | ||
289 | CONFIG_CRYPTO_PCBC=m | ||
290 | CONFIG_CRYPTO_MICHAEL_MIC=m | ||
291 | CONFIG_CRYPTO_SHA256=m | ||
292 | CONFIG_CRYPTO_SHA512=m | ||
293 | CONFIG_CRYPTO_TGR192=m | ||
294 | CONFIG_CRYPTO_WP512=m | ||
295 | CONFIG_CRYPTO_AES=m | ||
296 | CONFIG_CRYPTO_ANUBIS=m | ||
297 | CONFIG_CRYPTO_BLOWFISH=m | ||
298 | CONFIG_CRYPTO_CAST5=m | ||
299 | CONFIG_CRYPTO_CAST6=m | ||
300 | CONFIG_CRYPTO_KHAZAD=m | ||
301 | CONFIG_CRYPTO_SALSA20=m | ||
302 | CONFIG_CRYPTO_SERPENT=m | ||
303 | CONFIG_CRYPTO_TEA=m | ||
304 | CONFIG_CRYPTO_TWOFISH=m | ||
305 | CONFIG_CRYPTO_LZO=m | ||
306 | # CONFIG_CRYPTO_ANSI_CPRNG is not set | ||
307 | CONFIG_VIRTUALIZATION=y | ||
diff --git a/arch/powerpc/platforms/wsp/Kconfig b/arch/powerpc/platforms/wsp/Kconfig index 43a3b00261e7..57d22a2f4ba9 100644 --- a/arch/powerpc/platforms/wsp/Kconfig +++ b/arch/powerpc/platforms/wsp/Kconfig | |||
@@ -1,6 +1,7 @@ | |||
1 | config PPC_WSP | 1 | config PPC_WSP |
2 | bool | 2 | bool |
3 | select PPC_A2 | 3 | select PPC_A2 |
4 | select GENERIC_TBSYNC | ||
4 | select PPC_ICSWX | 5 | select PPC_ICSWX |
5 | select PPC_SCOM | 6 | select PPC_SCOM |
6 | select PPC_XICS | 7 | select PPC_XICS |
@@ -8,14 +9,20 @@ config PPC_WSP | |||
8 | select PCI | 9 | select PCI |
9 | select PPC_IO_WORKAROUNDS if PCI | 10 | select PPC_IO_WORKAROUNDS if PCI |
10 | select PPC_INDIRECT_PIO if PCI | 11 | select PPC_INDIRECT_PIO if PCI |
12 | select PPC_WSP_COPRO | ||
11 | default n | 13 | default n |
12 | 14 | ||
13 | menu "WSP platform selection" | 15 | menu "WSP platform selection" |
14 | depends on PPC_BOOK3E_64 | 16 | depends on PPC_BOOK3E_64 |
15 | 17 | ||
16 | config PPC_PSR2 | 18 | config PPC_PSR2 |
17 | bool "PSR-2 platform" | 19 | bool "PowerEN System Reference Platform 2" |
18 | select GENERIC_TBSYNC | 20 | select EPAPR_BOOT |
21 | select PPC_WSP | ||
22 | default y | ||
23 | |||
24 | config PPC_CHROMA | ||
25 | bool "PowerEN PCIe Chroma Card" | ||
19 | select EPAPR_BOOT | 26 | select EPAPR_BOOT |
20 | select PPC_WSP | 27 | select PPC_WSP |
21 | default y | 28 | default y |
diff --git a/arch/powerpc/platforms/wsp/Makefile b/arch/powerpc/platforms/wsp/Makefile index a1486b436f02..56817ac98fc9 100644 --- a/arch/powerpc/platforms/wsp/Makefile +++ b/arch/powerpc/platforms/wsp/Makefile | |||
@@ -1,8 +1,10 @@ | |||
1 | ccflags-y += -mno-minimal-toc | 1 | ccflags-y += -mno-minimal-toc |
2 | 2 | ||
3 | obj-y += setup.o ics.o | 3 | obj-y += setup.o ics.o wsp.o |
4 | obj-$(CONFIG_PPC_PSR2) += psr2.o opb_pic.o | 4 | obj-$(CONFIG_PPC_PSR2) += psr2.o |
5 | obj-$(CONFIG_PPC_CHROMA) += chroma.o h8.o | ||
6 | obj-$(CONFIG_PPC_WSP) += opb_pic.o | ||
5 | obj-$(CONFIG_PPC_WSP) += scom_wsp.o | 7 | obj-$(CONFIG_PPC_WSP) += scom_wsp.o |
6 | obj-$(CONFIG_SMP) += smp.o scom_smp.o | 8 | obj-$(CONFIG_SMP) += smp.o scom_smp.o |
7 | obj-$(CONFIG_PCI) += wsp_pci.o | 9 | obj-$(CONFIG_PCI) += wsp_pci.o |
8 | obj-$(CONFIG_PCI_MSI) += msi.o \ No newline at end of file | 10 | obj-$(CONFIG_PCI_MSI) += msi.o |
diff --git a/arch/powerpc/platforms/wsp/chroma.c b/arch/powerpc/platforms/wsp/chroma.c new file mode 100644 index 000000000000..ca6fa26f6e63 --- /dev/null +++ b/arch/powerpc/platforms/wsp/chroma.c | |||
@@ -0,0 +1,56 @@ | |||
1 | /* | ||
2 | * Copyright 2008-2011, IBM Corporation | ||
3 | * | ||
4 | * This program is free software; you can redistribute it and/or | ||
5 | * modify it under the terms of the GNU General Public License | ||
6 | * as published by the Free Software Foundation; either version | ||
7 | * 2 of the License, or (at your option) any later version. | ||
8 | */ | ||
9 | |||
10 | #include <linux/delay.h> | ||
11 | #include <linux/init.h> | ||
12 | #include <linux/irq.h> | ||
13 | #include <linux/kernel.h> | ||
14 | #include <linux/mm.h> | ||
15 | #include <linux/of.h> | ||
16 | #include <linux/smp.h> | ||
17 | #include <linux/time.h> | ||
18 | |||
19 | #include <asm/machdep.h> | ||
20 | #include <asm/system.h> | ||
21 | #include <asm/udbg.h> | ||
22 | |||
23 | #include "ics.h" | ||
24 | #include "wsp.h" | ||
25 | |||
26 | void __init chroma_setup_arch(void) | ||
27 | { | ||
28 | wsp_setup_arch(); | ||
29 | wsp_setup_h8(); | ||
30 | |||
31 | } | ||
32 | |||
33 | static int __init chroma_probe(void) | ||
34 | { | ||
35 | unsigned long root = of_get_flat_dt_root(); | ||
36 | |||
37 | if (!of_flat_dt_is_compatible(root, "ibm,wsp-chroma")) | ||
38 | return 0; | ||
39 | |||
40 | return 1; | ||
41 | } | ||
42 | |||
43 | define_machine(chroma_md) { | ||
44 | .name = "Chroma PCIe", | ||
45 | .probe = chroma_probe, | ||
46 | .setup_arch = chroma_setup_arch, | ||
47 | .restart = wsp_h8_restart, | ||
48 | .power_off = wsp_h8_power_off, | ||
49 | .halt = wsp_halt, | ||
50 | .calibrate_decr = generic_calibrate_decr, | ||
51 | .init_IRQ = wsp_setup_irq, | ||
52 | .progress = udbg_progress, | ||
53 | .power_save = book3e_idle, | ||
54 | }; | ||
55 | |||
56 | machine_arch_initcall(chroma_md, wsp_probe_devices); | ||
diff --git a/arch/powerpc/platforms/wsp/h8.c b/arch/powerpc/platforms/wsp/h8.c new file mode 100644 index 000000000000..d18e6cc19df3 --- /dev/null +++ b/arch/powerpc/platforms/wsp/h8.c | |||
@@ -0,0 +1,134 @@ | |||
1 | /* | ||
2 | * Copyright 2008-2011, IBM Corporation | ||
3 | * | ||
4 | * This program is free software; you can redistribute it and/or | ||
5 | * modify it under the terms of the GNU General Public License | ||
6 | * as published by the Free Software Foundation; either version | ||
7 | * 2 of the License, or (at your option) any later version. | ||
8 | */ | ||
9 | |||
10 | #include <linux/kernel.h> | ||
11 | #include <linux/of.h> | ||
12 | #include <linux/io.h> | ||
13 | |||
14 | #include "wsp.h" | ||
15 | |||
16 | /* | ||
17 | * The UART connection to the H8 is over ttyS1 which is just a 16550. | ||
18 | * We assume that FW has it setup right and no one messes with it. | ||
19 | */ | ||
20 | |||
21 | |||
22 | static u8 __iomem *h8; | ||
23 | |||
24 | #define RBR 0 /* Receiver Buffer Register */ | ||
25 | #define THR 0 /* Transmitter Holding Register */ | ||
26 | #define LSR 5 /* Line Status Register */ | ||
27 | #define LSR_DR 0x01 /* LSR value for Data-Ready */ | ||
28 | #define LSR_THRE 0x20 /* LSR value for Transmitter-Holding-Register-Empty */ | ||
29 | static void wsp_h8_putc(int c) | ||
30 | { | ||
31 | u8 lsr; | ||
32 | |||
33 | do { | ||
34 | lsr = readb(h8 + LSR); | ||
35 | } while ((lsr & LSR_THRE) != LSR_THRE); | ||
36 | writeb(c, h8 + THR); | ||
37 | } | ||
38 | |||
39 | static int wsp_h8_getc(void) | ||
40 | { | ||
41 | u8 lsr; | ||
42 | |||
43 | do { | ||
44 | lsr = readb(h8 + LSR); | ||
45 | } while ((lsr & LSR_DR) != LSR_DR); | ||
46 | |||
47 | return readb(h8 + RBR); | ||
48 | } | ||
49 | |||
50 | static void wsp_h8_puts(const char *s, int sz) | ||
51 | { | ||
52 | int i; | ||
53 | |||
54 | for (i = 0; i < sz; i++) { | ||
55 | wsp_h8_putc(s[i]); | ||
56 | |||
57 | /* no flow control so wait for echo */ | ||
58 | wsp_h8_getc(); | ||
59 | } | ||
60 | wsp_h8_putc('\r'); | ||
61 | wsp_h8_putc('\n'); | ||
62 | } | ||
63 | |||
64 | static void wsp_h8_terminal_cmd(const char *cmd, int sz) | ||
65 | { | ||
66 | hard_irq_disable(); | ||
67 | wsp_h8_puts(cmd, sz); | ||
68 | /* should never return, but just in case */ | ||
69 | for (;;) | ||
70 | continue; | ||
71 | } | ||
72 | |||
73 | |||
74 | void wsp_h8_restart(char *cmd) | ||
75 | { | ||
76 | static const char restart[] = "warm-reset"; | ||
77 | |||
78 | (void)cmd; | ||
79 | wsp_h8_terminal_cmd(restart, sizeof(restart) - 1); | ||
80 | } | ||
81 | |||
82 | void wsp_h8_power_off(void) | ||
83 | { | ||
84 | static const char off[] = "power-off"; | ||
85 | |||
86 | wsp_h8_terminal_cmd(off, sizeof(off) - 1); | ||
87 | } | ||
88 | |||
89 | static void __iomem *wsp_h8_getaddr(void) | ||
90 | { | ||
91 | struct device_node *aliases; | ||
92 | struct device_node *uart; | ||
93 | struct property *path; | ||
94 | void __iomem *va = NULL; | ||
95 | |||
96 | /* | ||
97 | * there is nothing in the devtree to tell us which is mapped | ||
98 | * to the H8, but se know it is the second serial port. | ||
99 | */ | ||
100 | |||
101 | aliases = of_find_node_by_path("/aliases"); | ||
102 | if (aliases == NULL) | ||
103 | return NULL; | ||
104 | |||
105 | path = of_find_property(aliases, "serial1", NULL); | ||
106 | if (path == NULL) | ||
107 | goto out; | ||
108 | |||
109 | uart = of_find_node_by_path(path->value); | ||
110 | if (uart == NULL) | ||
111 | goto out; | ||
112 | |||
113 | va = of_iomap(uart, 0); | ||
114 | |||
115 | /* remove it so no one messes with it */ | ||
116 | of_detach_node(uart); | ||
117 | of_node_put(uart); | ||
118 | |||
119 | out: | ||
120 | of_node_put(aliases); | ||
121 | |||
122 | return va; | ||
123 | } | ||
124 | |||
125 | void __init wsp_setup_h8(void) | ||
126 | { | ||
127 | h8 = wsp_h8_getaddr(); | ||
128 | |||
129 | /* Devtree change? lets hard map it anyway */ | ||
130 | if (h8 == NULL) { | ||
131 | pr_warn("UART to H8 could not be found"); | ||
132 | h8 = ioremap(0xffc0008000ULL, 0x100); | ||
133 | } | ||
134 | } | ||
diff --git a/arch/powerpc/platforms/wsp/psr2.c b/arch/powerpc/platforms/wsp/psr2.c index 166f2e4b4bee..0c1ae06d0be1 100644 --- a/arch/powerpc/platforms/wsp/psr2.c +++ b/arch/powerpc/platforms/wsp/psr2.c | |||
@@ -14,10 +14,10 @@ | |||
14 | #include <linux/mm.h> | 14 | #include <linux/mm.h> |
15 | #include <linux/of.h> | 15 | #include <linux/of.h> |
16 | #include <linux/smp.h> | 16 | #include <linux/smp.h> |
17 | #include <linux/time.h> | ||
17 | 18 | ||
18 | #include <asm/machdep.h> | 19 | #include <asm/machdep.h> |
19 | #include <asm/system.h> | 20 | #include <asm/system.h> |
20 | #include <asm/time.h> | ||
21 | #include <asm/udbg.h> | 21 | #include <asm/udbg.h> |
22 | 22 | ||
23 | #include "ics.h" | 23 | #include "ics.h" |
@@ -27,7 +27,8 @@ | |||
27 | static void psr2_spin(void) | 27 | static void psr2_spin(void) |
28 | { | 28 | { |
29 | hard_irq_disable(); | 29 | hard_irq_disable(); |
30 | for (;;) ; | 30 | for (;;) |
31 | continue; | ||
31 | } | 32 | } |
32 | 33 | ||
33 | static void psr2_restart(char *cmd) | 34 | static void psr2_restart(char *cmd) |
@@ -35,65 +36,32 @@ static void psr2_restart(char *cmd) | |||
35 | psr2_spin(); | 36 | psr2_spin(); |
36 | } | 37 | } |
37 | 38 | ||
38 | static int psr2_probe_devices(void) | ||
39 | { | ||
40 | struct device_node *np; | ||
41 | |||
42 | /* Our RTC is a ds1500. It seems to be programatically compatible | ||
43 | * with the ds1511 for which we have a driver so let's use that | ||
44 | */ | ||
45 | np = of_find_compatible_node(NULL, NULL, "dallas,ds1500"); | ||
46 | if (np != NULL) { | ||
47 | struct resource res; | ||
48 | if (of_address_to_resource(np, 0, &res) == 0) | ||
49 | platform_device_register_simple("ds1511", 0, &res, 1); | ||
50 | } | ||
51 | return 0; | ||
52 | } | ||
53 | machine_arch_initcall(psr2_md, psr2_probe_devices); | ||
54 | |||
55 | static void __init psr2_setup_arch(void) | ||
56 | { | ||
57 | /* init to some ~sane value until calibrate_delay() runs */ | ||
58 | loops_per_jiffy = 50000000; | ||
59 | |||
60 | scom_init_wsp(); | ||
61 | |||
62 | /* Setup SMP callback */ | ||
63 | #ifdef CONFIG_SMP | ||
64 | a2_setup_smp(); | ||
65 | #endif | ||
66 | #ifdef CONFIG_PCI | ||
67 | wsp_setup_pci(); | ||
68 | #endif | ||
69 | |||
70 | } | ||
71 | |||
72 | static int __init psr2_probe(void) | 39 | static int __init psr2_probe(void) |
73 | { | 40 | { |
74 | unsigned long root = of_get_flat_dt_root(); | 41 | unsigned long root = of_get_flat_dt_root(); |
75 | 42 | ||
43 | if (of_flat_dt_is_compatible(root, "ibm,wsp-chroma")) { | ||
44 | /* chroma systems also claim they are psr2s */ | ||
45 | return 0; | ||
46 | } | ||
47 | |||
76 | if (!of_flat_dt_is_compatible(root, "ibm,psr2")) | 48 | if (!of_flat_dt_is_compatible(root, "ibm,psr2")) |
77 | return 0; | 49 | return 0; |
78 | 50 | ||
79 | return 1; | 51 | return 1; |
80 | } | 52 | } |
81 | 53 | ||
82 | static void __init psr2_init_irq(void) | ||
83 | { | ||
84 | wsp_init_irq(); | ||
85 | opb_pic_init(); | ||
86 | } | ||
87 | |||
88 | define_machine(psr2_md) { | 54 | define_machine(psr2_md) { |
89 | .name = "PSR2 A2", | 55 | .name = "PSR2 A2", |
90 | .probe = psr2_probe, | 56 | .probe = psr2_probe, |
91 | .setup_arch = psr2_setup_arch, | 57 | .setup_arch = wsp_setup_arch, |
92 | .restart = psr2_restart, | 58 | .restart = psr2_restart, |
93 | .power_off = psr2_spin, | 59 | .power_off = psr2_spin, |
94 | .halt = psr2_spin, | 60 | .halt = psr2_spin, |
95 | .calibrate_decr = generic_calibrate_decr, | 61 | .calibrate_decr = generic_calibrate_decr, |
96 | .init_IRQ = psr2_init_irq, | 62 | .init_IRQ = wsp_setup_irq, |
97 | .progress = udbg_progress, | 63 | .progress = udbg_progress, |
98 | .power_save = book3e_idle, | 64 | .power_save = book3e_idle, |
99 | }; | 65 | }; |
66 | |||
67 | machine_arch_initcall(psr2_md, wsp_probe_devices); | ||
diff --git a/arch/powerpc/platforms/wsp/wsp.c b/arch/powerpc/platforms/wsp/wsp.c new file mode 100644 index 000000000000..d25cc96c21b8 --- /dev/null +++ b/arch/powerpc/platforms/wsp/wsp.c | |||
@@ -0,0 +1,115 @@ | |||
1 | /* | ||
2 | * Copyright 2008-2011, IBM Corporation | ||
3 | * | ||
4 | * This program is free software; you can redistribute it and/or | ||
5 | * modify it under the terms of the GNU General Public License | ||
6 | * as published by the Free Software Foundation; either version | ||
7 | * 2 of the License, or (at your option) any later version. | ||
8 | */ | ||
9 | |||
10 | #include <linux/kernel.h> | ||
11 | #include <linux/of.h> | ||
12 | #include <linux/of_device.h> | ||
13 | #include <linux/smp.h> | ||
14 | #include <linux/delay.h> | ||
15 | #include <linux/time.h> | ||
16 | |||
17 | #include <asm/scom.h> | ||
18 | |||
19 | #include "wsp.h" | ||
20 | #include "ics.h" | ||
21 | |||
22 | #define WSP_SOC_COMPATIBLE "ibm,wsp-soc" | ||
23 | #define PBIC_COMPATIBLE "ibm,wsp-pbic" | ||
24 | #define COPRO_COMPATIBLE "ibm,wsp-coprocessor" | ||
25 | |||
26 | static int __init wsp_probe_buses(void) | ||
27 | { | ||
28 | static __initdata struct of_device_id bus_ids[] = { | ||
29 | /* | ||
30 | * every node in between needs to be here or you won't | ||
31 | * find it | ||
32 | */ | ||
33 | { .compatible = WSP_SOC_COMPATIBLE, }, | ||
34 | { .compatible = PBIC_COMPATIBLE, }, | ||
35 | { .compatible = COPRO_COMPATIBLE, }, | ||
36 | {}, | ||
37 | }; | ||
38 | of_platform_bus_probe(NULL, bus_ids, NULL); | ||
39 | |||
40 | return 0; | ||
41 | } | ||
42 | |||
43 | void __init wsp_setup_arch(void) | ||
44 | { | ||
45 | /* init to some ~sane value until calibrate_delay() runs */ | ||
46 | loops_per_jiffy = 50000000; | ||
47 | |||
48 | scom_init_wsp(); | ||
49 | |||
50 | /* Setup SMP callback */ | ||
51 | #ifdef CONFIG_SMP | ||
52 | a2_setup_smp(); | ||
53 | #endif | ||
54 | #ifdef CONFIG_PCI | ||
55 | wsp_setup_pci(); | ||
56 | #endif | ||
57 | } | ||
58 | |||
59 | void __init wsp_setup_irq(void) | ||
60 | { | ||
61 | wsp_init_irq(); | ||
62 | opb_pic_init(); | ||
63 | } | ||
64 | |||
65 | |||
66 | int __init wsp_probe_devices(void) | ||
67 | { | ||
68 | struct device_node *np; | ||
69 | |||
70 | /* Our RTC is a ds1500. It seems to be programatically compatible | ||
71 | * with the ds1511 for which we have a driver so let's use that | ||
72 | */ | ||
73 | np = of_find_compatible_node(NULL, NULL, "dallas,ds1500"); | ||
74 | if (np != NULL) { | ||
75 | struct resource res; | ||
76 | if (of_address_to_resource(np, 0, &res) == 0) | ||
77 | platform_device_register_simple("ds1511", 0, &res, 1); | ||
78 | } | ||
79 | |||
80 | wsp_probe_buses(); | ||
81 | |||
82 | return 0; | ||
83 | } | ||
84 | |||
85 | void wsp_halt(void) | ||
86 | { | ||
87 | u64 val; | ||
88 | scom_map_t m; | ||
89 | struct device_node *dn; | ||
90 | struct device_node *mine; | ||
91 | struct device_node *me; | ||
92 | |||
93 | me = of_get_cpu_node(smp_processor_id(), NULL); | ||
94 | mine = scom_find_parent(me); | ||
95 | |||
96 | /* This will halt all the A2s but not power off the chip */ | ||
97 | for_each_node_with_property(dn, "scom-controller") { | ||
98 | if (dn == mine) | ||
99 | continue; | ||
100 | m = scom_map(dn, 0, 1); | ||
101 | |||
102 | /* read-modify-write it so the HW probe does not get | ||
103 | * confused */ | ||
104 | val = scom_read(m, 0); | ||
105 | val |= 1; | ||
106 | scom_write(m, 0, val); | ||
107 | scom_unmap(m); | ||
108 | } | ||
109 | m = scom_map(mine, 0, 1); | ||
110 | val = scom_read(m, 0); | ||
111 | val |= 1; | ||
112 | scom_write(m, 0, val); | ||
113 | /* should never return */ | ||
114 | scom_unmap(m); | ||
115 | } | ||
diff --git a/arch/powerpc/platforms/wsp/wsp.h b/arch/powerpc/platforms/wsp/wsp.h index 33479818f62a..10c1d1fff362 100644 --- a/arch/powerpc/platforms/wsp/wsp.h +++ b/arch/powerpc/platforms/wsp/wsp.h | |||
@@ -6,15 +6,25 @@ | |||
6 | /* Devtree compatible strings for major devices */ | 6 | /* Devtree compatible strings for major devices */ |
7 | #define PCIE_COMPATIBLE "ibm,wsp-pciex" | 7 | #define PCIE_COMPATIBLE "ibm,wsp-pciex" |
8 | 8 | ||
9 | extern void wsp_setup_arch(void); | ||
10 | extern void wsp_setup_irq(void); | ||
11 | extern int wsp_probe_devices(void); | ||
12 | extern void wsp_halt(void); | ||
13 | |||
9 | extern void wsp_setup_pci(void); | 14 | extern void wsp_setup_pci(void); |
10 | extern void scom_init_wsp(void); | 15 | extern void scom_init_wsp(void); |
11 | 16 | ||
12 | extern void a2_setup_smp(void); | 17 | extern void a2_setup_smp(void); |
13 | extern int a2_scom_startup_cpu(unsigned int lcpu, int thr_idx, | 18 | extern int a2_scom_startup_cpu(unsigned int lcpu, int thr_idx, |
14 | struct device_node *np); | 19 | struct device_node *np); |
15 | int smp_a2_cpu_bootable(unsigned int nr); | 20 | extern int smp_a2_cpu_bootable(unsigned int nr); |
16 | int __devinit smp_a2_kick_cpu(int nr); | 21 | extern int __devinit smp_a2_kick_cpu(int nr); |
22 | |||
23 | extern void opb_pic_init(void); | ||
17 | 24 | ||
18 | void opb_pic_init(void); | 25 | /* chroma specific managment */ |
26 | extern void wsp_h8_restart(char *cmd); | ||
27 | extern void wsp_h8_power_off(void); | ||
28 | extern void __init wsp_setup_h8(void); | ||
19 | 29 | ||
20 | #endif /* __WSP_H */ | 30 | #endif /* __WSP_H */ |