21 #include <linux/module.h>
23 #include <linux/kernel.h>
24 #include <linux/string.h>
28 #include <linux/stat.h>
47 #define DMADATA_OFFSET (0x200)
49 #define DMASTAT_OFFSET (0x600)
50 #define DMASTAT_DRQ (1 << 0)
52 #define CSTATUS_IRQ (1 << 0)
54 #define VERSION "1.10 (23/01/2003 2.5.57)"
75 static void arxescsi_pseudo_dma_write(
unsigned char *
addr,
void __iomem *base)
78 " stmdb sp!, {r0-r12}\n"
83 ".loop_1: ldmia r3!, {r6, r8, r10, r12}\n"
84 " mov r5, r6, lsl #16\n"
85 " mov r7, r8, lsl #16\n"
86 ".loop_2: ldrb r0, [r1, #1536]\n"
89 " stmia r2, {r5-r8}\n\t"
90 " mov r9, r10, lsl #16\n"
91 " mov r11, r12, lsl #16\n"
92 ".loop_3: ldrb r0, [r1, #1536]\n"
95 " stmia r2, {r9-r12}\n"
98 " ldmia sp!, {r0-r12}\n"
100 :
"r" (addr),
"r" (base));
125 while (length > 256) {
130 arxescsi_pseudo_dma_write(addr, base);
143 word = *addr | *(addr + 1) << 8;
156 if (transfer && (transfer & 255)) {
157 while (length >= 256) {
158 if (
readb(base + 0x80) & STAT_INT) {
176 if (
readb(base + 0x80) & STAT_INT)
214 static char string[150];
216 sprintf(
string,
"%s (%s) in slot %d v%s",
255 pos = p - buffer -
offset;
263 .proc_info = arxescsi_proc_info,
264 .name =
"ARXE SCSI card",
276 .proc_name =
"arxescsi",
307 info->
info.
scsi.io_base = base + 0x2000;
319 info->
info.
dma.setup = arxescsi_dma_setup;
320 info->
info.
dma.pseudo = arxescsi_dma_pseudo;
321 info->
info.
dma.stop = arxescsi_dma_stop;
355 static const struct ecard_id arxescsi_cids[] = {
361 .probe = arxescsi_probe,
363 .id_table = arxescsi_cids,
369 static int __init init_arxe_scsi_driver(
void)
374 static void __exit exit_arxe_scsi_driver(
void)