diff options
author | Olof Johansson <olof@lixom.net> | 2013-09-26 00:55:46 -0400 |
---|---|---|
committer | Olof Johansson <olof@lixom.net> | 2013-09-26 00:55:46 -0400 |
commit | ec01791d0ff7593fbca21a93167138a49bb94768 (patch) | |
tree | 0ad8cae51d4bcd939665d0eaf1daebcfee507639 /arch | |
parent | f7df257a2cb0856aa3375316e8cc6d40c2c9cbe4 (diff) | |
parent | fc6ad619a5d29c94e3eecefa572dc1d4fefdc240 (diff) |
Merge tag 'del-shark-for-v3.13' of git://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-stericsson into next/cleanup
From Linus Walleij:
This deletes the Shark SA110-based sub-architecture from
the kernel.
* tag 'del-shark-for-v3.13' of git://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-stericsson:
video: drop code for ARCH_SHARK in cyber2000fb
input: i8042: drop dependency on ARCH_SHARK
ide: drop dependency on ARCH_SHARK
block: drop dependency on ARCH_SHARK
MAINTAINERS: delete Shark machine entry
ARM: delete mach-shark
Signed-off-by: Olof Johansson <olof@lixom.net>
Diffstat (limited to 'arch')
27 files changed, 0 insertions, 1281 deletions
diff --git a/arch/arm/Kconfig b/arch/arm/Kconfig index 3f7714d8d2d2..2b8faa337e8b 100644 --- a/arch/arm/Kconfig +++ b/arch/arm/Kconfig | |||
@@ -824,20 +824,6 @@ config ARCH_EXYNOS | |||
824 | help | 824 | help |
825 | Support for SAMSUNG's EXYNOS SoCs (EXYNOS4/5) | 825 | Support for SAMSUNG's EXYNOS SoCs (EXYNOS4/5) |
826 | 826 | ||
827 | config ARCH_SHARK | ||
828 | bool "Shark" | ||
829 | select ARCH_USES_GETTIMEOFFSET | ||
830 | select CPU_SA110 | ||
831 | select ISA | ||
832 | select ISA_DMA | ||
833 | select NEED_MACH_MEMORY_H | ||
834 | select PCI | ||
835 | select VIRT_TO_BUS | ||
836 | select ZONE_DMA | ||
837 | help | ||
838 | Support for the StrongARM based Digital DNARD machine, also known | ||
839 | as "Shark" (<http://www.shark-linux.de/shark.html>). | ||
840 | |||
841 | config ARCH_DAVINCI | 827 | config ARCH_DAVINCI |
842 | bool "TI DaVinci" | 828 | bool "TI DaVinci" |
843 | select ARCH_HAS_HOLES_MEMORYMODEL | 829 | select ARCH_HAS_HOLES_MEMORYMODEL |
@@ -1431,12 +1417,6 @@ config PCI_NANOENGINE | |||
1431 | config PCI_SYSCALL | 1417 | config PCI_SYSCALL |
1432 | def_bool PCI | 1418 | def_bool PCI |
1433 | 1419 | ||
1434 | # Select the host bridge type | ||
1435 | config PCI_HOST_VIA82C505 | ||
1436 | bool | ||
1437 | depends on PCI && ARCH_SHARK | ||
1438 | default y | ||
1439 | |||
1440 | config PCI_HOST_ITE8152 | 1420 | config PCI_HOST_ITE8152 |
1441 | bool | 1421 | bool |
1442 | depends on PCI && MACH_ARMCORE | 1422 | depends on PCI && MACH_ARMCORE |
diff --git a/arch/arm/Makefile b/arch/arm/Makefile index a37a50f575a2..92a90fefddec 100644 --- a/arch/arm/Makefile +++ b/arch/arm/Makefile | |||
@@ -188,7 +188,6 @@ machine-$(CONFIG_ARCH_S5P64X0) += s5p64x0 | |||
188 | machine-$(CONFIG_ARCH_S5PC100) += s5pc100 | 188 | machine-$(CONFIG_ARCH_S5PC100) += s5pc100 |
189 | machine-$(CONFIG_ARCH_S5PV210) += s5pv210 | 189 | machine-$(CONFIG_ARCH_S5PV210) += s5pv210 |
190 | machine-$(CONFIG_ARCH_SA1100) += sa1100 | 190 | machine-$(CONFIG_ARCH_SA1100) += sa1100 |
191 | machine-$(CONFIG_ARCH_SHARK) += shark | ||
192 | machine-$(CONFIG_ARCH_SHMOBILE) += shmobile | 191 | machine-$(CONFIG_ARCH_SHMOBILE) += shmobile |
193 | machine-$(CONFIG_ARCH_SHMOBILE_MULTI) += shmobile | 192 | machine-$(CONFIG_ARCH_SHMOBILE_MULTI) += shmobile |
194 | machine-$(CONFIG_ARCH_SIRF) += prima2 | 193 | machine-$(CONFIG_ARCH_SIRF) += prima2 |
diff --git a/arch/arm/boot/compressed/Makefile b/arch/arm/boot/compressed/Makefile index 7ac1610252ba..e7190bb5998e 100644 --- a/arch/arm/boot/compressed/Makefile +++ b/arch/arm/boot/compressed/Makefile | |||
@@ -44,10 +44,6 @@ ifeq ($(CONFIG_ARCH_ACORN),y) | |||
44 | OBJS += ll_char_wr.o font.o | 44 | OBJS += ll_char_wr.o font.o |
45 | endif | 45 | endif |
46 | 46 | ||
47 | ifeq ($(CONFIG_ARCH_SHARK),y) | ||
48 | OBJS += head-shark.o ofw-shark.o | ||
49 | endif | ||
50 | |||
51 | ifeq ($(CONFIG_ARCH_SA1100),y) | 47 | ifeq ($(CONFIG_ARCH_SA1100),y) |
52 | OBJS += head-sa1100.o | 48 | OBJS += head-sa1100.o |
53 | endif | 49 | endif |
diff --git a/arch/arm/boot/compressed/head-shark.S b/arch/arm/boot/compressed/head-shark.S deleted file mode 100644 index 92b56897ed64..000000000000 --- a/arch/arm/boot/compressed/head-shark.S +++ /dev/null | |||
@@ -1,140 +0,0 @@ | |||
1 | /* The head-file for the Shark | ||
2 | * by Alexander Schulz | ||
3 | * | ||
4 | * Does the following: | ||
5 | * - get the memory layout from firmware. This can only be done as long as the mmu | ||
6 | * is still on. | ||
7 | * - switch the mmu off, so we have physical addresses | ||
8 | * - copy the kernel to 0x08508000. This is done to have a fixed address where the | ||
9 | * C-parts (misc.c) are executed. This address must be known at compile-time, | ||
10 | * but the load-address of the kernel depends on how much memory is installed. | ||
11 | * - Jump to this location. | ||
12 | * - Set r8 with 0, r7 with the architecture ID for head.S | ||
13 | */ | ||
14 | |||
15 | #include <linux/linkage.h> | ||
16 | |||
17 | #include <asm/assembler.h> | ||
18 | |||
19 | .section ".start", "ax" | ||
20 | |||
21 | .arch armv4 | ||
22 | b __beginning | ||
23 | |||
24 | __ofw_data: .long 0 @ the number of memory blocks | ||
25 | .space 128 @ (startaddr,size) ... | ||
26 | .space 128 @ bootargs | ||
27 | .align | ||
28 | |||
29 | __beginning: mov r4, r0 @ save the entry to the firmware | ||
30 | |||
31 | mov r0, #0xC0 @ disable irq and fiq | ||
32 | mov r1, r0 | ||
33 | mrs r3, cpsr | ||
34 | bic r2, r3, r0 | ||
35 | eor r2, r2, r1 | ||
36 | msr cpsr_c, r2 | ||
37 | |||
38 | mov r0, r4 @ get the Memory layout from firmware | ||
39 | adr r1, __ofw_data | ||
40 | add r2, r1, #4 | ||
41 | mov lr, pc | ||
42 | b ofw_init | ||
43 | mov r1, #0 | ||
44 | |||
45 | adr r2, __mmu_off @ calculate physical address | ||
46 | sub r2, r2, #0xf0000000 @ openprom maps us at f000 virt, 0e50 phys | ||
47 | adr r0, __ofw_data | ||
48 | ldr r0, [r0, #4] | ||
49 | add r2, r2, r0 | ||
50 | add r2, r2, #0x00500000 | ||
51 | |||
52 | mrc p15, 0, r3, c1, c0 | ||
53 | bic r3, r3, #0xC @ Write Buffer and DCache | ||
54 | bic r3, r3, #0x1000 @ ICache | ||
55 | mcr p15, 0, r3, c1, c0 @ disabled | ||
56 | |||
57 | mov r0, #0 | ||
58 | mcr p15, 0, r0, c7, c7 @ flush I,D caches on v4 | ||
59 | mcr p15, 0, r0, c7, c10, 4 @ drain write buffer on v4 | ||
60 | mcr p15, 0, r0, c8, c7 @ flush I,D TLBs on v4 | ||
61 | |||
62 | bic r3, r3, #0x1 @ MMU | ||
63 | mcr p15, 0, r3, c1, c0 @ disabled | ||
64 | |||
65 | mov pc, r2 | ||
66 | |||
67 | __copy_target: .long 0x08507FFC | ||
68 | __copy_end: .long 0x08607FFC | ||
69 | |||
70 | .word _start | ||
71 | .word __bss_start | ||
72 | |||
73 | .align | ||
74 | __temp_stack: .space 128 | ||
75 | |||
76 | __mmu_off: | ||
77 | adr r0, __ofw_data @ read the 1. entry of the memory map | ||
78 | ldr r0, [r0, #4] | ||
79 | orr r0, r0, #0x00600000 | ||
80 | sub r0, r0, #4 | ||
81 | |||
82 | ldr r1, __copy_end | ||
83 | ldr r3, __copy_target | ||
84 | |||
85 | /* r0 = 0x0e600000 (current end of kernelcode) | ||
86 | * r3 = 0x08508000 (where it should begin) | ||
87 | * r1 = 0x08608000 (end of copying area, 1MB) | ||
88 | * The kernel is compressed, so 1 MB should be enough. | ||
89 | * copy the kernel to the beginning of physical memory | ||
90 | * We start from the highest address, so we can copy | ||
91 | * from 0x08500000 to 0x08508000 if we have only 8MB | ||
92 | */ | ||
93 | |||
94 | /* As we get more 2.6-kernels it gets more and more | ||
95 | * uncomfortable to be bound to kernel images of 1MB only. | ||
96 | * So we add a loop here, to be able to copy some more. | ||
97 | * Alexander Schulz 2005-07-17 | ||
98 | */ | ||
99 | |||
100 | mov r4, #3 @ How many megabytes to copy | ||
101 | |||
102 | |||
103 | __MoveCode: sub r4, r4, #1 | ||
104 | |||
105 | __Copy: ldr r2, [r0], #-4 | ||
106 | str r2, [r1], #-4 | ||
107 | teq r1, r3 | ||
108 | bne __Copy | ||
109 | |||
110 | /* The firmware maps us in blocks of 1 MB, the next block is | ||
111 | _below_ the last one. So our decrementing source pointer | ||
112 | ist right here, but the destination pointer must be increased | ||
113 | by 2 MB */ | ||
114 | add r1, r1, #0x00200000 | ||
115 | add r3, r3, #0x00100000 | ||
116 | |||
117 | teq r4, #0 | ||
118 | bne __MoveCode | ||
119 | |||
120 | |||
121 | /* and jump to it */ | ||
122 | adr r2, __go_on @ where we want to jump | ||
123 | adr r0, __ofw_data @ read the 1. entry of the memory map | ||
124 | ldr r0, [r0, #4] | ||
125 | sub r2, r2, r0 @ we are mapped add 0e50 now, sub that (-0e00) | ||
126 | sub r2, r2, #0x00500000 @ -0050 | ||
127 | ldr r0, __copy_target @ and add 0850 8000 instead | ||
128 | add r0, r0, #4 | ||
129 | add r2, r2, r0 | ||
130 | mov pc, r2 @ and jump there | ||
131 | |||
132 | __go_on: | ||
133 | adr sp, __temp_stack | ||
134 | add sp, sp, #128 | ||
135 | adr r0, __ofw_data | ||
136 | mov lr, pc | ||
137 | b create_params | ||
138 | |||
139 | mov r8, #0 | ||
140 | mov r7, #15 | ||
diff --git a/arch/arm/boot/compressed/ofw-shark.c b/arch/arm/boot/compressed/ofw-shark.c deleted file mode 100644 index 465c54b6b128..000000000000 --- a/arch/arm/boot/compressed/ofw-shark.c +++ /dev/null | |||
@@ -1,260 +0,0 @@ | |||
1 | /* | ||
2 | * linux/arch/arm/boot/compressed/ofw-shark.c | ||
3 | * | ||
4 | * by Alexander Schulz | ||
5 | * | ||
6 | * This file is used to get some basic information | ||
7 | * about the memory layout of the shark we are running | ||
8 | * on. Memory is usually divided in blocks a 8 MB. | ||
9 | * And bootargs are copied from OpenFirmware. | ||
10 | */ | ||
11 | |||
12 | |||
13 | #include <linux/kernel.h> | ||
14 | #include <linux/types.h> | ||
15 | #include <asm/setup.h> | ||
16 | #include <asm/page.h> | ||
17 | |||
18 | |||
19 | asmlinkage void | ||
20 | create_params (unsigned long *buffer) | ||
21 | { | ||
22 | /* Is there a better address? Also change in mach-shark/core.c */ | ||
23 | struct tag *tag = (struct tag *) 0x08003000; | ||
24 | int j,i,m,k,nr_banks,size; | ||
25 | unsigned char *c; | ||
26 | |||
27 | k = 0; | ||
28 | |||
29 | /* Head of the taglist */ | ||
30 | tag->hdr.tag = ATAG_CORE; | ||
31 | tag->hdr.size = tag_size(tag_core); | ||
32 | tag->u.core.flags = 1; | ||
33 | tag->u.core.pagesize = PAGE_SIZE; | ||
34 | tag->u.core.rootdev = 0; | ||
35 | |||
36 | /* Build up one tagged block for each memory region */ | ||
37 | size=0; | ||
38 | nr_banks=(unsigned int) buffer[0]; | ||
39 | for (j=0;j<nr_banks;j++){ | ||
40 | /* search the lowest address and put it into the next entry */ | ||
41 | /* not a fast sort algorithm, but there are at most 8 entries */ | ||
42 | /* and this is used only once anyway */ | ||
43 | m=0xffffffff; | ||
44 | for (i=0;i<(unsigned int) buffer[0];i++){ | ||
45 | if (buffer[2*i+1]<m) { | ||
46 | m=buffer[2*i+1]; | ||
47 | k=i; | ||
48 | } | ||
49 | } | ||
50 | |||
51 | tag = tag_next(tag); | ||
52 | tag->hdr.tag = ATAG_MEM; | ||
53 | tag->hdr.size = tag_size(tag_mem32); | ||
54 | tag->u.mem.size = buffer[2*k+2]; | ||
55 | tag->u.mem.start = buffer[2*k+1]; | ||
56 | |||
57 | size += buffer[2*k+2]; | ||
58 | |||
59 | buffer[2*k+1]=0xffffffff; /* mark as copied */ | ||
60 | } | ||
61 | |||
62 | /* The command line */ | ||
63 | tag = tag_next(tag); | ||
64 | tag->hdr.tag = ATAG_CMDLINE; | ||
65 | |||
66 | c=(unsigned char *)(&buffer[34]); | ||
67 | j=0; | ||
68 | while (*c) tag->u.cmdline.cmdline[j++]=*c++; | ||
69 | |||
70 | tag->u.cmdline.cmdline[j]=0; | ||
71 | tag->hdr.size = (j + 7 + sizeof(struct tag_header)) >> 2; | ||
72 | |||
73 | /* Hardware revision */ | ||
74 | tag = tag_next(tag); | ||
75 | tag->hdr.tag = ATAG_REVISION; | ||
76 | tag->hdr.size = tag_size(tag_revision); | ||
77 | tag->u.revision.rev = ((unsigned char) buffer[33])-'0'; | ||
78 | |||
79 | /* End of the taglist */ | ||
80 | tag = tag_next(tag); | ||
81 | tag->hdr.tag = 0; | ||
82 | tag->hdr.size = 0; | ||
83 | } | ||
84 | |||
85 | |||
86 | typedef int (*ofw_handle_t)(void *); | ||
87 | |||
88 | /* Everything below is called with a wrong MMU setting. | ||
89 | * This means: no string constants, no initialization of | ||
90 | * arrays, no global variables! This is ugly but I didn't | ||
91 | * want to write this in assembler :-) | ||
92 | */ | ||
93 | |||
94 | int | ||
95 | of_decode_int(const unsigned char *p) | ||
96 | { | ||
97 | unsigned int i = *p++ << 8; | ||
98 | i = (i + *p++) << 8; | ||
99 | i = (i + *p++) << 8; | ||
100 | return (i + *p); | ||
101 | } | ||
102 | |||
103 | int | ||
104 | OF_finddevice(ofw_handle_t openfirmware, char *name) | ||
105 | { | ||
106 | unsigned int args[8]; | ||
107 | char service[12]; | ||
108 | |||
109 | service[0]='f'; | ||
110 | service[1]='i'; | ||
111 | service[2]='n'; | ||
112 | service[3]='d'; | ||
113 | service[4]='d'; | ||
114 | service[5]='e'; | ||
115 | service[6]='v'; | ||
116 | service[7]='i'; | ||
117 | service[8]='c'; | ||
118 | service[9]='e'; | ||
119 | service[10]='\0'; | ||
120 | |||
121 | args[0]=(unsigned int)service; | ||
122 | args[1]=1; | ||
123 | args[2]=1; | ||
124 | args[3]=(unsigned int)name; | ||
125 | |||
126 | if (openfirmware(args) == -1) | ||
127 | return -1; | ||
128 | return args[4]; | ||
129 | } | ||
130 | |||
131 | int | ||
132 | OF_getproplen(ofw_handle_t openfirmware, int handle, char *prop) | ||
133 | { | ||
134 | unsigned int args[8]; | ||
135 | char service[12]; | ||
136 | |||
137 | service[0]='g'; | ||
138 | service[1]='e'; | ||
139 | service[2]='t'; | ||
140 | service[3]='p'; | ||
141 | service[4]='r'; | ||
142 | service[5]='o'; | ||
143 | service[6]='p'; | ||
144 | service[7]='l'; | ||
145 | service[8]='e'; | ||
146 | service[9]='n'; | ||
147 | service[10]='\0'; | ||
148 | |||
149 | args[0] = (unsigned int)service; | ||
150 | args[1] = 2; | ||
151 | args[2] = 1; | ||
152 | args[3] = (unsigned int)handle; | ||
153 | args[4] = (unsigned int)prop; | ||
154 | |||
155 | if (openfirmware(args) == -1) | ||
156 | return -1; | ||
157 | return args[5]; | ||
158 | } | ||
159 | |||
160 | int | ||
161 | OF_getprop(ofw_handle_t openfirmware, int handle, char *prop, void *buf, unsigned int buflen) | ||
162 | { | ||
163 | unsigned int args[8]; | ||
164 | char service[8]; | ||
165 | |||
166 | service[0]='g'; | ||
167 | service[1]='e'; | ||
168 | service[2]='t'; | ||
169 | service[3]='p'; | ||
170 | service[4]='r'; | ||
171 | service[5]='o'; | ||
172 | service[6]='p'; | ||
173 | service[7]='\0'; | ||
174 | |||
175 | args[0] = (unsigned int)service; | ||
176 | args[1] = 4; | ||
177 | args[2] = 1; | ||
178 | args[3] = (unsigned int)handle; | ||
179 | args[4] = (unsigned int)prop; | ||
180 | args[5] = (unsigned int)buf; | ||
181 | args[6] = buflen; | ||
182 | |||
183 | if (openfirmware(args) == -1) | ||
184 | return -1; | ||
185 | return args[7]; | ||
186 | } | ||
187 | |||
188 | asmlinkage void ofw_init(ofw_handle_t o, int *nomr, int *pointer) | ||
189 | { | ||
190 | int phandle,i,mem_len,buffer[32]; | ||
191 | char temp[15]; | ||
192 | |||
193 | temp[0]='/'; | ||
194 | temp[1]='m'; | ||
195 | temp[2]='e'; | ||
196 | temp[3]='m'; | ||
197 | temp[4]='o'; | ||
198 | temp[5]='r'; | ||
199 | temp[6]='y'; | ||
200 | temp[7]='\0'; | ||
201 | |||
202 | phandle=OF_finddevice(o,temp); | ||
203 | |||
204 | temp[0]='r'; | ||
205 | temp[1]='e'; | ||
206 | temp[2]='g'; | ||
207 | temp[3]='\0'; | ||
208 | |||
209 | mem_len = OF_getproplen(o,phandle, temp); | ||
210 | OF_getprop(o,phandle, temp, buffer, mem_len); | ||
211 | *nomr=mem_len >> 3; | ||
212 | |||
213 | for (i=0; i<=mem_len/4; i++) pointer[i]=of_decode_int((const unsigned char *)&buffer[i]); | ||
214 | |||
215 | temp[0]='/'; | ||
216 | temp[1]='c'; | ||
217 | temp[2]='h'; | ||
218 | temp[3]='o'; | ||
219 | temp[4]='s'; | ||
220 | temp[5]='e'; | ||
221 | temp[6]='n'; | ||
222 | temp[7]='\0'; | ||
223 | |||
224 | phandle=OF_finddevice(o,temp); | ||
225 | |||
226 | temp[0]='b'; | ||
227 | temp[1]='o'; | ||
228 | temp[2]='o'; | ||
229 | temp[3]='t'; | ||
230 | temp[4]='a'; | ||
231 | temp[5]='r'; | ||
232 | temp[6]='g'; | ||
233 | temp[7]='s'; | ||
234 | temp[8]='\0'; | ||
235 | |||
236 | mem_len = OF_getproplen(o,phandle, temp); | ||
237 | OF_getprop(o,phandle, temp, buffer, mem_len); | ||
238 | if (mem_len > 128) mem_len=128; | ||
239 | for (i=0; i<=mem_len/4; i++) pointer[i+33]=buffer[i]; | ||
240 | pointer[i+33]=0; | ||
241 | |||
242 | temp[0]='/'; | ||
243 | temp[1]='\0'; | ||
244 | phandle=OF_finddevice(o,temp); | ||
245 | temp[0]='b'; | ||
246 | temp[1]='a'; | ||
247 | temp[2]='n'; | ||
248 | temp[3]='n'; | ||
249 | temp[4]='e'; | ||
250 | temp[5]='r'; | ||
251 | temp[6]='-'; | ||
252 | temp[7]='n'; | ||
253 | temp[8]='a'; | ||
254 | temp[9]='m'; | ||
255 | temp[10]='e'; | ||
256 | temp[11]='\0'; | ||
257 | mem_len = OF_getproplen(o,phandle, temp); | ||
258 | OF_getprop(o,phandle, temp, buffer, mem_len); | ||
259 | * ((unsigned char *) &pointer[32]) = ((unsigned char *) buffer)[mem_len-2]; | ||
260 | } | ||
diff --git a/arch/arm/common/Makefile b/arch/arm/common/Makefile index 8c60f473e976..eaa9cf4705a7 100644 --- a/arch/arm/common/Makefile +++ b/arch/arm/common/Makefile | |||
@@ -6,7 +6,6 @@ obj-y += firmware.o | |||
6 | 6 | ||
7 | obj-$(CONFIG_ICST) += icst.o | 7 | obj-$(CONFIG_ICST) += icst.o |
8 | obj-$(CONFIG_SA1111) += sa1111.o | 8 | obj-$(CONFIG_SA1111) += sa1111.o |
9 | obj-$(CONFIG_PCI_HOST_VIA82C505) += via82c505.o | ||
10 | obj-$(CONFIG_DMABOUNCE) += dmabounce.o | 9 | obj-$(CONFIG_DMABOUNCE) += dmabounce.o |
11 | obj-$(CONFIG_SHARP_LOCOMO) += locomo.o | 10 | obj-$(CONFIG_SHARP_LOCOMO) += locomo.o |
12 | obj-$(CONFIG_SHARP_PARAM) += sharpsl_param.o | 11 | obj-$(CONFIG_SHARP_PARAM) += sharpsl_param.o |
diff --git a/arch/arm/common/via82c505.c b/arch/arm/common/via82c505.c deleted file mode 100644 index 6cb362e56d29..000000000000 --- a/arch/arm/common/via82c505.c +++ /dev/null | |||
@@ -1,83 +0,0 @@ | |||
1 | #include <linux/kernel.h> | ||
2 | #include <linux/pci.h> | ||
3 | #include <linux/interrupt.h> | ||
4 | #include <linux/mm.h> | ||
5 | #include <linux/init.h> | ||
6 | #include <linux/ioport.h> | ||
7 | #include <linux/io.h> | ||
8 | |||
9 | |||
10 | #include <asm/mach/pci.h> | ||
11 | |||
12 | #define MAX_SLOTS 7 | ||
13 | |||
14 | #define CONFIG_CMD(bus, devfn, where) (0x80000000 | (bus->number << 16) | (devfn << 8) | (where & ~3)) | ||
15 | |||
16 | static int | ||
17 | via82c505_read_config(struct pci_bus *bus, unsigned int devfn, int where, | ||
18 | int size, u32 *value) | ||
19 | { | ||
20 | outl(CONFIG_CMD(bus,devfn,where),0xCF8); | ||
21 | switch (size) { | ||
22 | case 1: | ||
23 | *value=inb(0xCFC + (where&3)); | ||
24 | break; | ||
25 | case 2: | ||
26 | *value=inw(0xCFC + (where&2)); | ||
27 | break; | ||
28 | case 4: | ||
29 | *value=inl(0xCFC); | ||
30 | break; | ||
31 | } | ||
32 | return PCIBIOS_SUCCESSFUL; | ||
33 | } | ||
34 | |||
35 | static int | ||
36 | via82c505_write_config(struct pci_bus *bus, unsigned int devfn, int where, | ||
37 | int size, u32 value) | ||
38 | { | ||
39 | outl(CONFIG_CMD(bus,devfn,where),0xCF8); | ||
40 | switch (size) { | ||
41 | case 1: | ||
42 | outb(value, 0xCFC + (where&3)); | ||
43 | break; | ||
44 | case 2: | ||
45 | outw(value, 0xCFC + (where&2)); | ||
46 | break; | ||
47 | case 4: | ||
48 | outl(value, 0xCFC); | ||
49 | break; | ||
50 | } | ||
51 | return PCIBIOS_SUCCESSFUL; | ||
52 | } | ||
53 | |||
54 | struct pci_ops via82c505_ops = { | ||
55 | .read = via82c505_read_config, | ||
56 | .write = via82c505_write_config, | ||
57 | }; | ||
58 | |||
59 | void __init via82c505_preinit(void) | ||
60 | { | ||
61 | printk(KERN_DEBUG "PCI: VIA 82c505\n"); | ||
62 | if (!request_region(0xA8,2,"via config")) { | ||
63 | printk(KERN_WARNING"VIA 82c505: Unable to request region 0xA8\n"); | ||
64 | return; | ||
65 | } | ||
66 | if (!request_region(0xCF8,8,"pci config")) { | ||
67 | printk(KERN_WARNING"VIA 82c505: Unable to request region 0xCF8\n"); | ||
68 | release_region(0xA8, 2); | ||
69 | return; | ||
70 | } | ||
71 | |||
72 | /* Enable compatible Mode */ | ||
73 | outb(0x96,0xA8); | ||
74 | outb(0x18,0xA9); | ||
75 | outb(0x93,0xA8); | ||
76 | outb(0xd0,0xA9); | ||
77 | |||
78 | } | ||
79 | |||
80 | int __init via82c505_setup(int nr, struct pci_sys_data *sys) | ||
81 | { | ||
82 | return (nr == 0); | ||
83 | } | ||
diff --git a/arch/arm/configs/shark_defconfig b/arch/arm/configs/shark_defconfig deleted file mode 100644 index e319b2c56f11..000000000000 --- a/arch/arm/configs/shark_defconfig +++ /dev/null | |||
@@ -1,80 +0,0 @@ | |||
1 | CONFIG_EXPERIMENTAL=y | ||
2 | # CONFIG_LOCALVERSION_AUTO is not set | ||
3 | CONFIG_SYSVIPC=y | ||
4 | CONFIG_LOG_BUF_SHIFT=14 | ||
5 | CONFIG_SYSFS_DEPRECATED_V2=y | ||
6 | CONFIG_SLAB=y | ||
7 | CONFIG_MODULES=y | ||
8 | CONFIG_MODULE_UNLOAD=y | ||
9 | CONFIG_MODULE_FORCE_UNLOAD=y | ||
10 | # CONFIG_BLK_DEV_BSG is not set | ||
11 | CONFIG_ARCH_SHARK=y | ||
12 | CONFIG_LEDS=y | ||
13 | CONFIG_LEDS_TIMER=y | ||
14 | CONFIG_ZBOOT_ROM_TEXT=0x0 | ||
15 | CONFIG_ZBOOT_ROM_BSS=0x0 | ||
16 | CONFIG_FPE_NWFPE=y | ||
17 | CONFIG_NET=y | ||
18 | CONFIG_PACKET=y | ||
19 | CONFIG_UNIX=y | ||
20 | CONFIG_INET=y | ||
21 | # CONFIG_INET_XFRM_MODE_TRANSPORT is not set | ||
22 | # CONFIG_INET_XFRM_MODE_TUNNEL is not set | ||
23 | # CONFIG_INET_XFRM_MODE_BEET is not set | ||
24 | # CONFIG_INET_LRO is not set | ||
25 | # CONFIG_INET_DIAG is not set | ||
26 | # CONFIG_IPV6 is not set | ||
27 | CONFIG_UEVENT_HELPER_PATH="/sbin/hotplug" | ||
28 | # CONFIG_STANDALONE is not set | ||
29 | # CONFIG_FIRMWARE_IN_KERNEL is not set | ||
30 | CONFIG_PARPORT=m | ||
31 | CONFIG_PARPORT_PC=m | ||
32 | CONFIG_BLK_DEV_LOOP=y | ||
33 | CONFIG_BLK_DEV_RAM=y | ||
34 | CONFIG_IDE=y | ||
35 | CONFIG_BLK_DEV_IDECD=m | ||
36 | CONFIG_SCSI=m | ||
37 | CONFIG_BLK_DEV_SD=m | ||
38 | CONFIG_CHR_DEV_ST=m | ||
39 | CONFIG_BLK_DEV_SR=m | ||
40 | CONFIG_CHR_DEV_SG=m | ||
41 | CONFIG_NETDEVICES=y | ||
42 | CONFIG_NET_ETHERNET=y | ||
43 | CONFIG_NET_PCI=y | ||
44 | CONFIG_CS89x0=y | ||
45 | # CONFIG_SERIO_SERPORT is not set | ||
46 | CONFIG_SERIAL_8250=y | ||
47 | CONFIG_SERIAL_8250_CONSOLE=y | ||
48 | CONFIG_PRINTER=m | ||
49 | # CONFIG_HWMON is not set | ||
50 | CONFIG_FB=y | ||
51 | CONFIG_FB_CYBER2000=y | ||
52 | # CONFIG_VGA_CONSOLE is not set | ||
53 | CONFIG_FRAMEBUFFER_CONSOLE=y | ||
54 | CONFIG_LOGO=y | ||
55 | # CONFIG_LOGO_LINUX_MONO is not set | ||
56 | # CONFIG_LOGO_LINUX_VGA16 is not set | ||
57 | CONFIG_SOUND=m | ||
58 | CONFIG_SOUND_PRIME=m | ||
59 | CONFIG_SOUND_OSS=m | ||
60 | CONFIG_SOUND_SB=m | ||
61 | CONFIG_RTC_CLASS=y | ||
62 | CONFIG_RTC_DRV_CMOS=y | ||
63 | CONFIG_EXT2_FS=y | ||
64 | CONFIG_EXT3_FS=y | ||
65 | CONFIG_ISO9660_FS=m | ||
66 | CONFIG_JOLIET=y | ||
67 | CONFIG_MSDOS_FS=m | ||
68 | CONFIG_VFAT_FS=m | ||
69 | CONFIG_NFS_FS=y | ||
70 | CONFIG_NFS_V3=y | ||
71 | CONFIG_NFSD=m | ||
72 | CONFIG_PARTITION_ADVANCED=y | ||
73 | CONFIG_NLS_CODEPAGE_437=m | ||
74 | CONFIG_NLS_CODEPAGE_850=m | ||
75 | CONFIG_NLS_ISO8859_1=m | ||
76 | # CONFIG_ENABLE_MUST_CHECK is not set | ||
77 | CONFIG_DEBUG_KERNEL=y | ||
78 | # CONFIG_SCHED_DEBUG is not set | ||
79 | # CONFIG_RCU_CPU_STALL_DETECTOR is not set | ||
80 | CONFIG_DEBUG_USER=y | ||
diff --git a/arch/arm/include/asm/mach/pci.h b/arch/arm/include/asm/mach/pci.h index 454d642a4070..7fc42784becb 100644 --- a/arch/arm/include/asm/mach/pci.h +++ b/arch/arm/include/asm/mach/pci.h | |||
@@ -106,8 +106,4 @@ extern int dc21285_setup(int nr, struct pci_sys_data *); | |||
106 | extern void dc21285_preinit(void); | 106 | extern void dc21285_preinit(void); |
107 | extern void dc21285_postinit(void); | 107 | extern void dc21285_postinit(void); |
108 | 108 | ||
109 | extern struct pci_ops via82c505_ops; | ||
110 | extern int via82c505_setup(int nr, struct pci_sys_data *); | ||
111 | extern void via82c505_init(void *sysdata); | ||
112 | |||
113 | #endif /* __ASM_MACH_PCI_H */ | 109 | #endif /* __ASM_MACH_PCI_H */ |
diff --git a/arch/arm/lib/Makefile b/arch/arm/lib/Makefile index bd454b09133e..47d7338561de 100644 --- a/arch/arm/lib/Makefile +++ b/arch/arm/lib/Makefile | |||
@@ -41,7 +41,6 @@ else | |||
41 | endif | 41 | endif |
42 | 42 | ||
43 | lib-$(CONFIG_ARCH_RPC) += ecard.o io-acorn.o floppydma.o | 43 | lib-$(CONFIG_ARCH_RPC) += ecard.o io-acorn.o floppydma.o |
44 | lib-$(CONFIG_ARCH_SHARK) += io-shark.o | ||
45 | 44 | ||
46 | $(obj)/csumpartialcopy.o: $(obj)/csumpartialcopygeneric.S | 45 | $(obj)/csumpartialcopy.o: $(obj)/csumpartialcopygeneric.S |
47 | $(obj)/csumpartialcopyuser.o: $(obj)/csumpartialcopygeneric.S | 46 | $(obj)/csumpartialcopyuser.o: $(obj)/csumpartialcopygeneric.S |
diff --git a/arch/arm/lib/io-shark.c b/arch/arm/lib/io-shark.c deleted file mode 100644 index 824253948f51..000000000000 --- a/arch/arm/lib/io-shark.c +++ /dev/null | |||
@@ -1,13 +0,0 @@ | |||
1 | /* | ||
2 | * linux/arch/arm/lib/io-shark.c | ||
3 | * | ||
4 | * by Alexander Schulz | ||
5 | * | ||
6 | * derived from: | ||
7 | * linux/arch/arm/lib/io-ebsa.S | ||
8 | * Copyright (C) 1995, 1996 Russell King | ||
9 | * | ||
10 | * This program is free software; you can redistribute it and/or modify | ||
11 | * it under the terms of the GNU General Public License version 2 as | ||
12 | * published by the Free Software Foundation. | ||
13 | */ | ||
diff --git a/arch/arm/mach-shark/Makefile b/arch/arm/mach-shark/Makefile deleted file mode 100644 index 29657183c452..000000000000 --- a/arch/arm/mach-shark/Makefile +++ /dev/null | |||
@@ -1,10 +0,0 @@ | |||
1 | # | ||
2 | # Makefile for the linux kernel. | ||
3 | # | ||
4 | |||
5 | # Object file lists. | ||
6 | |||
7 | obj-y := core.o dma.o irq.o pci.o leds.o | ||
8 | obj-m := | ||
9 | obj-n := | ||
10 | obj- := | ||
diff --git a/arch/arm/mach-shark/Makefile.boot b/arch/arm/mach-shark/Makefile.boot deleted file mode 100644 index e40e24e4ca34..000000000000 --- a/arch/arm/mach-shark/Makefile.boot +++ /dev/null | |||
@@ -1,2 +0,0 @@ | |||
1 | zreladdr-y += 0x08008000 | ||
2 | |||
diff --git a/arch/arm/mach-shark/core.c b/arch/arm/mach-shark/core.c deleted file mode 100644 index 1d32c5e8eab6..000000000000 --- a/arch/arm/mach-shark/core.c +++ /dev/null | |||
@@ -1,146 +0,0 @@ | |||
1 | /* | ||
2 | * linux/arch/arm/mach-shark/arch.c | ||
3 | * | ||
4 | * Architecture specific stuff. | ||
5 | */ | ||
6 | #include <linux/kernel.h> | ||
7 | #include <linux/init.h> | ||
8 | #include <linux/interrupt.h> | ||
9 | #include <linux/irq.h> | ||
10 | #include <linux/sched.h> | ||
11 | #include <linux/serial_8250.h> | ||
12 | #include <linux/io.h> | ||
13 | #include <linux/cpu.h> | ||
14 | #include <linux/reboot.h> | ||
15 | |||
16 | #include <asm/setup.h> | ||
17 | #include <asm/mach-types.h> | ||
18 | #include <asm/param.h> | ||
19 | #include <asm/system_misc.h> | ||
20 | |||
21 | #include <asm/mach/map.h> | ||
22 | #include <asm/mach/arch.h> | ||
23 | #include <asm/mach/time.h> | ||
24 | |||
25 | #define ROMCARD_SIZE 0x08000000 | ||
26 | #define ROMCARD_START 0x10000000 | ||
27 | |||
28 | static void shark_restart(enum reboot_mode mode, const char *cmd) | ||
29 | { | ||
30 | short temp; | ||
31 | /* Reset the Machine via pc[3] of the sequoia chipset */ | ||
32 | outw(0x09,0x24); | ||
33 | temp=inw(0x26); | ||
34 | temp = temp | (1<<3) | (1<<10); | ||
35 | outw(0x09,0x24); | ||
36 | outw(temp,0x26); | ||
37 | } | ||
38 | |||
39 | static struct plat_serial8250_port serial_platform_data[] = { | ||
40 | { | ||
41 | .iobase = 0x3f8, | ||
42 | .irq = 4, | ||
43 | .uartclk = 1843200, | ||
44 | .regshift = 0, | ||
45 | .iotype = UPIO_PORT, | ||
46 | .flags = UPF_BOOT_AUTOCONF | UPF_SKIP_TEST, | ||
47 | }, | ||
48 | { | ||
49 | .iobase = 0x2f8, | ||
50 | .irq = 3, | ||
51 | .uartclk = 1843200, | ||
52 | .regshift = 0, | ||
53 | .iotype = UPIO_PORT, | ||
54 | .flags = UPF_BOOT_AUTOCONF | UPF_SKIP_TEST, | ||
55 | }, | ||
56 | { }, | ||
57 | }; | ||
58 | |||
59 | static struct platform_device serial_device = { | ||
60 | .name = "serial8250", | ||
61 | .id = PLAT8250_DEV_PLATFORM, | ||
62 | .dev = { | ||
63 | .platform_data = serial_platform_data, | ||
64 | }, | ||
65 | }; | ||
66 | |||
67 | static struct resource rtc_resources[] = { | ||
68 | [0] = { | ||
69 | .start = 0x70, | ||
70 | .end = 0x73, | ||
71 | .flags = IORESOURCE_IO, | ||
72 | }, | ||
73 | [1] = { | ||
74 | .start = IRQ_ISA_RTC_ALARM, | ||
75 | .end = IRQ_ISA_RTC_ALARM, | ||
76 | .flags = IORESOURCE_IRQ, | ||
77 | } | ||
78 | }; | ||
79 | |||
80 | static struct platform_device rtc_device = { | ||
81 | .name = "rtc_cmos", | ||
82 | .id = -1, | ||
83 | .resource = rtc_resources, | ||
84 | .num_resources = ARRAY_SIZE(rtc_resources), | ||
85 | }; | ||
86 | |||
87 | static int __init shark_init(void) | ||
88 | { | ||
89 | int ret; | ||
90 | |||
91 | if (machine_is_shark()) | ||
92 | { | ||
93 | ret = platform_device_register(&rtc_device); | ||
94 | if (ret) printk(KERN_ERR "Unable to register RTC device: %d\n", ret); | ||
95 | ret = platform_device_register(&serial_device); | ||
96 | if (ret) printk(KERN_ERR "Unable to register Serial device: %d\n", ret); | ||
97 | } | ||
98 | return 0; | ||
99 | } | ||
100 | |||
101 | arch_initcall(shark_init); | ||
102 | |||
103 | extern void shark_init_irq(void); | ||
104 | |||
105 | #define IRQ_TIMER 0 | ||
106 | #define HZ_TIME ((1193180 + HZ/2) / HZ) | ||
107 | |||
108 | static irqreturn_t | ||
109 | shark_timer_interrupt(int irq, void *dev_id) | ||
110 | { | ||
111 | timer_tick(); | ||
112 | return IRQ_HANDLED; | ||
113 | } | ||
114 | |||
115 | static struct irqaction shark_timer_irq = { | ||
116 | .name = "Shark Timer Tick", | ||
117 | .flags = IRQF_DISABLED | IRQF_TIMER | IRQF_IRQPOLL, | ||
118 | .handler = shark_timer_interrupt, | ||
119 | }; | ||
120 | |||
121 | /* | ||
122 | * Set up timer interrupt, and return the current time in seconds. | ||
123 | */ | ||
124 | static void __init shark_timer_init(void) | ||
125 | { | ||
126 | outb(0x34, 0x43); /* binary, mode 0, LSB/MSB, Ch 0 */ | ||
127 | outb(HZ_TIME & 0xff, 0x40); /* LSB of count */ | ||
128 | outb(HZ_TIME >> 8, 0x40); | ||
129 | |||
130 | setup_irq(IRQ_TIMER, &shark_timer_irq); | ||
131 | } | ||
132 | |||
133 | static void shark_init_early(void) | ||
134 | { | ||
135 | cpu_idle_poll_ctrl(true); | ||
136 | } | ||
137 | |||
138 | MACHINE_START(SHARK, "Shark") | ||
139 | /* Maintainer: Alexander Schulz */ | ||
140 | .atag_offset = 0x3000, | ||
141 | .init_early = shark_init_early, | ||
142 | .init_irq = shark_init_irq, | ||
143 | .init_time = shark_timer_init, | ||
144 | .dma_zone_size = SZ_4M, | ||
145 | .restart = shark_restart, | ||
146 | MACHINE_END | ||
diff --git a/arch/arm/mach-shark/dma.c b/arch/arm/mach-shark/dma.c deleted file mode 100644 index 10b5b8b3272a..000000000000 --- a/arch/arm/mach-shark/dma.c +++ /dev/null | |||
@@ -1,23 +0,0 @@ | |||
1 | /* | ||
2 | * linux/arch/arm/mach-shark/dma.c | ||
3 | * | ||
4 | * by Alexander Schulz | ||
5 | * | ||
6 | * derived from: | ||
7 | * arch/arm/kernel/dma-ebsa285.c | ||
8 | * Copyright (C) 1998 Phil Blundell | ||
9 | */ | ||
10 | |||
11 | #include <linux/init.h> | ||
12 | |||
13 | #include <asm/dma.h> | ||
14 | #include <asm/mach/dma.h> | ||
15 | |||
16 | static int __init shark_dma_init(void) | ||
17 | { | ||
18 | #ifdef CONFIG_ISA_DMA | ||
19 | isa_init_dma(); | ||
20 | #endif | ||
21 | return 0; | ||
22 | } | ||
23 | core_initcall(shark_dma_init); | ||
diff --git a/arch/arm/mach-shark/include/mach/debug-macro.S b/arch/arm/mach-shark/include/mach/debug-macro.S deleted file mode 100644 index d129119a3f69..000000000000 --- a/arch/arm/mach-shark/include/mach/debug-macro.S +++ /dev/null | |||
@@ -1,34 +0,0 @@ | |||
1 | /* arch/arm/mach-shark/include/mach/debug-macro.S | ||
2 | * | ||
3 | * Debugging macro include header | ||
4 | * | ||
5 | * Copyright (C) 1994-1999 Russell King | ||
6 | * Moved from linux/arch/arm/kernel/debug.S by Ben Dooks | ||
7 | * | ||
8 | * This program is free software; you can redistribute it and/or modify | ||
9 | * it under the terms of the GNU General Public License version 2 as | ||
10 | * published by the Free Software Foundation. | ||
11 | * | ||
12 | */ | ||
13 | |||
14 | .macro addruart, rp, rv, tmp | ||
15 | mov \rp, #0x3f8 | ||
16 | orr \rv, \rp, #0xfe000000 | ||
17 | orr \rv, \rv, #0x00e00000 | ||
18 | orr \rp, \rp, #0x40000000 | ||
19 | .endm | ||
20 | |||
21 | .macro senduart,rd,rx | ||
22 | strb \rd, [\rx] | ||
23 | .endm | ||
24 | |||
25 | .macro waituart,rd,rx | ||
26 | .endm | ||
27 | |||
28 | .macro busyuart,rd,rx | ||
29 | mov \rd, #0 | ||
30 | 1001: add \rd, \rd, #1 | ||
31 | teq \rd, #0x10000 | ||
32 | bne 1001b | ||
33 | .endm | ||
34 | |||
diff --git a/arch/arm/mach-shark/include/mach/entry-macro.S b/arch/arm/mach-shark/include/mach/entry-macro.S deleted file mode 100644 index c9e49f049532..000000000000 --- a/arch/arm/mach-shark/include/mach/entry-macro.S +++ /dev/null | |||
@@ -1,36 +0,0 @@ | |||
1 | /* | ||
2 | * arch/arm/mach-shark/include/mach/entry-macro.S | ||
3 | * | ||
4 | * Low-level IRQ helper macros for Shark platform | ||
5 | * | ||
6 | * This file is licensed under the terms of the GNU General Public | ||
7 | * License version 2. This program is licensed "as is" without any | ||
8 | * warranty of any kind, whether express or implied. | ||
9 | */ | ||
10 | .macro get_irqnr_preamble, base, tmp | ||
11 | mov \base, #0xfe000000 | ||
12 | orr \base, \base, #0x00e00000 | ||
13 | .endm | ||
14 | |||
15 | .macro get_irqnr_and_base, irqnr, irqstat, base, tmp | ||
16 | |||
17 | mov \irqstat, #0x0C | ||
18 | strb \irqstat, [\base, #0x20] @outb(0x0C, 0x20) /* Poll command */ | ||
19 | ldrb \irqnr, [\base, #0x20] @irq = inb(0x20) & 7 | ||
20 | and \irqstat, \irqnr, #0x80 | ||
21 | teq \irqstat, #0 | ||
22 | beq 43f | ||
23 | and \irqnr, \irqnr, #7 | ||
24 | teq \irqnr, #2 | ||
25 | bne 44f | ||
26 | 43: mov \irqstat, #0x0C | ||
27 | strb \irqstat, [\base, #0xa0] @outb(0x0C, 0xA0) /* Poll command */ | ||
28 | ldrb \irqnr, [\base, #0xa0] @irq = (inb(0xA0) & 7) + 8 | ||
29 | and \irqstat, \irqnr, #0x80 | ||
30 | teq \irqstat, #0 | ||
31 | beq 44f | ||
32 | and \irqnr, \irqnr, #7 | ||
33 | add \irqnr, \irqnr, #8 | ||
34 | 44: teq \irqstat, #0 | ||
35 | .endm | ||
36 | |||
diff --git a/arch/arm/mach-shark/include/mach/framebuffer.h b/arch/arm/mach-shark/include/mach/framebuffer.h deleted file mode 100644 index 84a5bf6e5ba3..000000000000 --- a/arch/arm/mach-shark/include/mach/framebuffer.h +++ /dev/null | |||
@@ -1,16 +0,0 @@ | |||
1 | /* | ||
2 | * arch/arm/mach-shark/include/mach/framebuffer.h | ||
3 | * | ||
4 | * by Alexander Schulz | ||
5 | * | ||
6 | */ | ||
7 | |||
8 | #ifndef __ASM_ARCH_FRAMEBUFFER_H | ||
9 | #define __ASM_ARCH_FRAMEBUFFER_H | ||
10 | |||
11 | /* defines for the Framebuffer */ | ||
12 | #define FB_START 0x06000000 | ||
13 | #define FB_SIZE 0x01000000 | ||
14 | |||
15 | #endif | ||
16 | |||
diff --git a/arch/arm/mach-shark/include/mach/hardware.h b/arch/arm/mach-shark/include/mach/hardware.h deleted file mode 100644 index 663f952a8ab3..000000000000 --- a/arch/arm/mach-shark/include/mach/hardware.h +++ /dev/null | |||
@@ -1,16 +0,0 @@ | |||
1 | /* | ||
2 | * arch/arm/mach-shark/include/mach/hardware.h | ||
3 | * | ||
4 | * by Alexander Schulz | ||
5 | * | ||
6 | * derived from: | ||
7 | * arch/arm/mach-ebsa110/include/mach/hardware.h | ||
8 | * Copyright (C) 1996-1999 Russell King. | ||
9 | */ | ||
10 | #ifndef __ASM_ARCH_HARDWARE_H | ||
11 | #define __ASM_ARCH_HARDWARE_H | ||
12 | |||
13 | #define UNCACHEABLE_ADDR 0xdf010000 | ||
14 | |||
15 | #endif | ||
16 | |||
diff --git a/arch/arm/mach-shark/include/mach/irqs.h b/arch/arm/mach-shark/include/mach/irqs.h deleted file mode 100644 index c8e8a4e1f61a..000000000000 --- a/arch/arm/mach-shark/include/mach/irqs.h +++ /dev/null | |||
@@ -1,13 +0,0 @@ | |||
1 | /* | ||
2 | * arch/arm/mach-shark/include/mach/irqs.h | ||
3 | * | ||
4 | * by Alexander Schulz | ||
5 | */ | ||
6 | |||
7 | #define NR_IRQS 16 | ||
8 | |||
9 | #define IRQ_ISA_KEYBOARD 1 | ||
10 | #define IRQ_ISA_RTC_ALARM 8 | ||
11 | #define I8042_KBD_IRQ 1 | ||
12 | #define I8042_AUX_IRQ 12 | ||
13 | #define IRQ_HARDDISK 14 | ||
diff --git a/arch/arm/mach-shark/include/mach/isa-dma.h b/arch/arm/mach-shark/include/mach/isa-dma.h deleted file mode 100644 index 96c43b8f8dda..000000000000 --- a/arch/arm/mach-shark/include/mach/isa-dma.h +++ /dev/null | |||
@@ -1,13 +0,0 @@ | |||
1 | /* | ||
2 | * arch/arm/mach-shark/include/mach/isa-dma.h | ||
3 | * | ||
4 | * by Alexander Schulz | ||
5 | */ | ||
6 | #ifndef __ASM_ARCH_DMA_H | ||
7 | #define __ASM_ARCH_DMA_H | ||
8 | |||
9 | #define MAX_DMA_CHANNELS 8 | ||
10 | #define DMA_ISA_CASCADE 4 | ||
11 | |||
12 | #endif /* _ASM_ARCH_DMA_H */ | ||
13 | |||
diff --git a/arch/arm/mach-shark/include/mach/memory.h b/arch/arm/mach-shark/include/mach/memory.h deleted file mode 100644 index 1cf8d6962617..000000000000 --- a/arch/arm/mach-shark/include/mach/memory.h +++ /dev/null | |||
@@ -1,26 +0,0 @@ | |||
1 | /* | ||
2 | * arch/arm/mach-shark/include/mach/memory.h | ||
3 | * | ||
4 | * by Alexander Schulz | ||
5 | * | ||
6 | * derived from: | ||
7 | * arch/arm/mach-ebsa110/include/mach/memory.h | ||
8 | * Copyright (c) 1996-1999 Russell King. | ||
9 | */ | ||
10 | #ifndef __ASM_ARCH_MEMORY_H | ||
11 | #define __ASM_ARCH_MEMORY_H | ||
12 | |||
13 | #include <asm/sizes.h> | ||
14 | |||
15 | /* | ||
16 | * Physical DRAM offset. | ||
17 | */ | ||
18 | #define PLAT_PHYS_OFFSET UL(0x08000000) | ||
19 | |||
20 | /* | ||
21 | * Cache flushing area | ||
22 | */ | ||
23 | #define FLUSH_BASE_PHYS 0x80000000 | ||
24 | #define FLUSH_BASE 0xdf000000 | ||
25 | |||
26 | #endif | ||
diff --git a/arch/arm/mach-shark/include/mach/timex.h b/arch/arm/mach-shark/include/mach/timex.h deleted file mode 100644 index bb6eeaebed86..000000000000 --- a/arch/arm/mach-shark/include/mach/timex.h +++ /dev/null | |||
@@ -1,7 +0,0 @@ | |||
1 | /* | ||
2 | * arch/arm/mach-shark/include/mach/timex.h | ||
3 | * | ||
4 | * by Alexander Schulz | ||
5 | */ | ||
6 | |||
7 | #define CLOCK_TICK_RATE 1193180 | ||
diff --git a/arch/arm/mach-shark/include/mach/uncompress.h b/arch/arm/mach-shark/include/mach/uncompress.h deleted file mode 100644 index a168435aecc9..000000000000 --- a/arch/arm/mach-shark/include/mach/uncompress.h +++ /dev/null | |||
@@ -1,50 +0,0 @@ | |||
1 | /* | ||
2 | * arch/arm/mach-shark/include/mach/uncompress.h | ||
3 | * by Alexander Schulz | ||
4 | * | ||
5 | * derived from: | ||
6 | * arch/arm/mach-footbridge/include/mach/uncompress.h | ||
7 | * Copyright (C) 1996,1997,1998 Russell King | ||
8 | */ | ||
9 | |||
10 | #define SERIAL_BASE ((volatile unsigned char *)0x400003f8) | ||
11 | |||
12 | static inline void putc(int c) | ||
13 | { | ||
14 | volatile int t; | ||
15 | |||
16 | SERIAL_BASE[0] = c; | ||
17 | t=0x10000; | ||
18 | while (t--); | ||
19 | } | ||
20 | |||
21 | static inline void flush(void) | ||
22 | { | ||
23 | } | ||
24 | |||
25 | #ifdef DEBUG | ||
26 | static void putn(unsigned long z) | ||
27 | { | ||
28 | int i; | ||
29 | char x; | ||
30 | |||
31 | putc('0'); | ||
32 | putc('x'); | ||
33 | for (i=0;i<8;i++) { | ||
34 | x='0'+((z>>((7-i)*4))&0xf); | ||
35 | if (x>'9') x=x-'0'+'A'-10; | ||
36 | putc(x); | ||
37 | } | ||
38 | } | ||
39 | |||
40 | static void putr() | ||
41 | { | ||
42 | putc('\n'); | ||
43 | putc('\r'); | ||
44 | } | ||
45 | #endif | ||
46 | |||
47 | /* | ||
48 | * nothing to do | ||
49 | */ | ||
50 | #define arch_decomp_setup() | ||
diff --git a/arch/arm/mach-shark/irq.c b/arch/arm/mach-shark/irq.c deleted file mode 100644 index 5dce13e429f3..000000000000 --- a/arch/arm/mach-shark/irq.c +++ /dev/null | |||
@@ -1,108 +0,0 @@ | |||
1 | /* | ||
2 | * linux/arch/arm/mach-shark/irq.c | ||
3 | * | ||
4 | * by Alexander Schulz | ||
5 | * | ||
6 | * derived from linux/arch/ppc/kernel/i8259.c and: | ||
7 | * arch/arm/mach-ebsa110/include/mach/irq.h | ||
8 | * Copyright (C) 1996-1998 Russell King | ||
9 | */ | ||
10 | |||
11 | #include <linux/init.h> | ||
12 | #include <linux/fs.h> | ||
13 | #include <linux/interrupt.h> | ||
14 | #include <linux/io.h> | ||
15 | |||
16 | #include <asm/irq.h> | ||
17 | #include <asm/mach/irq.h> | ||
18 | |||
19 | /* | ||
20 | * 8259A PIC functions to handle ISA devices: | ||
21 | */ | ||
22 | |||
23 | /* | ||
24 | * This contains the irq mask for both 8259A irq controllers, | ||
25 | * Let through the cascade-interrupt no. 2 (ff-(1<<2)==fb) | ||
26 | */ | ||
27 | static unsigned char cached_irq_mask[2] = { 0xfb, 0xff }; | ||
28 | |||
29 | /* | ||
30 | * These have to be protected by the irq controller spinlock | ||
31 | * before being called. | ||
32 | */ | ||
33 | static void shark_disable_8259A_irq(struct irq_data *d) | ||
34 | { | ||
35 | unsigned int mask; | ||
36 | if (d->irq<8) { | ||
37 | mask = 1 << d->irq; | ||
38 | cached_irq_mask[0] |= mask; | ||
39 | outb(cached_irq_mask[1],0xA1); | ||
40 | } else { | ||
41 | mask = 1 << (d->irq-8); | ||
42 | cached_irq_mask[1] |= mask; | ||
43 | outb(cached_irq_mask[0],0x21); | ||
44 | } | ||
45 | } | ||
46 | |||
47 | static void shark_enable_8259A_irq(struct irq_data *d) | ||
48 | { | ||
49 | unsigned int mask; | ||
50 | if (d->irq<8) { | ||
51 | mask = ~(1 << d->irq); | ||
52 | cached_irq_mask[0] &= mask; | ||
53 | outb(cached_irq_mask[0],0x21); | ||
54 | } else { | ||
55 | mask = ~(1 << (d->irq-8)); | ||
56 | cached_irq_mask[1] &= mask; | ||
57 | outb(cached_irq_mask[1],0xA1); | ||
58 | } | ||
59 | } | ||
60 | |||
61 | static void shark_ack_8259A_irq(struct irq_data *d){} | ||
62 | |||
63 | static irqreturn_t bogus_int(int irq, void *dev_id) | ||
64 | { | ||
65 | printk("Got interrupt %i!\n",irq); | ||
66 | return IRQ_NONE; | ||
67 | } | ||
68 | |||
69 | static struct irqaction cascade; | ||
70 | |||
71 | static struct irq_chip fb_chip = { | ||
72 | .name = "XT-PIC", | ||
73 | .irq_ack = shark_ack_8259A_irq, | ||
74 | .irq_mask = shark_disable_8259A_irq, | ||
75 | .irq_unmask = shark_enable_8259A_irq, | ||
76 | }; | ||
77 | |||
78 | void __init shark_init_irq(void) | ||
79 | { | ||
80 | int irq; | ||
81 | |||
82 | for (irq = 0; irq < NR_IRQS; irq++) { | ||
83 | irq_set_chip_and_handler(irq, &fb_chip, handle_edge_irq); | ||
84 | set_irq_flags(irq, IRQF_VALID | IRQF_PROBE); | ||
85 | } | ||
86 | |||
87 | /* init master interrupt controller */ | ||
88 | outb(0x11, 0x20); /* Start init sequence, edge triggered (level: 0x19)*/ | ||
89 | outb(0x00, 0x21); /* Vector base */ | ||
90 | outb(0x04, 0x21); /* Cascade (slave) on IRQ2 */ | ||
91 | outb(0x03, 0x21); /* Select 8086 mode , auto eoi*/ | ||
92 | outb(0x0A, 0x20); | ||
93 | /* init slave interrupt controller */ | ||
94 | outb(0x11, 0xA0); /* Start init sequence, edge triggered */ | ||
95 | outb(0x08, 0xA1); /* Vector base */ | ||
96 | outb(0x02, 0xA1); /* Cascade (slave) on IRQ2 */ | ||
97 | outb(0x03, 0xA1); /* Select 8086 mode, auto eoi */ | ||
98 | outb(0x0A, 0xA0); | ||
99 | outb(cached_irq_mask[1],0xA1); | ||
100 | outb(cached_irq_mask[0],0x21); | ||
101 | //request_region(0x20,0x2,"pic1"); | ||
102 | //request_region(0xA0,0x2,"pic2"); | ||
103 | |||
104 | cascade.handler = bogus_int; | ||
105 | cascade.name = "cascade"; | ||
106 | setup_irq(2,&cascade); | ||
107 | } | ||
108 | |||
diff --git a/arch/arm/mach-shark/leds.c b/arch/arm/mach-shark/leds.c deleted file mode 100644 index 081c778a10ac..000000000000 --- a/arch/arm/mach-shark/leds.c +++ /dev/null | |||
@@ -1,117 +0,0 @@ | |||
1 | /* | ||
2 | * DIGITAL Shark LED control routines. | ||
3 | * | ||
4 | * Driver for the 3 user LEDs found on the Shark | ||
5 | * Based on Versatile and RealView machine LED code | ||
6 | * | ||
7 | * License terms: GNU General Public License (GPL) version 2 | ||
8 | * Author: Bryan Wu <bryan.wu@canonical.com> | ||
9 | */ | ||
10 | #include <linux/kernel.h> | ||
11 | #include <linux/init.h> | ||
12 | #include <linux/io.h> | ||
13 | #include <linux/ioport.h> | ||
14 | #include <linux/slab.h> | ||
15 | #include <linux/leds.h> | ||
16 | |||
17 | #include <asm/mach-types.h> | ||
18 | |||
19 | #if defined(CONFIG_NEW_LEDS) && defined(CONFIG_LEDS_CLASS) | ||
20 | struct shark_led { | ||
21 | struct led_classdev cdev; | ||
22 | u8 mask; | ||
23 | }; | ||
24 | |||
25 | /* | ||
26 | * The triggers lines up below will only be used if the | ||
27 | * LED triggers are compiled in. | ||
28 | */ | ||
29 | static const struct { | ||
30 | const char *name; | ||
31 | const char *trigger; | ||
32 | } shark_leds[] = { | ||
33 | { "shark:amber0", "default-on", }, /* Bit 5 */ | ||
34 | { "shark:green", "heartbeat", }, /* Bit 6 */ | ||
35 | { "shark:amber1", "cpu0" }, /* Bit 7 */ | ||
36 | }; | ||
37 | |||
38 | static u16 led_reg_read(void) | ||
39 | { | ||
40 | outw(0x09, 0x24); | ||
41 | return inw(0x26); | ||
42 | } | ||
43 | |||
44 | static void led_reg_write(u16 value) | ||
45 | { | ||
46 | outw(0x09, 0x24); | ||
47 | outw(value, 0x26); | ||
48 | } | ||
49 | |||
50 | static void shark_led_set(struct led_classdev *cdev, | ||
51 | enum led_brightness b) | ||
52 | { | ||
53 | struct shark_led *led = container_of(cdev, | ||
54 | struct shark_led, cdev); | ||
55 | u16 reg = led_reg_read(); | ||
56 | |||
57 | if (b != LED_OFF) | ||
58 | reg |= led->mask; | ||
59 | else | ||
60 | reg &= ~led->mask; | ||
61 | |||
62 | led_reg_write(reg); | ||
63 | } | ||
64 | |||
65 | static enum led_brightness shark_led_get(struct led_classdev *cdev) | ||
66 | { | ||
67 | struct shark_led *led = container_of(cdev, | ||
68 | struct shark_led, cdev); | ||
69 | u16 reg = led_reg_read(); | ||
70 | |||
71 | return (reg & led->mask) ? LED_FULL : LED_OFF; | ||
72 | } | ||
73 | |||
74 | static int __init shark_leds_init(void) | ||
75 | { | ||
76 | int i; | ||
77 | u16 reg; | ||
78 | |||
79 | if (!machine_is_shark()) | ||
80 | return -ENODEV; | ||
81 | |||
82 | for (i = 0; i < ARRAY_SIZE(shark_leds); i++) { | ||
83 | struct shark_led *led; | ||
84 | |||
85 | led = kzalloc(sizeof(*led), GFP_KERNEL); | ||
86 | if (!led) | ||
87 | break; | ||
88 | |||
89 | led->cdev.name = shark_leds[i].name; | ||
90 | led->cdev.brightness_set = shark_led_set; | ||
91 | led->cdev.brightness_get = shark_led_get; | ||
92 | led->cdev.default_trigger = shark_leds[i].trigger; | ||
93 | |||
94 | /* Count in 5 bits offset */ | ||
95 | led->mask = BIT(i + 5); | ||
96 | |||
97 | if (led_classdev_register(NULL, &led->cdev) < 0) { | ||
98 | kfree(led); | ||
99 | break; | ||
100 | } | ||
101 | } | ||
102 | |||
103 | /* Make LEDs independent of power-state */ | ||
104 | request_region(0x24, 4, "led_reg"); | ||
105 | reg = led_reg_read(); | ||
106 | reg |= 1 << 10; | ||
107 | led_reg_write(reg); | ||
108 | |||
109 | return 0; | ||
110 | } | ||
111 | |||
112 | /* | ||
113 | * Since we may have triggers on any subsystem, defer registration | ||
114 | * until after subsystem_init. | ||
115 | */ | ||
116 | fs_initcall(shark_leds_init); | ||
117 | #endif | ||
diff --git a/arch/arm/mach-shark/pci.c b/arch/arm/mach-shark/pci.c deleted file mode 100644 index 6d91a914c1dd..000000000000 --- a/arch/arm/mach-shark/pci.c +++ /dev/null | |||
@@ -1,57 +0,0 @@ | |||
1 | /* | ||
2 | * linux/arch/arm/mach-shark/pci.c | ||
3 | * | ||
4 | * PCI bios-type initialisation for PCI machines | ||
5 | * | ||
6 | * Bits taken from various places. | ||
7 | */ | ||
8 | #include <linux/kernel.h> | ||
9 | #include <linux/pci.h> | ||
10 | #include <linux/init.h> | ||
11 | #include <linux/io.h> | ||
12 | #include <video/vga.h> | ||
13 | |||
14 | #include <asm/irq.h> | ||
15 | #include <asm/mach/pci.h> | ||
16 | #include <asm/mach-types.h> | ||
17 | |||
18 | #define IO_START 0x40000000 | ||
19 | |||
20 | static int __init shark_map_irq(const struct pci_dev *dev, u8 slot, u8 pin) | ||
21 | { | ||
22 | if (dev->bus->number == 0) | ||
23 | if (dev->devfn == 0) | ||
24 | return 255; | ||
25 | else | ||
26 | return 11; | ||
27 | else | ||
28 | return 255; | ||
29 | } | ||
30 | |||
31 | extern void __init via82c505_preinit(void); | ||
32 | |||
33 | static struct hw_pci shark_pci __initdata = { | ||
34 | .setup = via82c505_setup, | ||
35 | .map_irq = shark_map_irq, | ||
36 | .nr_controllers = 1, | ||
37 | .ops = &via82c505_ops, | ||
38 | .preinit = via82c505_preinit, | ||
39 | }; | ||
40 | |||
41 | static int __init shark_pci_init(void) | ||
42 | { | ||
43 | if (!machine_is_shark()) | ||
44 | return -ENODEV; | ||
45 | |||
46 | pcibios_min_io = 0x6000; | ||
47 | pcibios_min_mem = 0x50000000; | ||
48 | vga_base = 0xe8000000; | ||
49 | |||
50 | pci_ioremap_io(0, IO_START); | ||
51 | |||
52 | pci_common_init(&shark_pci); | ||
53 | |||
54 | return 0; | ||
55 | } | ||
56 | |||
57 | subsys_initcall(shark_pci_init); | ||