diff options
author | James Bottomley <James.Bottomley@HansenPartnership.com> | 2008-01-03 13:27:16 -0500 |
---|---|---|
committer | James Bottomley <James.Bottomley@HansenPartnership.com> | 2008-02-07 19:02:42 -0500 |
commit | 642978beb48331db1bafde0262eee33f658cfc39 (patch) | |
tree | 92305bcbd3aabce5d314bb0621ca602979965b42 | |
parent | da19d2f53269210adfa9aa5a163a9fad8dc63d27 (diff) |
[SCSI] remove m68k NCR53C9x based drivers
These drivers depend on the deprecated NCR53C9X core and need to be converted
to the esp_scsi core.
Acked-by: Boaz Harrosh <bharrosh@panasas.com>
Cc: Linux/m68k <linux-m68k@vger.kernel.org>
Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
-rw-r--r-- | drivers/scsi/Kconfig | 60 | ||||
-rw-r--r-- | drivers/scsi/Makefile | 7 | ||||
-rw-r--r-- | drivers/scsi/blz1230.c | 353 | ||||
-rw-r--r-- | drivers/scsi/blz2060.c | 306 | ||||
-rw-r--r-- | drivers/scsi/cyberstorm.c | 377 | ||||
-rw-r--r-- | drivers/scsi/cyberstormII.c | 314 | ||||
-rw-r--r-- | drivers/scsi/fastlane.c | 421 | ||||
-rw-r--r-- | drivers/scsi/mac_esp.c | 751 | ||||
-rw-r--r-- | drivers/scsi/oktagon_esp.c | 606 | ||||
-rw-r--r-- | drivers/scsi/oktagon_io.S | 194 |
10 files changed, 0 insertions, 3389 deletions
diff --git a/drivers/scsi/Kconfig b/drivers/scsi/Kconfig index 9680f82b3ecf..510bedb37575 100644 --- a/drivers/scsi/Kconfig +++ b/drivers/scsi/Kconfig | |||
@@ -1578,45 +1578,6 @@ config GVP11_SCSI | |||
1578 | To compile this driver as a module, choose M here: the | 1578 | To compile this driver as a module, choose M here: the |
1579 | module will be called gvp11. | 1579 | module will be called gvp11. |
1580 | 1580 | ||
1581 | config CYBERSTORM_SCSI | ||
1582 | tristate "CyberStorm SCSI support" | ||
1583 | depends on ZORRO && SCSI | ||
1584 | help | ||
1585 | If you have an Amiga with an original (MkI) Phase5 Cyberstorm | ||
1586 | accelerator board and the optional Cyberstorm SCSI controller, | ||
1587 | answer Y. Otherwise, say N. | ||
1588 | |||
1589 | config CYBERSTORMII_SCSI | ||
1590 | tristate "CyberStorm Mk II SCSI support" | ||
1591 | depends on ZORRO && SCSI | ||
1592 | help | ||
1593 | If you have an Amiga with a Phase5 Cyberstorm MkII accelerator board | ||
1594 | and the optional Cyberstorm SCSI controller, say Y. Otherwise, | ||
1595 | answer N. | ||
1596 | |||
1597 | config BLZ2060_SCSI | ||
1598 | tristate "Blizzard 2060 SCSI support" | ||
1599 | depends on ZORRO && SCSI | ||
1600 | help | ||
1601 | If you have an Amiga with a Phase5 Blizzard 2060 accelerator board | ||
1602 | and want to use the onboard SCSI controller, say Y. Otherwise, | ||
1603 | answer N. | ||
1604 | |||
1605 | config BLZ1230_SCSI | ||
1606 | tristate "Blizzard 1230IV/1260 SCSI support" | ||
1607 | depends on ZORRO && SCSI | ||
1608 | help | ||
1609 | If you have an Amiga 1200 with a Phase5 Blizzard 1230IV or Blizzard | ||
1610 | 1260 accelerator, and the optional SCSI module, say Y. Otherwise, | ||
1611 | say N. | ||
1612 | |||
1613 | config FASTLANE_SCSI | ||
1614 | tristate "Fastlane SCSI support" | ||
1615 | depends on ZORRO && SCSI | ||
1616 | help | ||
1617 | If you have the Phase5 Fastlane Z3 SCSI controller, or plan to use | ||
1618 | one in the near future, say Y to this question. Otherwise, say N. | ||
1619 | |||
1620 | config SCSI_A4000T | 1581 | config SCSI_A4000T |
1621 | tristate "A4000T NCR53c710 SCSI support (EXPERIMENTAL)" | 1582 | tristate "A4000T NCR53c710 SCSI support (EXPERIMENTAL)" |
1622 | depends on AMIGA && SCSI && EXPERIMENTAL | 1583 | depends on AMIGA && SCSI && EXPERIMENTAL |
@@ -1644,15 +1605,6 @@ config SCSI_ZORRO7XX | |||
1644 | accelerator card for the Amiga 1200, | 1605 | accelerator card for the Amiga 1200, |
1645 | - the SCSI controller on the GVP Turbo 040/060 accelerator. | 1606 | - the SCSI controller on the GVP Turbo 040/060 accelerator. |
1646 | 1607 | ||
1647 | config OKTAGON_SCSI | ||
1648 | tristate "BSC Oktagon SCSI support (EXPERIMENTAL)" | ||
1649 | depends on ZORRO && SCSI && EXPERIMENTAL | ||
1650 | help | ||
1651 | If you have the BSC Oktagon SCSI disk controller for the Amiga, say | ||
1652 | Y to this question. If you're in doubt about whether you have one, | ||
1653 | see the picture at | ||
1654 | <http://amiga.resource.cx/exp/search.pl?product=oktagon>. | ||
1655 | |||
1656 | config ATARI_SCSI | 1608 | config ATARI_SCSI |
1657 | tristate "Atari native SCSI support" | 1609 | tristate "Atari native SCSI support" |
1658 | depends on ATARI && SCSI | 1610 | depends on ATARI && SCSI |
@@ -1705,18 +1657,6 @@ config MAC_SCSI | |||
1705 | SCSI-HOWTO, available from | 1657 | SCSI-HOWTO, available from |
1706 | <http://www.tldp.org/docs.html#howto>. | 1658 | <http://www.tldp.org/docs.html#howto>. |
1707 | 1659 | ||
1708 | config SCSI_MAC_ESP | ||
1709 | tristate "Macintosh NCR53c9[46] SCSI" | ||
1710 | depends on MAC && SCSI | ||
1711 | help | ||
1712 | This is the NCR 53c9x SCSI controller found on most of the 68040 | ||
1713 | based Macintoshes. If you have one of these say Y and read the | ||
1714 | SCSI-HOWTO, available from | ||
1715 | <http://www.tldp.org/docs.html#howto>. | ||
1716 | |||
1717 | To compile this driver as a module, choose M here: the | ||
1718 | module will be called mac_esp. | ||
1719 | |||
1720 | config MVME147_SCSI | 1660 | config MVME147_SCSI |
1721 | bool "WD33C93 SCSI driver for MVME147" | 1661 | bool "WD33C93 SCSI driver for MVME147" |
1722 | depends on MVME147 && SCSI=y | 1662 | depends on MVME147 && SCSI=y |
diff --git a/drivers/scsi/Makefile b/drivers/scsi/Makefile index 576cfc68d469..118dc525e267 100644 --- a/drivers/scsi/Makefile +++ b/drivers/scsi/Makefile | |||
@@ -44,15 +44,8 @@ obj-$(CONFIG_A2091_SCSI) += a2091.o wd33c93.o | |||
44 | obj-$(CONFIG_GVP11_SCSI) += gvp11.o wd33c93.o | 44 | obj-$(CONFIG_GVP11_SCSI) += gvp11.o wd33c93.o |
45 | obj-$(CONFIG_MVME147_SCSI) += mvme147.o wd33c93.o | 45 | obj-$(CONFIG_MVME147_SCSI) += mvme147.o wd33c93.o |
46 | obj-$(CONFIG_SGIWD93_SCSI) += sgiwd93.o wd33c93.o | 46 | obj-$(CONFIG_SGIWD93_SCSI) += sgiwd93.o wd33c93.o |
47 | obj-$(CONFIG_CYBERSTORM_SCSI) += NCR53C9x.o cyberstorm.o | ||
48 | obj-$(CONFIG_CYBERSTORMII_SCSI) += NCR53C9x.o cyberstormII.o | ||
49 | obj-$(CONFIG_BLZ2060_SCSI) += NCR53C9x.o blz2060.o | ||
50 | obj-$(CONFIG_BLZ1230_SCSI) += NCR53C9x.o blz1230.o | ||
51 | obj-$(CONFIG_FASTLANE_SCSI) += NCR53C9x.o fastlane.o | ||
52 | obj-$(CONFIG_OKTAGON_SCSI) += NCR53C9x.o oktagon_esp_mod.o | ||
53 | obj-$(CONFIG_ATARI_SCSI) += atari_scsi.o | 47 | obj-$(CONFIG_ATARI_SCSI) += atari_scsi.o |
54 | obj-$(CONFIG_MAC_SCSI) += mac_scsi.o | 48 | obj-$(CONFIG_MAC_SCSI) += mac_scsi.o |
55 | obj-$(CONFIG_SCSI_MAC_ESP) += mac_esp.o NCR53C9x.o | ||
56 | obj-$(CONFIG_SUN3_SCSI) += sun3_scsi.o sun3_scsi_vme.o | 49 | obj-$(CONFIG_SUN3_SCSI) += sun3_scsi.o sun3_scsi_vme.o |
57 | obj-$(CONFIG_MVME16x_SCSI) += 53c700.o mvme16x_scsi.o | 50 | obj-$(CONFIG_MVME16x_SCSI) += 53c700.o mvme16x_scsi.o |
58 | obj-$(CONFIG_BVME6000_SCSI) += 53c700.o bvme6000_scsi.o | 51 | obj-$(CONFIG_BVME6000_SCSI) += 53c700.o bvme6000_scsi.o |
diff --git a/drivers/scsi/blz1230.c b/drivers/scsi/blz1230.c deleted file mode 100644 index 23f7c24ab809..000000000000 --- a/drivers/scsi/blz1230.c +++ /dev/null | |||
@@ -1,353 +0,0 @@ | |||
1 | /* blz1230.c: Driver for Blizzard 1230 SCSI IV Controller. | ||
2 | * | ||
3 | * Copyright (C) 1996 Jesper Skov (jskov@cygnus.co.uk) | ||
4 | * | ||
5 | * This driver is based on the CyberStorm driver, hence the occasional | ||
6 | * reference to CyberStorm. | ||
7 | */ | ||
8 | |||
9 | /* TODO: | ||
10 | * | ||
11 | * 1) Figure out how to make a cleaner merge with the sparc driver with regard | ||
12 | * to the caches and the Sparc MMU mapping. | ||
13 | * 2) Make as few routines required outside the generic driver. A lot of the | ||
14 | * routines in this file used to be inline! | ||
15 | */ | ||
16 | |||
17 | #include <linux/module.h> | ||
18 | |||
19 | #include <linux/init.h> | ||
20 | #include <linux/kernel.h> | ||
21 | #include <linux/delay.h> | ||
22 | #include <linux/types.h> | ||
23 | #include <linux/string.h> | ||
24 | #include <linux/slab.h> | ||
25 | #include <linux/blkdev.h> | ||
26 | #include <linux/proc_fs.h> | ||
27 | #include <linux/stat.h> | ||
28 | #include <linux/interrupt.h> | ||
29 | |||
30 | #include "scsi.h" | ||
31 | #include <scsi/scsi_host.h> | ||
32 | #include "NCR53C9x.h" | ||
33 | |||
34 | #include <linux/zorro.h> | ||
35 | #include <asm/irq.h> | ||
36 | #include <asm/amigaints.h> | ||
37 | #include <asm/amigahw.h> | ||
38 | |||
39 | #include <asm/pgtable.h> | ||
40 | |||
41 | #define MKIV 1 | ||
42 | |||
43 | /* The controller registers can be found in the Z2 config area at these | ||
44 | * offsets: | ||
45 | */ | ||
46 | #define BLZ1230_ESP_ADDR 0x8000 | ||
47 | #define BLZ1230_DMA_ADDR 0x10000 | ||
48 | #define BLZ1230II_ESP_ADDR 0x10000 | ||
49 | #define BLZ1230II_DMA_ADDR 0x10021 | ||
50 | |||
51 | |||
52 | /* The Blizzard 1230 DMA interface | ||
53 | * ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | ||
54 | * Only two things can be programmed in the Blizzard DMA: | ||
55 | * 1) The data direction is controlled by the status of bit 31 (1 = write) | ||
56 | * 2) The source/dest address (word aligned, shifted one right) in bits 30-0 | ||
57 | * | ||
58 | * Program DMA by first latching the highest byte of the address/direction | ||
59 | * (i.e. bits 31-24 of the long word constructed as described in steps 1+2 | ||
60 | * above). Then write each byte of the address/direction (starting with the | ||
61 | * top byte, working down) to the DMA address register. | ||
62 | * | ||
63 | * Figure out interrupt status by reading the ESP status byte. | ||
64 | */ | ||
65 | struct blz1230_dma_registers { | ||
66 | volatile unsigned char dma_addr; /* DMA address [0x0000] */ | ||
67 | unsigned char dmapad2[0x7fff]; | ||
68 | volatile unsigned char dma_latch; /* DMA latch [0x8000] */ | ||
69 | }; | ||
70 | |||
71 | struct blz1230II_dma_registers { | ||
72 | volatile unsigned char dma_addr; /* DMA address [0x0000] */ | ||
73 | unsigned char dmapad2[0xf]; | ||
74 | volatile unsigned char dma_latch; /* DMA latch [0x0010] */ | ||
75 | }; | ||
76 | |||
77 | #define BLZ1230_DMA_WRITE 0x80000000 | ||
78 | |||
79 | static int dma_bytes_sent(struct NCR_ESP *esp, int fifo_count); | ||
80 | static int dma_can_transfer(struct NCR_ESP *esp, Scsi_Cmnd *sp); | ||
81 | static void dma_dump_state(struct NCR_ESP *esp); | ||
82 | static void dma_init_read(struct NCR_ESP *esp, __u32 addr, int length); | ||
83 | static void dma_init_write(struct NCR_ESP *esp, __u32 addr, int length); | ||
84 | static void dma_ints_off(struct NCR_ESP *esp); | ||
85 | static void dma_ints_on(struct NCR_ESP *esp); | ||
86 | static int dma_irq_p(struct NCR_ESP *esp); | ||
87 | static int dma_ports_p(struct NCR_ESP *esp); | ||
88 | static void dma_setup(struct NCR_ESP *esp, __u32 addr, int count, int write); | ||
89 | |||
90 | static volatile unsigned char cmd_buffer[16]; | ||
91 | /* This is where all commands are put | ||
92 | * before they are transferred to the ESP chip | ||
93 | * via PIO. | ||
94 | */ | ||
95 | |||
96 | /***************************************************************** Detection */ | ||
97 | int __init blz1230_esp_detect(struct scsi_host_template *tpnt) | ||
98 | { | ||
99 | struct NCR_ESP *esp; | ||
100 | struct zorro_dev *z = NULL; | ||
101 | unsigned long address; | ||
102 | struct ESP_regs *eregs; | ||
103 | unsigned long board; | ||
104 | |||
105 | #if MKIV | ||
106 | #define REAL_BLZ1230_ID ZORRO_PROD_PHASE5_BLIZZARD_1230_IV_1260 | ||
107 | #define REAL_BLZ1230_ESP_ADDR BLZ1230_ESP_ADDR | ||
108 | #define REAL_BLZ1230_DMA_ADDR BLZ1230_DMA_ADDR | ||
109 | #else | ||
110 | #define REAL_BLZ1230_ID ZORRO_PROD_PHASE5_BLIZZARD_1230_II_FASTLANE_Z3_CYBERSCSI_CYBERSTORM060 | ||
111 | #define REAL_BLZ1230_ESP_ADDR BLZ1230II_ESP_ADDR | ||
112 | #define REAL_BLZ1230_DMA_ADDR BLZ1230II_DMA_ADDR | ||
113 | #endif | ||
114 | |||
115 | if ((z = zorro_find_device(REAL_BLZ1230_ID, z))) { | ||
116 | board = z->resource.start; | ||
117 | if (request_mem_region(board+REAL_BLZ1230_ESP_ADDR, | ||
118 | sizeof(struct ESP_regs), "NCR53C9x")) { | ||
119 | /* Do some magic to figure out if the blizzard is | ||
120 | * equipped with a SCSI controller | ||
121 | */ | ||
122 | address = ZTWO_VADDR(board); | ||
123 | eregs = (struct ESP_regs *)(address + REAL_BLZ1230_ESP_ADDR); | ||
124 | esp = esp_allocate(tpnt, (void *)board + REAL_BLZ1230_ESP_ADDR, | ||
125 | 0); | ||
126 | |||
127 | esp_write(eregs->esp_cfg1, (ESP_CONFIG1_PENABLE | 7)); | ||
128 | udelay(5); | ||
129 | if(esp_read(eregs->esp_cfg1) != (ESP_CONFIG1_PENABLE | 7)) | ||
130 | goto err_out; | ||
131 | |||
132 | /* Do command transfer with programmed I/O */ | ||
133 | esp->do_pio_cmds = 1; | ||
134 | |||
135 | /* Required functions */ | ||
136 | esp->dma_bytes_sent = &dma_bytes_sent; | ||
137 | esp->dma_can_transfer = &dma_can_transfer; | ||
138 | esp->dma_dump_state = &dma_dump_state; | ||
139 | esp->dma_init_read = &dma_init_read; | ||
140 | esp->dma_init_write = &dma_init_write; | ||
141 | esp->dma_ints_off = &dma_ints_off; | ||
142 | esp->dma_ints_on = &dma_ints_on; | ||
143 | esp->dma_irq_p = &dma_irq_p; | ||
144 | esp->dma_ports_p = &dma_ports_p; | ||
145 | esp->dma_setup = &dma_setup; | ||
146 | |||
147 | /* Optional functions */ | ||
148 | esp->dma_barrier = 0; | ||
149 | esp->dma_drain = 0; | ||
150 | esp->dma_invalidate = 0; | ||
151 | esp->dma_irq_entry = 0; | ||
152 | esp->dma_irq_exit = 0; | ||
153 | esp->dma_led_on = 0; | ||
154 | esp->dma_led_off = 0; | ||
155 | esp->dma_poll = 0; | ||
156 | esp->dma_reset = 0; | ||
157 | |||
158 | /* SCSI chip speed */ | ||
159 | esp->cfreq = 40000000; | ||
160 | |||
161 | /* The DMA registers on the Blizzard are mapped | ||
162 | * relative to the device (i.e. in the same Zorro | ||
163 | * I/O block). | ||
164 | */ | ||
165 | esp->dregs = (void *)(address + REAL_BLZ1230_DMA_ADDR); | ||
166 | |||
167 | /* ESP register base */ | ||
168 | esp->eregs = eregs; | ||
169 | |||
170 | /* Set the command buffer */ | ||
171 | esp->esp_command = cmd_buffer; | ||
172 | esp->esp_command_dvma = virt_to_bus((void *)cmd_buffer); | ||
173 | |||
174 | esp->irq = IRQ_AMIGA_PORTS; | ||
175 | esp->slot = board+REAL_BLZ1230_ESP_ADDR; | ||
176 | if (request_irq(IRQ_AMIGA_PORTS, esp_intr, IRQF_SHARED, | ||
177 | "Blizzard 1230 SCSI IV", esp->ehost)) | ||
178 | goto err_out; | ||
179 | |||
180 | /* Figure out our scsi ID on the bus */ | ||
181 | esp->scsi_id = 7; | ||
182 | |||
183 | /* We don't have a differential SCSI-bus. */ | ||
184 | esp->diff = 0; | ||
185 | |||
186 | esp_initialize(esp); | ||
187 | |||
188 | printk("ESP: Total of %d ESP hosts found, %d actually in use.\n", nesps, esps_in_use); | ||
189 | esps_running = esps_in_use; | ||
190 | return esps_in_use; | ||
191 | } | ||
192 | } | ||
193 | return 0; | ||
194 | |||
195 | err_out: | ||
196 | scsi_unregister(esp->ehost); | ||
197 | esp_deallocate(esp); | ||
198 | release_mem_region(board+REAL_BLZ1230_ESP_ADDR, | ||
199 | sizeof(struct ESP_regs)); | ||
200 | return 0; | ||
201 | } | ||
202 | |||
203 | /************************************************************* DMA Functions */ | ||
204 | static int dma_bytes_sent(struct NCR_ESP *esp, int fifo_count) | ||
205 | { | ||
206 | /* Since the Blizzard DMA is fully dedicated to the ESP chip, | ||
207 | * the number of bytes sent (to the ESP chip) equals the number | ||
208 | * of bytes in the FIFO - there is no buffering in the DMA controller. | ||
209 | * XXXX Do I read this right? It is from host to ESP, right? | ||
210 | */ | ||
211 | return fifo_count; | ||
212 | } | ||
213 | |||
214 | static int dma_can_transfer(struct NCR_ESP *esp, Scsi_Cmnd *sp) | ||
215 | { | ||
216 | /* I don't think there's any limit on the Blizzard DMA. So we use what | ||
217 | * the ESP chip can handle (24 bit). | ||
218 | */ | ||
219 | unsigned long sz = sp->SCp.this_residual; | ||
220 | if(sz > 0x1000000) | ||
221 | sz = 0x1000000; | ||
222 | return sz; | ||
223 | } | ||
224 | |||
225 | static void dma_dump_state(struct NCR_ESP *esp) | ||
226 | { | ||
227 | ESPLOG(("intreq:<%04x>, intena:<%04x>\n", | ||
228 | amiga_custom.intreqr, amiga_custom.intenar)); | ||
229 | } | ||
230 | |||
231 | void dma_init_read(struct NCR_ESP *esp, __u32 addr, int length) | ||
232 | { | ||
233 | #if MKIV | ||
234 | struct blz1230_dma_registers *dregs = | ||
235 | (struct blz1230_dma_registers *) (esp->dregs); | ||
236 | #else | ||
237 | struct blz1230II_dma_registers *dregs = | ||
238 | (struct blz1230II_dma_registers *) (esp->dregs); | ||
239 | #endif | ||
240 | |||
241 | cache_clear(addr, length); | ||
242 | |||
243 | addr >>= 1; | ||
244 | addr &= ~(BLZ1230_DMA_WRITE); | ||
245 | |||
246 | /* First set latch */ | ||
247 | dregs->dma_latch = (addr >> 24) & 0xff; | ||
248 | |||
249 | /* Then pump the address to the DMA address register */ | ||
250 | #if MKIV | ||
251 | dregs->dma_addr = (addr >> 24) & 0xff; | ||
252 | #endif | ||
253 | dregs->dma_addr = (addr >> 16) & 0xff; | ||
254 | dregs->dma_addr = (addr >> 8) & 0xff; | ||
255 | dregs->dma_addr = (addr ) & 0xff; | ||
256 | } | ||
257 | |||
258 | void dma_init_write(struct NCR_ESP *esp, __u32 addr, int length) | ||
259 | { | ||
260 | #if MKIV | ||
261 | struct blz1230_dma_registers *dregs = | ||
262 | (struct blz1230_dma_registers *) (esp->dregs); | ||
263 | #else | ||
264 | struct blz1230II_dma_registers *dregs = | ||
265 | (struct blz1230II_dma_registers *) (esp->dregs); | ||
266 | #endif | ||
267 | |||
268 | cache_push(addr, length); | ||
269 | |||
270 | addr >>= 1; | ||
271 | addr |= BLZ1230_DMA_WRITE; | ||
272 | |||
273 | /* First set latch */ | ||
274 | dregs->dma_latch = (addr >> 24) & 0xff; | ||
275 | |||
276 | /* Then pump the address to the DMA address register */ | ||
277 | #if MKIV | ||
278 | dregs->dma_addr = (addr >> 24) & 0xff; | ||
279 | #endif | ||
280 | dregs->dma_addr = (addr >> 16) & 0xff; | ||
281 | dregs->dma_addr = (addr >> 8) & 0xff; | ||
282 | dregs->dma_addr = (addr ) & 0xff; | ||
283 | } | ||
284 | |||
285 | static void dma_ints_off(struct NCR_ESP *esp) | ||
286 | { | ||
287 | disable_irq(esp->irq); | ||
288 | } | ||
289 | |||
290 | static void dma_ints_on(struct NCR_ESP *esp) | ||
291 | { | ||
292 | enable_irq(esp->irq); | ||
293 | } | ||
294 | |||
295 | static int dma_irq_p(struct NCR_ESP *esp) | ||
296 | { | ||
297 | return (esp_read(esp->eregs->esp_status) & ESP_STAT_INTR); | ||
298 | } | ||
299 | |||
300 | static int dma_ports_p(struct NCR_ESP *esp) | ||
301 | { | ||
302 | return ((amiga_custom.intenar) & IF_PORTS); | ||
303 | } | ||
304 | |||
305 | static void dma_setup(struct NCR_ESP *esp, __u32 addr, int count, int write) | ||
306 | { | ||
307 | /* On the Sparc, DMA_ST_WRITE means "move data from device to memory" | ||
308 | * so when (write) is true, it actually means READ! | ||
309 | */ | ||
310 | if(write){ | ||
311 | dma_init_read(esp, addr, count); | ||
312 | } else { | ||
313 | dma_init_write(esp, addr, count); | ||
314 | } | ||
315 | } | ||
316 | |||
317 | #define HOSTS_C | ||
318 | |||
319 | int blz1230_esp_release(struct Scsi_Host *instance) | ||
320 | { | ||
321 | #ifdef MODULE | ||
322 | unsigned long address = (unsigned long)((struct NCR_ESP *)instance->hostdata)->edev; | ||
323 | esp_deallocate((struct NCR_ESP *)instance->hostdata); | ||
324 | esp_release(); | ||
325 | release_mem_region(address, sizeof(struct ESP_regs)); | ||
326 | free_irq(IRQ_AMIGA_PORTS, esp_intr); | ||
327 | #endif | ||
328 | return 1; | ||
329 | } | ||
330 | |||
331 | |||
332 | static struct scsi_host_template driver_template = { | ||
333 | .proc_name = "esp-blz1230", | ||
334 | .proc_info = esp_proc_info, | ||
335 | .name = "Blizzard1230 SCSI IV", | ||
336 | .detect = blz1230_esp_detect, | ||
337 | .slave_alloc = esp_slave_alloc, | ||
338 | .slave_destroy = esp_slave_destroy, | ||
339 | .release = blz1230_esp_release, | ||
340 | .queuecommand = esp_queue, | ||
341 | .eh_abort_handler = esp_abort, | ||
342 | .eh_bus_reset_handler = esp_reset, | ||
343 | .can_queue = 7, | ||
344 | .this_id = 7, | ||
345 | .sg_tablesize = SG_ALL, | ||
346 | .cmd_per_lun = 1, | ||
347 | .use_clustering = ENABLE_CLUSTERING | ||
348 | }; | ||
349 | |||
350 | |||
351 | #include "scsi_module.c" | ||
352 | |||
353 | MODULE_LICENSE("GPL"); | ||
diff --git a/drivers/scsi/blz2060.c b/drivers/scsi/blz2060.c deleted file mode 100644 index b6203ec00961..000000000000 --- a/drivers/scsi/blz2060.c +++ /dev/null | |||
@@ -1,306 +0,0 @@ | |||
1 | /* blz2060.c: Driver for Blizzard 2060 SCSI Controller. | ||
2 | * | ||
3 | * Copyright (C) 1996 Jesper Skov (jskov@cygnus.co.uk) | ||
4 | * | ||
5 | * This driver is based on the CyberStorm driver, hence the occasional | ||
6 | * reference to CyberStorm. | ||
7 | */ | ||
8 | |||
9 | /* TODO: | ||
10 | * | ||
11 | * 1) Figure out how to make a cleaner merge with the sparc driver with regard | ||
12 | * to the caches and the Sparc MMU mapping. | ||
13 | * 2) Make as few routines required outside the generic driver. A lot of the | ||
14 | * routines in this file used to be inline! | ||
15 | */ | ||
16 | |||
17 | #include <linux/module.h> | ||
18 | |||
19 | #include <linux/init.h> | ||
20 | #include <linux/kernel.h> | ||
21 | #include <linux/delay.h> | ||
22 | #include <linux/types.h> | ||
23 | #include <linux/string.h> | ||
24 | #include <linux/slab.h> | ||
25 | #include <linux/blkdev.h> | ||
26 | #include <linux/proc_fs.h> | ||
27 | #include <linux/stat.h> | ||
28 | #include <linux/interrupt.h> | ||
29 | |||
30 | #include "scsi.h" | ||
31 | #include <scsi/scsi_host.h> | ||
32 | #include "NCR53C9x.h" | ||
33 | |||
34 | #include <linux/zorro.h> | ||
35 | #include <asm/irq.h> | ||
36 | #include <asm/amigaints.h> | ||
37 | #include <asm/amigahw.h> | ||
38 | |||
39 | #include <asm/pgtable.h> | ||
40 | |||
41 | /* The controller registers can be found in the Z2 config area at these | ||
42 | * offsets: | ||
43 | */ | ||
44 | #define BLZ2060_ESP_ADDR 0x1ff00 | ||
45 | #define BLZ2060_DMA_ADDR 0x1ffe0 | ||
46 | |||
47 | |||
48 | /* The Blizzard 2060 DMA interface | ||
49 | * ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | ||
50 | * Only two things can be programmed in the Blizzard DMA: | ||
51 | * 1) The data direction is controlled by the status of bit 31 (1 = write) | ||
52 | * 2) The source/dest address (word aligned, shifted one right) in bits 30-0 | ||
53 | * | ||
54 | * Figure out interrupt status by reading the ESP status byte. | ||
55 | */ | ||
56 | struct blz2060_dma_registers { | ||
57 | volatile unsigned char dma_led_ctrl; /* DMA led control [0x000] */ | ||
58 | unsigned char dmapad1[0x0f]; | ||
59 | volatile unsigned char dma_addr0; /* DMA address (MSB) [0x010] */ | ||
60 | unsigned char dmapad2[0x03]; | ||
61 | volatile unsigned char dma_addr1; /* DMA address [0x014] */ | ||
62 | unsigned char dmapad3[0x03]; | ||
63 | volatile unsigned char dma_addr2; /* DMA address [0x018] */ | ||
64 | unsigned char dmapad4[0x03]; | ||
65 | volatile unsigned char dma_addr3; /* DMA address (LSB) [0x01c] */ | ||
66 | }; | ||
67 | |||
68 | #define BLZ2060_DMA_WRITE 0x80000000 | ||
69 | |||
70 | /* DMA control bits */ | ||
71 | #define BLZ2060_DMA_LED 0x02 /* HD led control 1 = off */ | ||
72 | |||
73 | static int dma_bytes_sent(struct NCR_ESP *esp, int fifo_count); | ||
74 | static int dma_can_transfer(struct NCR_ESP *esp, Scsi_Cmnd *sp); | ||
75 | static void dma_dump_state(struct NCR_ESP *esp); | ||
76 | static void dma_init_read(struct NCR_ESP *esp, __u32 addr, int length); | ||
77 | static void dma_init_write(struct NCR_ESP *esp, __u32 addr, int length); | ||
78 | static void dma_ints_off(struct NCR_ESP *esp); | ||
79 | static void dma_ints_on(struct NCR_ESP *esp); | ||
80 | static int dma_irq_p(struct NCR_ESP *esp); | ||
81 | static void dma_led_off(struct NCR_ESP *esp); | ||
82 | static void dma_led_on(struct NCR_ESP *esp); | ||
83 | static int dma_ports_p(struct NCR_ESP *esp); | ||
84 | static void dma_setup(struct NCR_ESP *esp, __u32 addr, int count, int write); | ||
85 | |||
86 | static volatile unsigned char cmd_buffer[16]; | ||
87 | /* This is where all commands are put | ||
88 | * before they are transferred to the ESP chip | ||
89 | * via PIO. | ||
90 | */ | ||
91 | |||
92 | /***************************************************************** Detection */ | ||
93 | int __init blz2060_esp_detect(struct scsi_host_template *tpnt) | ||
94 | { | ||
95 | struct NCR_ESP *esp; | ||
96 | struct zorro_dev *z = NULL; | ||
97 | unsigned long address; | ||
98 | |||
99 | if ((z = zorro_find_device(ZORRO_PROD_PHASE5_BLIZZARD_2060, z))) { | ||
100 | unsigned long board = z->resource.start; | ||
101 | if (request_mem_region(board+BLZ2060_ESP_ADDR, | ||
102 | sizeof(struct ESP_regs), "NCR53C9x")) { | ||
103 | esp = esp_allocate(tpnt, (void *)board + BLZ2060_ESP_ADDR, 0); | ||
104 | |||
105 | /* Do command transfer with programmed I/O */ | ||
106 | esp->do_pio_cmds = 1; | ||
107 | |||
108 | /* Required functions */ | ||
109 | esp->dma_bytes_sent = &dma_bytes_sent; | ||
110 | esp->dma_can_transfer = &dma_can_transfer; | ||
111 | esp->dma_dump_state = &dma_dump_state; | ||
112 | esp->dma_init_read = &dma_init_read; | ||
113 | esp->dma_init_write = &dma_init_write; | ||
114 | esp->dma_ints_off = &dma_ints_off; | ||
115 | esp->dma_ints_on = &dma_ints_on; | ||
116 | esp->dma_irq_p = &dma_irq_p; | ||
117 | esp->dma_ports_p = &dma_ports_p; | ||
118 | esp->dma_setup = &dma_setup; | ||
119 | |||
120 | /* Optional functions */ | ||
121 | esp->dma_barrier = 0; | ||
122 | esp->dma_drain = 0; | ||
123 | esp->dma_invalidate = 0; | ||
124 | esp->dma_irq_entry = 0; | ||
125 | esp->dma_irq_exit = 0; | ||
126 | esp->dma_led_on = &dma_led_on; | ||
127 | esp->dma_led_off = &dma_led_off; | ||
128 | esp->dma_poll = 0; | ||
129 | esp->dma_reset = 0; | ||
130 | |||
131 | /* SCSI chip speed */ | ||
132 | esp->cfreq = 40000000; | ||
133 | |||
134 | /* The DMA registers on the Blizzard are mapped | ||
135 | * relative to the device (i.e. in the same Zorro | ||
136 | * I/O block). | ||
137 | */ | ||
138 | address = (unsigned long)ZTWO_VADDR(board); | ||
139 | esp->dregs = (void *)(address + BLZ2060_DMA_ADDR); | ||
140 | |||
141 | /* ESP register base */ | ||
142 | esp->eregs = (struct ESP_regs *)(address + BLZ2060_ESP_ADDR); | ||
143 | |||
144 | /* Set the command buffer */ | ||
145 | esp->esp_command = cmd_buffer; | ||
146 | esp->esp_command_dvma = virt_to_bus((void *)cmd_buffer); | ||
147 | |||
148 | esp->irq = IRQ_AMIGA_PORTS; | ||
149 | request_irq(IRQ_AMIGA_PORTS, esp_intr, IRQF_SHARED, | ||
150 | "Blizzard 2060 SCSI", esp->ehost); | ||
151 | |||
152 | /* Figure out our scsi ID on the bus */ | ||
153 | esp->scsi_id = 7; | ||
154 | |||
155 | /* We don't have a differential SCSI-bus. */ | ||
156 | esp->diff = 0; | ||
157 | |||
158 | esp_initialize(esp); | ||
159 | |||
160 | printk("ESP: Total of %d ESP hosts found, %d actually in use.\n", nesps, esps_in_use); | ||
161 | esps_running = esps_in_use; | ||
162 | return esps_in_use; | ||
163 | } | ||
164 | } | ||
165 | return 0; | ||
166 | } | ||
167 | |||
168 | /************************************************************* DMA Functions */ | ||
169 | static int dma_bytes_sent(struct NCR_ESP *esp, int fifo_count) | ||
170 | { | ||
171 | /* Since the Blizzard DMA is fully dedicated to the ESP chip, | ||
172 | * the number of bytes sent (to the ESP chip) equals the number | ||
173 | * of bytes in the FIFO - there is no buffering in the DMA controller. | ||
174 | * XXXX Do I read this right? It is from host to ESP, right? | ||
175 | */ | ||
176 | return fifo_count; | ||
177 | } | ||
178 | |||
179 | static int dma_can_transfer(struct NCR_ESP *esp, Scsi_Cmnd *sp) | ||
180 | { | ||
181 | /* I don't think there's any limit on the Blizzard DMA. So we use what | ||
182 | * the ESP chip can handle (24 bit). | ||
183 | */ | ||
184 | unsigned long sz = sp->SCp.this_residual; | ||
185 | if(sz > 0x1000000) | ||
186 | sz = 0x1000000; | ||
187 | return sz; | ||
188 | } | ||
189 | |||
190 | static void dma_dump_state(struct NCR_ESP *esp) | ||
191 | { | ||
192 | ESPLOG(("intreq:<%04x>, intena:<%04x>\n", | ||
193 | amiga_custom.intreqr, amiga_custom.intenar)); | ||
194 | } | ||
195 | |||
196 | static void dma_init_read(struct NCR_ESP *esp, __u32 addr, int length) | ||
197 | { | ||
198 | struct blz2060_dma_registers *dregs = | ||
199 | (struct blz2060_dma_registers *) (esp->dregs); | ||
200 | |||
201 | cache_clear(addr, length); | ||
202 | |||
203 | addr >>= 1; | ||
204 | addr &= ~(BLZ2060_DMA_WRITE); | ||
205 | dregs->dma_addr3 = (addr ) & 0xff; | ||
206 | dregs->dma_addr2 = (addr >> 8) & 0xff; | ||
207 | dregs->dma_addr1 = (addr >> 16) & 0xff; | ||
208 | dregs->dma_addr0 = (addr >> 24) & 0xff; | ||
209 | } | ||
210 | |||
211 | static void dma_init_write(struct NCR_ESP *esp, __u32 addr, int length) | ||
212 | { | ||
213 | struct blz2060_dma_registers *dregs = | ||
214 | (struct blz2060_dma_registers *) (esp->dregs); | ||
215 | |||
216 | cache_push(addr, length); | ||
217 | |||
218 | addr >>= 1; | ||
219 | addr |= BLZ2060_DMA_WRITE; | ||
220 | dregs->dma_addr3 = (addr ) & 0xff; | ||
221 | dregs->dma_addr2 = (addr >> 8) & 0xff; | ||
222 | dregs->dma_addr1 = (addr >> 16) & 0xff; | ||
223 | dregs->dma_addr0 = (addr >> 24) & 0xff; | ||
224 | } | ||
225 | |||
226 | static void dma_ints_off(struct NCR_ESP *esp) | ||
227 | { | ||
228 | disable_irq(esp->irq); | ||
229 | } | ||
230 | |||
231 | static void dma_ints_on(struct NCR_ESP *esp) | ||
232 | { | ||
233 | enable_irq(esp->irq); | ||
234 | } | ||
235 | |||
236 | static int dma_irq_p(struct NCR_ESP *esp) | ||
237 | { | ||
238 | return (esp_read(esp->eregs->esp_status) & ESP_STAT_INTR); | ||
239 | } | ||
240 | |||
241 | static void dma_led_off(struct NCR_ESP *esp) | ||
242 | { | ||
243 | ((struct blz2060_dma_registers *) (esp->dregs))->dma_led_ctrl = | ||
244 | BLZ2060_DMA_LED; | ||
245 | } | ||
246 | |||
247 | static void dma_led_on(struct NCR_ESP *esp) | ||
248 | { | ||
249 | ((struct blz2060_dma_registers *) (esp->dregs))->dma_led_ctrl = 0; | ||
250 | } | ||
251 | |||
252 | static int dma_ports_p(struct NCR_ESP *esp) | ||
253 | { | ||
254 | return ((amiga_custom.intenar) & IF_PORTS); | ||
255 | } | ||
256 | |||
257 | static void dma_setup(struct NCR_ESP *esp, __u32 addr, int count, int write) | ||
258 | { | ||
259 | /* On the Sparc, DMA_ST_WRITE means "move data from device to memory" | ||
260 | * so when (write) is true, it actually means READ! | ||
261 | */ | ||
262 | if(write){ | ||
263 | dma_init_read(esp, addr, count); | ||
264 | } else { | ||
265 | dma_init_write(esp, addr, count); | ||
266 | } | ||
267 | } | ||
268 | |||
269 | #define HOSTS_C | ||
270 | |||
271 | int blz2060_esp_release(struct Scsi_Host *instance) | ||
272 | { | ||
273 | #ifdef MODULE | ||
274 | unsigned long address = (unsigned long)((struct NCR_ESP *)instance->hostdata)->edev; | ||
275 | |||
276 | esp_deallocate((struct NCR_ESP *)instance->hostdata); | ||
277 | esp_release(); | ||
278 | release_mem_region(address, sizeof(struct ESP_regs)); | ||
279 | free_irq(IRQ_AMIGA_PORTS, esp_intr); | ||
280 | #endif | ||
281 | return 1; | ||
282 | } | ||
283 | |||
284 | |||
285 | static struct scsi_host_template driver_template = { | ||
286 | .proc_name = "esp-blz2060", | ||
287 | .proc_info = esp_proc_info, | ||
288 | .name = "Blizzard2060 SCSI", | ||
289 | .detect = blz2060_esp_detect, | ||
290 | .slave_alloc = esp_slave_alloc, | ||
291 | .slave_destroy = esp_slave_destroy, | ||
292 | .release = blz2060_esp_release, | ||
293 | .queuecommand = esp_queue, | ||
294 | .eh_abort_handler = esp_abort, | ||
295 | .eh_bus_reset_handler = esp_reset, | ||
296 | .can_queue = 7, | ||
297 | .this_id = 7, | ||
298 | .sg_tablesize = SG_ALL, | ||
299 | .cmd_per_lun = 1, | ||
300 | .use_clustering = ENABLE_CLUSTERING | ||
301 | }; | ||
302 | |||
303 | |||
304 | #include "scsi_module.c" | ||
305 | |||
306 | MODULE_LICENSE("GPL"); | ||
diff --git a/drivers/scsi/cyberstorm.c b/drivers/scsi/cyberstorm.c deleted file mode 100644 index c6b98a42e89d..000000000000 --- a/drivers/scsi/cyberstorm.c +++ /dev/null | |||
@@ -1,377 +0,0 @@ | |||
1 | /* cyberstorm.c: Driver for CyberStorm SCSI Controller. | ||
2 | * | ||
3 | * Copyright (C) 1996 Jesper Skov (jskov@cygnus.co.uk) | ||
4 | * | ||
5 | * The CyberStorm SCSI driver is based on David S. Miller's ESP driver | ||
6 | * for the Sparc computers. | ||
7 | * | ||
8 | * This work was made possible by Phase5 who willingly (and most generously) | ||
9 | * supported me with hardware and all the information I needed. | ||
10 | */ | ||
11 | |||
12 | /* TODO: | ||
13 | * | ||
14 | * 1) Figure out how to make a cleaner merge with the sparc driver with regard | ||
15 | * to the caches and the Sparc MMU mapping. | ||
16 | * 2) Make as few routines required outside the generic driver. A lot of the | ||
17 | * routines in this file used to be inline! | ||
18 | */ | ||
19 | |||
20 | #include <linux/module.h> | ||
21 | |||
22 | #include <linux/init.h> | ||
23 | #include <linux/kernel.h> | ||
24 | #include <linux/delay.h> | ||
25 | #include <linux/types.h> | ||
26 | #include <linux/string.h> | ||
27 | #include <linux/slab.h> | ||
28 | #include <linux/blkdev.h> | ||
29 | #include <linux/proc_fs.h> | ||
30 | #include <linux/stat.h> | ||
31 | #include <linux/interrupt.h> | ||
32 | |||
33 | #include "scsi.h" | ||
34 | #include <scsi/scsi_host.h> | ||
35 | #include "NCR53C9x.h" | ||
36 | |||
37 | #include <linux/zorro.h> | ||
38 | #include <asm/irq.h> | ||
39 | #include <asm/amigaints.h> | ||
40 | #include <asm/amigahw.h> | ||
41 | |||
42 | #include <asm/pgtable.h> | ||
43 | |||
44 | /* The controller registers can be found in the Z2 config area at these | ||
45 | * offsets: | ||
46 | */ | ||
47 | #define CYBER_ESP_ADDR 0xf400 | ||
48 | #define CYBER_DMA_ADDR 0xf800 | ||
49 | |||
50 | |||
51 | /* The CyberStorm DMA interface */ | ||
52 | struct cyber_dma_registers { | ||
53 | volatile unsigned char dma_addr0; /* DMA address (MSB) [0x000] */ | ||
54 | unsigned char dmapad1[1]; | ||
55 | volatile unsigned char dma_addr1; /* DMA address [0x002] */ | ||
56 | unsigned char dmapad2[1]; | ||
57 | volatile unsigned char dma_addr2; /* DMA address [0x004] */ | ||
58 | unsigned char dmapad3[1]; | ||
59 | volatile unsigned char dma_addr3; /* DMA address (LSB) [0x006] */ | ||
60 | unsigned char dmapad4[0x3fb]; | ||
61 | volatile unsigned char cond_reg; /* DMA cond (ro) [0x402] */ | ||
62 | #define ctrl_reg cond_reg /* DMA control (wo) [0x402] */ | ||
63 | }; | ||
64 | |||
65 | /* DMA control bits */ | ||
66 | #define CYBER_DMA_LED 0x80 /* HD led control 1 = on */ | ||
67 | #define CYBER_DMA_WRITE 0x40 /* DMA direction. 1 = write */ | ||
68 | #define CYBER_DMA_Z3 0x20 /* 16 (Z2) or 32 (CHIP/Z3) bit DMA transfer */ | ||
69 | |||
70 | /* DMA status bits */ | ||
71 | #define CYBER_DMA_HNDL_INTR 0x80 /* DMA IRQ pending? */ | ||
72 | |||
73 | /* The bits below appears to be Phase5 Debug bits only; they were not | ||
74 | * described by Phase5 so using them may seem a bit stupid... | ||
75 | */ | ||
76 | #define CYBER_HOST_ID 0x02 /* If set, host ID should be 7, otherwise | ||
77 | * it should be 6. | ||
78 | */ | ||
79 | #define CYBER_SLOW_CABLE 0x08 /* If *not* set, assume SLOW_CABLE */ | ||
80 | |||
81 | static int dma_bytes_sent(struct NCR_ESP *esp, int fifo_count); | ||
82 | static int dma_can_transfer(struct NCR_ESP *esp, Scsi_Cmnd *sp); | ||
83 | static void dma_dump_state(struct NCR_ESP *esp); | ||
84 | static void dma_init_read(struct NCR_ESP *esp, __u32 addr, int length); | ||
85 | static void dma_init_write(struct NCR_ESP *esp, __u32 addr, int length); | ||
86 | static void dma_ints_off(struct NCR_ESP *esp); | ||
87 | static void dma_ints_on(struct NCR_ESP *esp); | ||
88 | static int dma_irq_p(struct NCR_ESP *esp); | ||
89 | static void dma_led_off(struct NCR_ESP *esp); | ||
90 | static void dma_led_on(struct NCR_ESP *esp); | ||
91 | static int dma_ports_p(struct NCR_ESP *esp); | ||
92 | static void dma_setup(struct NCR_ESP *esp, __u32 addr, int count, int write); | ||
93 | |||
94 | static unsigned char ctrl_data = 0; /* Keep backup of the stuff written | ||
95 | * to ctrl_reg. Always write a copy | ||
96 | * to this register when writing to | ||
97 | * the hardware register! | ||
98 | */ | ||
99 | |||
100 | static volatile unsigned char cmd_buffer[16]; | ||
101 | /* This is where all commands are put | ||
102 | * before they are transferred to the ESP chip | ||
103 | * via PIO. | ||
104 | */ | ||
105 | |||
106 | /***************************************************************** Detection */ | ||
107 | int __init cyber_esp_detect(struct scsi_host_template *tpnt) | ||
108 | { | ||
109 | struct NCR_ESP *esp; | ||
110 | struct zorro_dev *z = NULL; | ||
111 | unsigned long address; | ||
112 | |||
113 | while ((z = zorro_find_device(ZORRO_WILDCARD, z))) { | ||
114 | unsigned long board = z->resource.start; | ||
115 | if ((z->id == ZORRO_PROD_PHASE5_BLIZZARD_1220_CYBERSTORM || | ||
116 | z->id == ZORRO_PROD_PHASE5_BLIZZARD_1230_II_FASTLANE_Z3_CYBERSCSI_CYBERSTORM060) && | ||
117 | request_mem_region(board+CYBER_ESP_ADDR, | ||
118 | sizeof(struct ESP_regs), "NCR53C9x")) { | ||
119 | /* Figure out if this is a CyberStorm or really a | ||
120 | * Fastlane/Blizzard Mk II by looking at the board size. | ||
121 | * CyberStorm maps 64kB | ||
122 | * (ZORRO_PROD_PHASE5_BLIZZARD_1220_CYBERSTORM does anyway) | ||
123 | */ | ||
124 | if(z->resource.end-board != 0xffff) { | ||
125 | release_mem_region(board+CYBER_ESP_ADDR, | ||
126 | sizeof(struct ESP_regs)); | ||
127 | return 0; | ||
128 | } | ||
129 | esp = esp_allocate(tpnt, (void *)board + CYBER_ESP_ADDR, 0); | ||
130 | |||
131 | /* Do command transfer with programmed I/O */ | ||
132 | esp->do_pio_cmds = 1; | ||
133 | |||
134 | /* Required functions */ | ||
135 | esp->dma_bytes_sent = &dma_bytes_sent; | ||
136 | esp->dma_can_transfer = &dma_can_transfer; | ||
137 | esp->dma_dump_state = &dma_dump_state; | ||
138 | esp->dma_init_read = &dma_init_read; | ||
139 | esp->dma_init_write = &dma_init_write; | ||
140 | esp->dma_ints_off = &dma_ints_off; | ||
141 | esp->dma_ints_on = &dma_ints_on; | ||
142 | esp->dma_irq_p = &dma_irq_p; | ||
143 | esp->dma_ports_p = &dma_ports_p; | ||
144 | esp->dma_setup = &dma_setup; | ||
145 | |||
146 | /* Optional functions */ | ||
147 | esp->dma_barrier = 0; | ||
148 | esp->dma_drain = 0; | ||
149 | esp->dma_invalidate = 0; | ||
150 | esp->dma_irq_entry = 0; | ||
151 | esp->dma_irq_exit = 0; | ||
152 | esp->dma_led_on = &dma_led_on; | ||
153 | esp->dma_led_off = &dma_led_off; | ||
154 | esp->dma_poll = 0; | ||
155 | esp->dma_reset = 0; | ||
156 | |||
157 | /* SCSI chip speed */ | ||
158 | esp->cfreq = 40000000; | ||
159 | |||
160 | /* The DMA registers on the CyberStorm are mapped | ||
161 | * relative to the device (i.e. in the same Zorro | ||
162 | * I/O block). | ||
163 | */ | ||
164 | address = (unsigned long)ZTWO_VADDR(board); | ||
165 | esp->dregs = (void *)(address + CYBER_DMA_ADDR); | ||
166 | |||
167 | /* ESP register base */ | ||
168 | esp->eregs = (struct ESP_regs *)(address + CYBER_ESP_ADDR); | ||
169 | |||
170 | /* Set the command buffer */ | ||
171 | esp->esp_command = cmd_buffer; | ||
172 | esp->esp_command_dvma = virt_to_bus((void *)cmd_buffer); | ||
173 | |||
174 | esp->irq = IRQ_AMIGA_PORTS; | ||
175 | request_irq(IRQ_AMIGA_PORTS, esp_intr, IRQF_SHARED, | ||
176 | "CyberStorm SCSI", esp->ehost); | ||
177 | /* Figure out our scsi ID on the bus */ | ||
178 | /* The DMA cond flag contains a hardcoded jumper bit | ||
179 | * which can be used to select host number 6 or 7. | ||
generated by cgit v1.2.2 (git 2.25.0) at 2025-01-03 16:45:13 -0500 |