ncr.c revision 1.23 1 1.23 ragge /* $NetBSD: ncr.c,v 1.23 1999/10/22 21:12:20 ragge Exp $ */
2 1.1 ragge
3 1.16 ragge /*-
4 1.16 ragge * Copyright (c) 1996 The NetBSD Foundation, Inc.
5 1.1 ragge * All rights reserved.
6 1.1 ragge *
7 1.16 ragge * This code is derived from software contributed to The NetBSD Foundation
8 1.16 ragge * by Adam Glass, David Jones, Gordon W. Ross, and Jens A. Nilsson.
9 1.16 ragge *
10 1.1 ragge * Redistribution and use in source and binary forms, with or without
11 1.1 ragge * modification, are permitted provided that the following conditions
12 1.1 ragge * are met:
13 1.1 ragge * 1. Redistributions of source code must retain the above copyright
14 1.1 ragge * notice, this list of conditions and the following disclaimer.
15 1.1 ragge * 2. Redistributions in binary form must reproduce the above copyright
16 1.1 ragge * notice, this list of conditions and the following disclaimer in the
17 1.1 ragge * documentation and/or other materials provided with the distribution.
18 1.16 ragge * 3. All advertising materials mentioning features or use of this software
19 1.1 ragge * must display the following acknowledgement:
20 1.23 ragge * This product includes software developed by the NetBSD
21 1.23 ragge * Foundation, Inc. and its contributors.
22 1.16 ragge * 4. Neither the name of The NetBSD Foundation nor the names of its
23 1.16 ragge * contributors may be used to endorse or promote products derived
24 1.16 ragge * from this software without specific prior written permission.
25 1.16 ragge *
26 1.16 ragge * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS
27 1.16 ragge * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
28 1.16 ragge * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
29 1.16 ragge * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS
30 1.16 ragge * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
31 1.16 ragge * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
32 1.16 ragge * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
33 1.16 ragge * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
34 1.16 ragge * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
35 1.16 ragge * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
36 1.16 ragge * POSSIBILITY OF SUCH DAMAGE.
37 1.1 ragge */
38 1.1 ragge
39 1.1 ragge /*
40 1.16 ragge * This file contains the machine-dependent parts of the NCR-5380
41 1.16 ragge * controller. The machine-independent parts are in ncr5380sbc.c.
42 1.16 ragge *
43 1.16 ragge * Note: Only PIO transfers for now which implicates very bad
44 1.16 ragge * performance. DMA support will come soon.
45 1.16 ragge *
46 1.16 ragge * Jens A. Nilsson.
47 1.16 ragge *
48 1.16 ragge * Credits:
49 1.16 ragge *
50 1.16 ragge * This code is based on arch/sun3/dev/si*
51 1.16 ragge * Written by David Jones, Gordon Ross, and Adam Glass.
52 1.1 ragge */
53 1.1 ragge
54 1.1 ragge #include <sys/param.h>
55 1.1 ragge #include <sys/systm.h>
56 1.16 ragge #include <sys/errno.h>
57 1.1 ragge #include <sys/kernel.h>
58 1.16 ragge #include <sys/malloc.h>
59 1.16 ragge #include <sys/device.h>
60 1.1 ragge #include <sys/buf.h>
61 1.1 ragge #include <sys/proc.h>
62 1.1 ragge #include <sys/user.h>
63 1.1 ragge
64 1.23 ragge #include <vm/vm.h>
65 1.23 ragge #include <vm/vm_kern.h>
66 1.23 ragge
67 1.9 bouyer #include <dev/scsipi/scsi_all.h>
68 1.9 bouyer #include <dev/scsipi/scsipi_all.h>
69 1.9 bouyer #include <dev/scsipi/scsipi_debug.h>
70 1.9 bouyer #include <dev/scsipi/scsiconf.h>
71 1.1 ragge
72 1.1 ragge #include <dev/ic/ncr5380reg.h>
73 1.1 ragge #include <dev/ic/ncr5380var.h>
74 1.1 ragge
75 1.16 ragge #include <machine/vsbus.h>
76 1.16 ragge #include <machine/bus.h>
77 1.21 ragge #include <machine/sid.h>
78 1.1 ragge
79 1.16 ragge #include "ioconf.h"
80 1.1 ragge
81 1.16 ragge #define MIN_DMA_LEN 128
82 1.1 ragge
83 1.1 ragge struct si_dma_handle {
84 1.16 ragge int dh_flags;
85 1.16 ragge #define SIDH_BUSY 1
86 1.16 ragge #define SIDH_OUT 2
87 1.23 ragge caddr_t dh_addr;
88 1.23 ragge int dh_len;
89 1.23 ragge struct proc *dh_proc;
90 1.1 ragge };
91 1.1 ragge
92 1.1 ragge struct si_softc {
93 1.23 ragge struct ncr5380_softc ncr_sc;
94 1.23 ragge caddr_t ncr_addr;
95 1.23 ragge int ncr_off;
96 1.23 ragge int ncr_dmaaddr;
97 1.23 ragge int ncr_dmacount;
98 1.23 ragge int ncr_dmadir;
99 1.23 ragge struct si_dma_handle ncr_dma[SCI_OPENINGS];
100 1.1 ragge };
101 1.1 ragge
102 1.1 ragge /* This is copied from julian's bt driver */
103 1.1 ragge /* "so we have a default dev struct for our link struct." */
104 1.9 bouyer static struct scsipi_device si_dev = {
105 1.16 ragge NULL, /* Use default error handler. */
106 1.16 ragge NULL, /* Use default start handler. */
107 1.16 ragge NULL, /* Use default async handler. */
108 1.16 ragge NULL, /* Use default "done" routine. */
109 1.1 ragge };
110 1.1 ragge
111 1.23 ragge static int si_match(struct device *, struct cfdata *, void *);
112 1.23 ragge static void si_attach(struct device *, struct device *, void *);
113 1.23 ragge static void si_minphys(struct buf *);
114 1.23 ragge static void si_intr(int);
115 1.23 ragge
116 1.23 ragge static void si_dma_alloc __P((struct ncr5380_softc *));
117 1.23 ragge static void si_dma_free __P((struct ncr5380_softc *));
118 1.23 ragge static void si_dma_setup __P((struct ncr5380_softc *));
119 1.23 ragge static void si_dma_start __P((struct ncr5380_softc *));
120 1.23 ragge static void si_dma_poll __P((struct ncr5380_softc *));
121 1.23 ragge static void si_dma_eop __P((struct ncr5380_softc *));
122 1.23 ragge static void si_dma_stop __P((struct ncr5380_softc *));
123 1.23 ragge
124 1.1 ragge
125 1.1 ragge struct cfattach ncr_ca = {
126 1.16 ragge sizeof(struct si_softc), si_match, si_attach
127 1.1 ragge };
128 1.1 ragge
129 1.16 ragge static int
130 1.16 ragge si_match(parent, cf, aux)
131 1.16 ragge struct device *parent;
132 1.16 ragge struct cfdata *cf;
133 1.16 ragge void *aux;
134 1.1 ragge {
135 1.16 ragge struct vsbus_attach_args *va = aux;
136 1.18 ragge volatile char *si_csr = (char *) va->va_addr;
137 1.1 ragge
138 1.21 ragge if (vax_boardtype == VAX_BTYP_49)
139 1.21 ragge return 0;
140 1.19 ragge /* This is the way Linux autoprobes the interrupt MK-990321 */
141 1.19 ragge si_csr[12] = 0;
142 1.19 ragge si_csr[16] = 0x80;
143 1.19 ragge si_csr[0] = 0x80;
144 1.19 ragge si_csr[4] = 5; /* 0xcf */
145 1.18 ragge DELAY(100000);
146 1.18 ragge va->va_ivec = si_intr;
147 1.18 ragge return 1;
148 1.1 ragge }
149 1.1 ragge
150 1.16 ragge static void
151 1.18 ragge si_attach(parent, self, aux)
152 1.1 ragge struct device *parent, *self;
153 1.18 ragge void *aux;
154 1.1 ragge {
155 1.18 ragge struct vsbus_attach_args *va = aux;
156 1.1 ragge struct si_softc *sc = (struct si_softc *) self;
157 1.16 ragge struct ncr5380_softc *ncr_sc = &sc->ncr_sc;
158 1.1 ragge
159 1.16 ragge printf("\n");
160 1.1 ragge /*
161 1.23 ragge * DMA area mapin.
162 1.23 ragge * On VS3100, split the 128K block between the two devices.
163 1.23 ragge * On VS2000, don't care for now.
164 1.1 ragge */
165 1.23 ragge #define DMASIZE (64*1024)
166 1.23 ragge if (vax_boardtype != VAX_BTYP_410) {
167 1.23 ragge if (va->va_paddr & 0x100) /* Magic */
168 1.23 ragge sc->ncr_off = DMASIZE;
169 1.23 ragge sc->ncr_addr = (caddr_t)uvm_km_valloc(kernel_map, DMASIZE);
170 1.23 ragge
171 1.23 ragge ioaccess((vaddr_t)sc->ncr_addr,
172 1.23 ragge 0x202d0000 + sc->ncr_off, DMASIZE/VAX_NBPG);
173 1.23 ragge
174 1.23 ragge /*
175 1.23 ragge * MD function pointers used by the MI code.
176 1.23 ragge */
177 1.23 ragge ncr_sc->sc_dma_alloc = si_dma_alloc;
178 1.23 ragge ncr_sc->sc_dma_free = si_dma_free;
179 1.23 ragge ncr_sc->sc_dma_setup = si_dma_setup;
180 1.23 ragge ncr_sc->sc_dma_start = si_dma_start;
181 1.23 ragge ncr_sc->sc_dma_poll = si_dma_poll;
182 1.23 ragge ncr_sc->sc_dma_eop = si_dma_eop;
183 1.23 ragge ncr_sc->sc_dma_stop = si_dma_stop;
184 1.23 ragge
185 1.23 ragge /* DMA control register offsets */
186 1.23 ragge sc->ncr_dmaaddr = 32; /* DMA address in buffer, longword */
187 1.23 ragge sc->ncr_dmacount = 64; /* DMA count register */
188 1.23 ragge sc->ncr_dmadir = 68; /* Direction of DMA transfer */
189 1.23 ragge }
190 1.16 ragge ncr_sc->sc_pio_out = ncr5380_pio_out;
191 1.16 ragge ncr_sc->sc_pio_in = ncr5380_pio_in;
192 1.16 ragge
193 1.16 ragge ncr_sc->sc_min_dma_len = MIN_DMA_LEN;
194 1.15 thorpej
195 1.15 thorpej /*
196 1.15 thorpej * Fill in the adapter.
197 1.15 thorpej */
198 1.15 thorpej ncr_sc->sc_adapter.scsipi_cmd = ncr5380_scsi_cmd;
199 1.15 thorpej ncr_sc->sc_adapter.scsipi_minphys = si_minphys;
200 1.15 thorpej
201 1.1 ragge /*
202 1.1 ragge * Fill in the prototype scsi_link.
203 1.1 ragge */
204 1.9 bouyer ncr_sc->sc_link.scsipi_scsi.channel = SCSI_CHANNEL_ONLY_ONE;
205 1.1 ragge ncr_sc->sc_link.adapter_softc = sc;
206 1.16 ragge ncr_sc->sc_link.scsipi_scsi.adapter_target = 7;
207 1.15 thorpej ncr_sc->sc_link.adapter = &ncr_sc->sc_adapter;
208 1.1 ragge ncr_sc->sc_link.device = &si_dev;
209 1.9 bouyer ncr_sc->sc_link.type = BUS_SCSI;
210 1.16 ragge
211 1.1 ragge /*
212 1.16 ragge * Initialize fields used by the MI code.
213 1.1 ragge */
214 1.22 ragge /* ncr_sc->sc_regt = Unused on VAX */
215 1.22 ragge ncr_sc->sc_regh = vax_map_physmem(va->va_paddr, 1);
216 1.22 ragge
217 1.22 ragge /* Register offsets */
218 1.22 ragge ncr_sc->sci_r0 = 0;
219 1.22 ragge ncr_sc->sci_r1 = 4;
220 1.22 ragge ncr_sc->sci_r2 = 8;
221 1.22 ragge ncr_sc->sci_r3 = 12;
222 1.22 ragge ncr_sc->sci_r4 = 16;
223 1.22 ragge ncr_sc->sci_r5 = 20;
224 1.22 ragge ncr_sc->sci_r6 = 24;
225 1.22 ragge ncr_sc->sci_r7 = 28;
226 1.1 ragge
227 1.20 ragge ncr_sc->sc_no_disconnect = 0xff;
228 1.1 ragge /*
229 1.16 ragge * Initialize si board itself.
230 1.1 ragge */
231 1.1 ragge ncr5380_init(ncr_sc);
232 1.1 ragge ncr5380_reset_scsibus(ncr_sc);
233 1.1 ragge
234 1.16 ragge config_found(&(ncr_sc->sc_dev), &(ncr_sc->sc_link), scsiprint);
235 1.1 ragge }
236 1.1 ragge
237 1.22 ragge /*
238 1.22 ragge * Adjust the max transfer size. The DMA buffer is only 16k on VS2000.
239 1.22 ragge */
240 1.16 ragge static void
241 1.1 ragge si_minphys(struct buf *bp)
242 1.1 ragge {
243 1.22 ragge if ((vax_boardtype == VAX_BTYP_410) && (bp->b_bcount > (16*1024)))
244 1.22 ragge bp->b_bcount = (16*1024);
245 1.22 ragge else if (bp->b_bcount > MAXPHYS)
246 1.22 ragge bp->b_bcount = MAXPHYS;
247 1.1 ragge }
248 1.1 ragge
249 1.16 ragge static void
250 1.16 ragge si_intr(int arg)
251 1.1 ragge {
252 1.16 ragge ncr5380_intr(ncr_cd.cd_devs[arg]);
253 1.23 ragge }
254 1.23 ragge
255 1.23 ragge void
256 1.23 ragge si_dma_alloc(ncr_sc)
257 1.23 ragge struct ncr5380_softc *ncr_sc;
258 1.23 ragge {
259 1.23 ragge struct si_softc *sc = (struct si_softc *)ncr_sc;
260 1.23 ragge struct sci_req *sr = ncr_sc->sc_current;
261 1.23 ragge struct scsipi_xfer *xs = sr->sr_xs;
262 1.23 ragge struct si_dma_handle *dh;
263 1.23 ragge int xlen, i;
264 1.23 ragge
265 1.23 ragge #ifdef DIAGNOSTIC
266 1.23 ragge if (sr->sr_dma_hand != NULL)
267 1.23 ragge panic("si_dma_alloc: already have DMA handle");
268 1.23 ragge #endif
269 1.23 ragge
270 1.23 ragge /* Polled transfers shouldn't allocate a DMA handle. */
271 1.23 ragge if (sr->sr_flags & SR_IMMED)
272 1.23 ragge return;
273 1.23 ragge
274 1.23 ragge xlen = ncr_sc->sc_datalen;
275 1.23 ragge
276 1.23 ragge /* Make sure our caller checked sc_min_dma_len. */
277 1.23 ragge if (xlen < MIN_DMA_LEN)
278 1.23 ragge panic("si_dma_alloc: len=0x%x\n", xlen);
279 1.23 ragge
280 1.23 ragge /*
281 1.23 ragge * Find free PDMA handle. Guaranteed to find one since we
282 1.23 ragge * have as many PDMA handles as the driver has processes.
283 1.23 ragge * (instances?)
284 1.23 ragge */
285 1.23 ragge for (i = 0; i < SCI_OPENINGS; i++) {
286 1.23 ragge if ((sc->ncr_dma[i].dh_flags & SIDH_BUSY) == 0)
287 1.23 ragge goto found;
288 1.23 ragge }
289 1.23 ragge panic("sbc: no free PDMA handles");
290 1.23 ragge found:
291 1.23 ragge dh = &sc->ncr_dma[i];
292 1.23 ragge dh->dh_flags = SIDH_BUSY;
293 1.23 ragge dh->dh_addr = ncr_sc->sc_dataptr;
294 1.23 ragge dh->dh_len = xlen;
295 1.23 ragge dh->dh_proc = xs->bp->b_proc;
296 1.23 ragge
297 1.23 ragge /* Remember dest buffer parameters */
298 1.23 ragge if (xs->xs_control & XS_CTL_DATA_OUT)
299 1.23 ragge dh->dh_flags |= SIDH_OUT;
300 1.23 ragge
301 1.23 ragge sr->sr_dma_hand = dh;
302 1.23 ragge }
303 1.23 ragge
304 1.23 ragge void
305 1.23 ragge si_dma_free(ncr_sc)
306 1.23 ragge struct ncr5380_softc *ncr_sc;
307 1.23 ragge {
308 1.23 ragge struct sci_req *sr = ncr_sc->sc_current;
309 1.23 ragge struct si_dma_handle *dh = sr->sr_dma_hand;
310 1.23 ragge
311 1.23 ragge if (dh->dh_flags & SIDH_BUSY)
312 1.23 ragge dh->dh_flags = 0;
313 1.23 ragge else
314 1.23 ragge printf("si_dma_free: free'ing unused buffer\n");
315 1.23 ragge
316 1.23 ragge sr->sr_dma_hand = NULL;
317 1.23 ragge }
318 1.23 ragge
319 1.23 ragge void
320 1.23 ragge si_dma_setup(ncr_sc)
321 1.23 ragge struct ncr5380_softc *ncr_sc;
322 1.23 ragge {
323 1.23 ragge /* Do nothing here */
324 1.23 ragge }
325 1.23 ragge
326 1.23 ragge void
327 1.23 ragge si_dma_start(ncr_sc)
328 1.23 ragge struct ncr5380_softc *ncr_sc;
329 1.23 ragge {
330 1.23 ragge struct si_softc *sc = (struct si_softc *)ncr_sc;
331 1.23 ragge struct sci_req *sr = ncr_sc->sc_current;
332 1.23 ragge struct si_dma_handle *dh = sr->sr_dma_hand;
333 1.23 ragge
334 1.23 ragge /*
335 1.23 ragge * Set the VAX-DMA-specific registers, and copy the data if
336 1.23 ragge * it is directed "outbound".
337 1.23 ragge */
338 1.23 ragge if (dh->dh_flags & SIDH_OUT) {
339 1.23 ragge if ((vaddr_t)dh->dh_addr & KERNBASE)
340 1.23 ragge bcopy(dh->dh_addr, sc->ncr_addr, dh->dh_len);
341 1.23 ragge else
342 1.23 ragge vsbus_copyfromproc(dh->dh_proc, dh->dh_addr,
343 1.23 ragge sc->ncr_addr, dh->dh_len);
344 1.23 ragge bus_space_write_1(ncr_sc->sc_regt, ncr_sc->sc_regh,
345 1.23 ragge sc->ncr_dmadir, 0);
346 1.23 ragge } else {
347 1.23 ragge bus_space_write_1(ncr_sc->sc_regt, ncr_sc->sc_regh,
348 1.23 ragge sc->ncr_dmadir, 1);
349 1.23 ragge }
350 1.23 ragge bus_space_write_4(ncr_sc->sc_regt, ncr_sc->sc_regh,
351 1.23 ragge sc->ncr_dmacount, -dh->dh_len);
352 1.23 ragge bus_space_write_4(ncr_sc->sc_regt, ncr_sc->sc_regh,
353 1.23 ragge sc->ncr_dmaaddr, sc->ncr_off);
354 1.23 ragge /*
355 1.23 ragge * Now from the 5380-internal DMA registers.
356 1.23 ragge */
357 1.23 ragge if (dh->dh_flags & SIDH_OUT) {
358 1.23 ragge NCR5380_WRITE(ncr_sc, sci_tcmd, PHASE_DATA_OUT);
359 1.23 ragge NCR5380_WRITE(ncr_sc, sci_icmd, SCI_ICMD_DATA);
360 1.23 ragge NCR5380_WRITE(ncr_sc, sci_mode, NCR5380_READ(ncr_sc, sci_mode)
361 1.23 ragge | SCI_MODE_DMA | SCI_MODE_DMA_IE);
362 1.23 ragge NCR5380_WRITE(ncr_sc, sci_dma_send, 0);
363 1.23 ragge } else {
364 1.23 ragge NCR5380_WRITE(ncr_sc, sci_tcmd, PHASE_DATA_IN);
365 1.23 ragge NCR5380_WRITE(ncr_sc, sci_icmd, 0);
366 1.23 ragge NCR5380_WRITE(ncr_sc, sci_mode, NCR5380_READ(ncr_sc, sci_mode)
367 1.23 ragge | SCI_MODE_DMA | SCI_MODE_DMA_IE);
368 1.23 ragge NCR5380_WRITE(ncr_sc, sci_irecv, 0);
369 1.23 ragge }
370 1.23 ragge ncr_sc->sc_state |= NCR_DOINGDMA;
371 1.23 ragge }
372 1.23 ragge
373 1.23 ragge /*
374 1.23 ragge * When?
375 1.23 ragge */
376 1.23 ragge void
377 1.23 ragge si_dma_poll(ncr_sc)
378 1.23 ragge struct ncr5380_softc *ncr_sc;
379 1.23 ragge {
380 1.23 ragge printf("si_dma_poll\n");
381 1.23 ragge }
382 1.23 ragge
383 1.23 ragge /*
384 1.23 ragge * When?
385 1.23 ragge */
386 1.23 ragge void
387 1.23 ragge si_dma_eop(ncr_sc)
388 1.23 ragge struct ncr5380_softc *ncr_sc;
389 1.23 ragge {
390 1.23 ragge printf("si_dma_eop\n");
391 1.23 ragge }
392 1.23 ragge
393 1.23 ragge void
394 1.23 ragge si_dma_stop(ncr_sc)
395 1.23 ragge struct ncr5380_softc *ncr_sc;
396 1.23 ragge {
397 1.23 ragge struct si_softc *sc = (struct si_softc *)ncr_sc;
398 1.23 ragge struct sci_req *sr = ncr_sc->sc_current;
399 1.23 ragge struct si_dma_handle *dh = sr->sr_dma_hand;
400 1.23 ragge int count, i;
401 1.23 ragge
402 1.23 ragge if (ncr_sc->sc_state & NCR_DOINGDMA)
403 1.23 ragge ncr_sc->sc_state &= ~NCR_DOINGDMA;
404 1.23 ragge
405 1.23 ragge /*
406 1.23 ragge * Sometimes the FIFO buffer isn't drained when the
407 1.23 ragge * interrupt is posted. Just loop here and hope that
408 1.23 ragge * it will drain soon.
409 1.23 ragge */
410 1.23 ragge for (i = 0; i < 20000; i++) {
411 1.23 ragge count = bus_space_read_4(ncr_sc->sc_regt,
412 1.23 ragge ncr_sc->sc_regh, sc->ncr_dmacount);
413 1.23 ragge if (count == 0)
414 1.23 ragge break;
415 1.23 ragge DELAY(100);
416 1.23 ragge }
417 1.23 ragge if (count == 0) {
418 1.23 ragge if (((dh->dh_flags & SIDH_OUT) == 0)) {
419 1.23 ragge if ((vaddr_t)dh->dh_addr & KERNBASE)
420 1.23 ragge bcopy(sc->ncr_addr, dh->dh_addr, dh->dh_len);
421 1.23 ragge else
422 1.23 ragge vsbus_copytoproc(dh->dh_proc, sc->ncr_addr,
423 1.23 ragge dh->dh_addr, dh->dh_len);
424 1.23 ragge
425 1.23 ragge }
426 1.23 ragge ncr_sc->sc_dataptr += dh->dh_len;
427 1.23 ragge ncr_sc->sc_datalen -= dh->dh_len;
428 1.23 ragge }
429 1.23 ragge
430 1.23 ragge NCR5380_WRITE(ncr_sc, sci_mode, NCR5380_READ(ncr_sc, sci_mode) &
431 1.23 ragge ~(SCI_MODE_DMA | SCI_MODE_DMA_IE));
432 1.23 ragge NCR5380_WRITE(ncr_sc, sci_icmd, 0);
433 1.1 ragge }
434