diff options
author | Adrian Bunk <bunk@stusta.de> | 2007-07-31 03:38:19 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@woody.linux-foundation.org> | 2007-07-31 18:39:39 -0400 |
commit | 99eb8a550dbccc0e1f6c7e866fe421810e0585f6 (patch) | |
tree | 130c6e3338a0655ba74355eba83afab9261e1ed0 /arch/arm26/machine | |
parent | 0d0ed42e5ca2e22465c591341839c18025748fe8 (diff) |
Remove the arm26 port
The arm26 port has been in a state where it was far from even compiling
for quite some time.
Ian Molton agreed with the removal.
Signed-off-by: Adrian Bunk <bunk@stusta.de>
Cc: Ian Molton <spyro@f2s.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'arch/arm26/machine')
-rw-r--r-- | arch/arm26/machine/Makefile | 8 | ||||
-rw-r--r-- | arch/arm26/machine/dma.c | 214 | ||||
-rw-r--r-- | arch/arm26/machine/irq.c | 164 | ||||
-rw-r--r-- | arch/arm26/machine/latches.c | 72 |
4 files changed, 0 insertions, 458 deletions
diff --git a/arch/arm26/machine/Makefile b/arch/arm26/machine/Makefile deleted file mode 100644 index 86ea97cc07fc..000000000000 --- a/arch/arm26/machine/Makefile +++ /dev/null | |||
@@ -1,8 +0,0 @@ | |||
1 | # | ||
2 | # Makefile for the linux kernel. | ||
3 | # | ||
4 | |||
5 | # Object file lists. | ||
6 | |||
7 | obj-y := dma.o irq.o latches.o | ||
8 | |||
diff --git a/arch/arm26/machine/dma.c b/arch/arm26/machine/dma.c deleted file mode 100644 index 4402a5a1b78f..000000000000 --- a/arch/arm26/machine/dma.c +++ /dev/null | |||
@@ -1,214 +0,0 @@ | |||
1 | /* | ||
2 | * linux/arch/arm26/kernel/dma.c | ||
3 | * | ||
4 | * Copyright (C) 1998-1999 Dave Gilbert / Russell King | ||
5 | * Copyright (C) 2003 Ian Molton | ||
6 | * | ||
7 | * This program is free software; you can redistribute it and/or modify | ||
8 | * it under the terms of the GNU General Public License version 2 as | ||
9 | * published by the Free Software Foundation. | ||
10 | * | ||
11 | * DMA functions specific to Archimedes and A5000 architecture | ||
12 | */ | ||
13 | #include <linux/sched.h> | ||
14 | #include <linux/init.h> | ||
15 | |||
16 | #include <asm/dma.h> | ||
17 | #include <asm/fiq.h> | ||
18 | #include <asm/irq.h> | ||
19 | #include <asm/io.h> | ||
20 | #include <asm/hardware.h> | ||
21 | #include <asm/mach-types.h> | ||
22 | |||
23 | #define DPRINTK(x...) printk(KERN_DEBUG x) | ||
24 | |||
25 | #if defined(CONFIG_BLK_DEV_FD1772) || defined(CONFIG_BLK_DEV_FD1772_MODULE) | ||
26 | |||
27 | extern unsigned char fdc1772_dma_read, fdc1772_dma_read_end; | ||
28 | extern unsigned char fdc1772_dma_write, fdc1772_dma_write_end; | ||
29 | extern void fdc1772_setupdma(unsigned int count,unsigned int addr); | ||
30 | |||
31 | static void arc_floppy_data_enable_dma(dmach_t channel, dma_t *dma) | ||
32 | { | ||
33 | DPRINTK("arc_floppy_data_enable_dma\n"); | ||
34 | |||
35 | if (dma->using_sg) | ||
36 | BUG(); | ||
37 | |||
38 | switch (dma->dma_mode) { | ||
39 | case DMA_MODE_READ: { /* read */ | ||
40 | unsigned long flags; | ||
41 | DPRINTK("enable_dma fdc1772 data read\n"); | ||
42 | local_save_flags_cli(flags); | ||
43 | clf(); | ||
44 | |||
45 | memcpy ((void *)0x1c, (void *)&fdc1772_dma_read, | ||
46 | &fdc1772_dma_read_end - &fdc1772_dma_read); | ||
47 | fdc1772_setupdma(dma->buf.length, dma->buf.__address); /* Sets data pointer up */ | ||
48 | enable_fiq(FIQ_FLOPPYDATA); | ||
49 | local_irq_restore(flags); | ||
50 | } | ||
51 | break; | ||
52 | |||
53 | case DMA_MODE_WRITE: { /* write */ | ||
54 | unsigned long flags; | ||
55 | DPRINTK("enable_dma fdc1772 data write\n"); | ||
56 | local_save_flags_cli(flags); | ||
57 | clf(); | ||
58 | memcpy ((void *)0x1c, (void *)&fdc1772_dma_write, | ||
59 | &fdc1772_dma_write_end - &fdc1772_dma_write); | ||
60 | fdc1772_setupdma(dma->buf.length, dma->buf.__address); /* Sets data pointer up */ | ||
61 | enable_fiq(FIQ_FLOPPYDATA); | ||
62 | |||
63 | local_irq_restore(flags); | ||
64 | } | ||
65 | break; | ||
66 | default: | ||
67 | printk ("enable_dma: dma%d not initialised\n", channel); | ||
68 | } | ||
69 | } | ||
70 | |||
71 | static int arc_floppy_data_get_dma_residue(dmach_t channel, dma_t *dma) | ||
72 | { | ||
73 | extern unsigned int fdc1772_bytestogo; | ||
74 | |||
75 | /* 10/1/1999 DAG - I presume its the number of bytes left? */ | ||
76 | return fdc1772_bytestogo; | ||
77 | } | ||
78 | |||
79 | static void arc_floppy_cmdend_enable_dma(dmach_t channel, dma_t *dma) | ||
80 | { | ||
81 | /* Need to build a branch at the FIQ address */ | ||
82 | extern void fdc1772_comendhandler(void); | ||
83 | unsigned long flags; | ||
84 | |||
85 | DPRINTK("arc_floppy_cmdend_enable_dma\n"); | ||
86 | /*printk("enable_dma fdc1772 command end FIQ\n");*/ | ||
87 | save_flags(flags); | ||
88 | clf(); | ||
89 | |||
90 | /* B fdc1772_comendhandler */ | ||
91 | *((unsigned int *)0x1c)=0xea000000 | | ||
92 | (((unsigned int)fdc1772_comendhandler-(0x1c+8))/4); | ||
93 | |||
94 | local_irq_restore(flags); | ||
95 | } | ||
96 | |||
97 | static int arc_floppy_cmdend_get_dma_residue(dmach_t channel, dma_t *dma) | ||
98 | { | ||
99 | /* 10/1/1999 DAG - Presume whether there is an outstanding command? */ | ||
100 | extern unsigned int fdc1772_fdc_int_done; | ||
101 | |||
102 | /* Explicit! If the int done is 0 then 1 int to go */ | ||
103 | return (fdc1772_fdc_int_done==0)?1:0; | ||
104 | } | ||
105 | |||
106 | static void arc_disable_dma(dmach_t channel, dma_t *dma) | ||
107 | { | ||
108 | disable_fiq(dma->dma_irq); | ||
109 | } | ||
110 | |||
111 | static struct dma_ops arc_floppy_data_dma_ops = { | ||
112 | .type = "FIQDMA", | ||
113 | .enable = arc_floppy_data_enable_dma, | ||
114 | .disable = arc_disable_dma, | ||
115 | .residue = arc_floppy_data_get_dma_residue, | ||
116 | }; | ||
117 | |||
118 | static struct dma_ops arc_floppy_cmdend_dma_ops = { | ||
119 | .type = "FIQCMD", | ||
120 | .enable = arc_floppy_cmdend_enable_dma, | ||
121 | .disable = arc_disable_dma, | ||
122 | .residue = arc_floppy_cmdend_get_dma_residue, | ||
123 | }; | ||
124 | #endif | ||
125 | |||
126 | #ifdef CONFIG_ARCH_A5K | ||
127 | static struct fiq_handler fh = { | ||
128 | .name = "floppydata" | ||
129 | }; | ||
130 | |||
131 | static int a5k_floppy_get_dma_residue(dmach_t channel, dma_t *dma) | ||
132 | { | ||
133 | struct pt_regs regs; | ||
134 | get_fiq_regs(®s); | ||
135 | return regs.ARM_r9; | ||
136 | } | ||
137 | |||
138 | static void a5k_floppy_enable_dma(dmach_t channel, dma_t *dma) | ||
139 | { | ||
140 | struct pt_regs regs; | ||
141 | void *fiqhandler_start; | ||
142 | unsigned int fiqhandler_length; | ||
143 | extern void floppy_fiqsetup(unsigned long len, unsigned long addr, | ||
144 | unsigned long port); | ||
145 | |||
146 | if (dma->using_sg) | ||
147 | BUG(); | ||
148 | |||
149 | if (dma->dma_mode == DMA_MODE_READ) { | ||
150 | extern unsigned char floppy_fiqin_start, floppy_fiqin_end; | ||
151 | fiqhandler_start = &floppy_fiqin_start; | ||
152 | fiqhandler_length = &floppy_fiqin_end - &floppy_fiqin_start; | ||
153 | } else { | ||
154 | extern unsigned char floppy_fiqout_start, floppy_fiqout_end; | ||
155 | fiqhandler_start = &floppy_fiqout_start; | ||
156 | fiqhandler_length = &floppy_fiqout_end - &floppy_fiqout_start; | ||
157 | } | ||
158 | if (claim_fiq(&fh)) { | ||
159 | printk("floppydma: couldn't claim FIQ.\n"); | ||
160 | return; | ||
161 | } | ||
162 | memcpy((void *)0x1c, fiqhandler_start, fiqhandler_length); | ||
163 | regs.ARM_r9 = dma->buf.length; | ||
164 | regs.ARM_r10 = (unsigned long)dma->buf.__address; | ||
165 | regs.ARM_fp = FLOPPYDMA_BASE; | ||
166 | set_fiq_regs(®s); | ||
167 | enable_fiq(dma->dma_irq); | ||
168 | } | ||
169 | |||
170 | static void a5k_floppy_disable_dma(dmach_t channel, dma_t *dma) | ||
171 | { | ||
172 | disable_fiq(dma->dma_irq); | ||
173 | release_fiq(&fh); | ||
174 | } | ||
175 | |||
176 | static struct dma_ops a5k_floppy_dma_ops = { | ||
177 | .type = "FIQDMA", | ||
178 | .enable = a5k_floppy_enable_dma, | ||
179 | .disable = a5k_floppy_disable_dma, | ||
180 | .residue = a5k_floppy_get_dma_residue, | ||
181 | }; | ||
182 | #endif | ||
183 | |||
184 | /* | ||
185 | * This is virtual DMA - we don't need anything here | ||
186 | */ | ||
187 | static void sound_enable_disable_dma(dmach_t channel, dma_t *dma) | ||
188 | { | ||
189 | } | ||
190 | |||
191 | static struct dma_ops sound_dma_ops = { | ||
192 | .type = "VIRTUAL", | ||
193 | .enable = sound_enable_disable_dma, | ||
194 | .disable = sound_enable_disable_dma, | ||
195 | }; | ||
196 | |||
197 | void __init arch_dma_init(dma_t *dma) | ||
198 | { | ||
199 | #if defined(CONFIG_BLK_DEV_FD1772) || defined(CONFIG_BLK_DEV_FD1772_MODULE) | ||
200 | if (machine_is_archimedes()) { | ||
201 | dma[DMA_VIRTUAL_FLOPPY0].dma_irq = FIQ_FLOPPYDATA; | ||
202 | dma[DMA_VIRTUAL_FLOPPY0].d_ops = &arc_floppy_data_dma_ops; | ||
203 | dma[DMA_VIRTUAL_FLOPPY1].dma_irq = 1; | ||
204 | dma[DMA_VIRTUAL_FLOPPY1].d_ops = &arc_floppy_cmdend_dma_ops; | ||
205 | } | ||
206 | #endif | ||
207 | #ifdef CONFIG_ARCH_A5K | ||
208 | if (machine_is_a5k()) { | ||
209 | dma[DMA_VIRTUAL_FLOPPY0].dma_irq = FIQ_FLOPPYDATA; | ||
210 | dma[DMA_VIRTUAL_FLOPPY0].d_ops = &a5k_floppy_dma_ops; | ||
211 | } | ||
212 | #endif | ||
213 | dma[DMA_VIRTUAL_SOUND].d_ops = &sound_dma_ops; | ||
214 | } | ||
diff --git a/arch/arm26/machine/irq.c b/arch/arm26/machine/irq.c deleted file mode 100644 index a60d543edecc..000000000000 --- a/arch/arm26/machine/irq.c +++ /dev/null | |||
@@ -1,164 +0,0 @@ | |||
1 | /* | ||
2 | * linux/arch/arm26/mach-arc/irq.c | ||
3 | * | ||
4 | * Copyright (C) 1996 Russell King | ||
5 | * | ||
6 | * This program is free software; you can redistribute it and/or modify | ||
7 | * it under the terms of the GNU General Public License version 2 as | ||
8 | * published by the Free Software Foundation. | ||
9 | * | ||
10 | * Changelog: | ||
11 | * 24-09-1996 RMK Created | ||
12 | * 10-10-1996 RMK Brought up to date with arch-sa110eval | ||
13 | * 22-10-1996 RMK Changed interrupt numbers & uses new inb/outb macros | ||
14 | * 11-01-1998 RMK Added mask_and_ack_irq | ||
15 | * 22-08-1998 RMK Restructured IRQ routines | ||
16 | * 08-09-2002 IM Brought up to date for 2.5 | ||
17 | * 01-06-2003 JMA Removed arc_fiq_chip | ||
18 | */ | ||
19 | #include <linux/init.h> | ||
20 | |||
21 | #include <asm/irq.h> | ||
22 | #include <asm/irqchip.h> | ||
23 | #include <asm/ioc.h> | ||
24 | #include <asm/io.h> | ||
25 | #include <asm/system.h> | ||
26 | |||
27 | extern void init_FIQ(void); | ||
28 | |||
29 | #define a_clf() clf() | ||
30 | #define a_stf() stf() | ||
31 | |||
32 | static void arc_ack_irq_a(unsigned int irq) | ||
33 | { | ||
34 | unsigned int val, mask; | ||
35 | |||
36 | mask = 1 << irq; | ||
37 | a_clf(); | ||
38 | val = ioc_readb(IOC_IRQMASKA); | ||
39 | ioc_writeb(val & ~mask, IOC_IRQMASKA); | ||
40 | ioc_writeb(mask, IOC_IRQCLRA); | ||
41 | a_stf(); | ||
42 | } | ||
43 | |||
44 | static void arc_mask_irq_a(unsigned int irq) | ||
45 | { | ||
46 | unsigned int val, mask; | ||
47 | |||
48 | mask = 1 << irq; | ||
49 | a_clf(); | ||
50 | val = ioc_readb(IOC_IRQMASKA); | ||
51 | ioc_writeb(val & ~mask, IOC_IRQMASKA); | ||
52 | a_stf(); | ||
53 | } | ||
54 | |||
55 | static void arc_unmask_irq_a(unsigned int irq) | ||
56 | { | ||
57 | unsigned int val, mask; | ||
58 | |||
59 | mask = 1 << irq; | ||
60 | a_clf(); | ||
61 | val = ioc_readb(IOC_IRQMASKA); | ||
62 | ioc_writeb(val | mask, IOC_IRQMASKA); | ||
63 | a_stf(); | ||
64 | } | ||
65 | |||
66 | static struct irqchip arc_a_chip = { | ||
67 | .ack = arc_ack_irq_a, | ||
68 | .mask = arc_mask_irq_a, | ||
69 | .unmask = arc_unmask_irq_a, | ||
70 | }; | ||
71 | |||
72 | static void arc_mask_irq_b(unsigned int irq) | ||
73 | { | ||
74 | unsigned int val, mask; | ||
75 | mask = 1 << (irq & 7); | ||
76 | val = ioc_readb(IOC_IRQMASKB); | ||
77 | ioc_writeb(val & ~mask, IOC_IRQMASKB); | ||
78 | } | ||
79 | |||
80 | static void arc_unmask_irq_b(unsigned int irq) | ||
81 | { | ||
82 | unsigned int val, mask; | ||
83 | |||
84 | mask = 1 << (irq & 7); | ||
85 | val = ioc_readb(IOC_IRQMASKB); | ||
86 | ioc_writeb(val | mask, IOC_IRQMASKB); | ||
87 | } | ||
88 | |||
89 | static struct irqchip arc_b_chip = { | ||
90 | .ack = arc_mask_irq_b, | ||
91 | .mask = arc_mask_irq_b, | ||
92 | .unmask = arc_unmask_irq_b, | ||
93 | }; | ||
94 | |||
95 | /* FIXME - JMA none of these functions are used in arm26 currently | ||
96 | static void arc_mask_irq_fiq(unsigned int irq) | ||
97 | { | ||
98 | unsigned int val, mask; | ||
99 | |||
100 | mask = 1 << (irq & 7); | ||
101 | val = ioc_readb(IOC_FIQMASK); | ||
102 | ioc_writeb(val & ~mask, IOC_FIQMASK); | ||
103 | } | ||
104 | |||
105 | static void arc_unmask_irq_fiq(unsigned int irq) | ||
106 | { | ||
107 | unsigned int val, mask; | ||
108 | |||
109 | mask = 1 << (irq & 7); | ||
110 | val = ioc_readb(IOC_FIQMASK); | ||
111 | ioc_writeb(val | mask, IOC_FIQMASK); | ||
112 | } | ||
113 | |||
114 | static struct irqchip arc_fiq_chip = { | ||
115 | .ack = arc_mask_irq_fiq, | ||
116 | .mask = arc_mask_irq_fiq, | ||
117 | .unmask = arc_unmask_irq_fiq, | ||
118 | }; | ||
119 | */ | ||
120 | |||
121 | void __init arc_init_irq(void) | ||
122 | { | ||
123 | unsigned int irq, flags; | ||
124 | |||
125 | /* Disable all IOC interrupt sources */ | ||
126 | ioc_writeb(0, IOC_IRQMASKA); | ||
127 | ioc_writeb(0, IOC_IRQMASKB); | ||
128 | ioc_writeb(0, IOC_FIQMASK); | ||
129 | |||
130 | for (irq = 0; irq < NR_IRQS; irq++) { | ||
131 | flags = IRQF_VALID; | ||
132 | |||
133 | if (irq <= 6 || (irq >= 9 && irq <= 15)) | ||
134 | flags |= IRQF_PROBE; | ||
135 | |||
136 | if (irq == IRQ_KEYBOARDTX) | ||
137 | flags |= IRQF_NOAUTOEN; | ||
138 | |||
139 | switch (irq) { | ||
140 | case 0 ... 7: | ||
141 | set_irq_chip(irq, &arc_a_chip); | ||
142 | set_irq_handler(irq, do_level_IRQ); | ||
143 | set_irq_flags(irq, flags); | ||
144 | break; | ||
145 | |||
146 | case 8 ... 15: | ||
147 | set_irq_chip(irq, &arc_b_chip); | ||
148 | set_irq_handler(irq, do_level_IRQ); | ||
149 | set_irq_flags(irq, flags); | ||
150 | |||
151 | /* case 64 ... 72: | ||
152 | set_irq_chip(irq, &arc_fiq_chip); | ||
153 | set_irq_flags(irq, flags); | ||
154 | break; | ||
155 | */ | ||
156 | |||
157 | } | ||
158 | } | ||
159 | |||
160 | irq_desc[IRQ_KEYBOARDTX].noautoenable = 1; | ||
161 | |||
162 | init_FIQ(); | ||
163 | } | ||
164 | |||
diff --git a/arch/arm26/machine/latches.c b/arch/arm26/machine/latches.c deleted file mode 100644 index 94f05d2a3b2b..000000000000 --- a/arch/arm26/machine/latches.c +++ /dev/null | |||
@@ -1,72 +0,0 @@ | |||
1 | /* | ||
2 | * linux/arch/arm26/kernel/latches.c | ||
3 | * | ||
4 | * Copyright (C) David Alan Gilbert 1995/1996,2000 | ||
5 | * Copyright (C) Ian Molton 2003 | ||
6 | * | ||
7 | * This program is free software; you can redistribute it and/or modify | ||
8 | * it under the terms of the GNU General Public License version 2 as | ||
9 | * published by the Free Software Foundation. | ||
10 | * | ||
11 | * Support for the latches on the old Archimedes which control the floppy, | ||
12 | * hard disc and printer | ||
13 | */ | ||
14 | #include <linux/module.h> | ||
15 | #include <linux/kernel.h> | ||
16 | #include <linux/init.h> | ||
17 | #include <linux/sched.h> | ||
18 | |||
19 | #include <asm/io.h> | ||
20 | #include <asm/hardware.h> | ||
21 | #include <asm/mach-types.h> | ||
22 | #include <asm/oldlatches.h> | ||
23 | |||
24 | static unsigned char latch_a_copy; | ||
25 | static unsigned char latch_b_copy; | ||
26 | |||
27 | /* newval=(oldval & ~mask)|newdata */ | ||
28 | void oldlatch_aupdate(unsigned char mask,unsigned char newdata) | ||
29 | { | ||
30 | unsigned long flags; | ||
31 | |||
32 | BUG_ON(!machine_is_archimedes()); | ||
33 | |||
34 | local_irq_save(flags); //FIXME: was local_save_flags | ||
35 | latch_a_copy = (latch_a_copy & ~mask) | newdata; | ||
36 | __raw_writeb(latch_a_copy, LATCHA_BASE); | ||
37 | local_irq_restore(flags); | ||
38 | |||
39 | printk("Latch: A = 0x%02x\n", latch_a_copy); | ||
40 | } | ||
41 | |||
42 | |||
43 | /* newval=(oldval & ~mask)|newdata */ | ||
44 | void oldlatch_bupdate(unsigned char mask,unsigned char newdata) | ||
45 | { | ||
46 | unsigned long flags; | ||
47 | |||
48 | BUG_ON(!machine_is_archimedes()); | ||
49 | |||
50 | |||
51 | local_irq_save(flags);//FIXME: was local_save_flags | ||
52 | latch_b_copy = (latch_b_copy & ~mask) | newdata; | ||
53 | __raw_writeb(latch_b_copy, LATCHB_BASE); | ||
54 | local_irq_restore(flags); | ||
55 | |||
56 | printk("Latch: B = 0x%02x\n", latch_b_copy); | ||
57 | } | ||
58 | |||
59 | static int __init oldlatch_init(void) | ||
60 | { | ||
61 | if (machine_is_archimedes()) { | ||
62 | oldlatch_aupdate(0xff, 0xff); | ||
63 | /* Thats no FDC reset...*/ | ||
64 | oldlatch_bupdate(0xff, LATCHB_FDCRESET); | ||
65 | } | ||
66 | return 0; | ||
67 | } | ||
68 | |||
69 | arch_initcall(oldlatch_init); | ||
70 | |||
71 | EXPORT_SYMBOL(oldlatch_aupdate); | ||
72 | EXPORT_SYMBOL(oldlatch_bupdate); | ||