| @@ -1,14 +1,14 @@ | | | @@ -1,14 +1,14 @@ |
1 | /* $NetBSD: dma.c,v 1.47 2024/01/16 07:06:59 thorpej Exp $ */ | | 1 | /* $NetBSD: dma.c,v 1.48 2024/04/30 09:55:45 tsutsui Exp $ */ |
2 | | | 2 | |
3 | /*- | | 3 | /*- |
4 | * Copyright (c) 1996, 1997 The NetBSD Foundation, Inc. | | 4 | * Copyright (c) 1996, 1997 The NetBSD Foundation, Inc. |
5 | * All rights reserved. | | 5 | * All rights reserved. |
6 | * | | 6 | * |
7 | * This code is derived from software contributed to The NetBSD Foundation | | 7 | * This code is derived from software contributed to The NetBSD Foundation |
8 | * by Jason R. Thorpe. | | 8 | * by Jason R. Thorpe. |
9 | * | | 9 | * |
10 | * Redistribution and use in source and binary forms, with or without | | 10 | * Redistribution and use in source and binary forms, with or without |
11 | * modification, are permitted provided that the following conditions | | 11 | * modification, are permitted provided that the following conditions |
12 | * are met: | | 12 | * are met: |
13 | * 1. Redistributions of source code must retain the above copyright | | 13 | * 1. Redistributions of source code must retain the above copyright |
14 | * notice, this list of conditions and the following disclaimer. | | 14 | * notice, this list of conditions and the following disclaimer. |
| @@ -57,27 +57,27 @@ | | | @@ -57,27 +57,27 @@ |
57 | * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF | | 57 | * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF |
58 | * SUCH DAMAGE. | | 58 | * SUCH DAMAGE. |
59 | * | | 59 | * |
60 | * @(#)dma.c 8.1 (Berkeley) 6/10/93 | | 60 | * @(#)dma.c 8.1 (Berkeley) 6/10/93 |
61 | */ | | 61 | */ |
62 | | | 62 | |
63 | /* | | 63 | /* |
64 | * DMA driver | | 64 | * DMA driver |
65 | */ | | 65 | */ |
66 | | | 66 | |
67 | #include "opt_m68k_arch.h" | | 67 | #include "opt_m68k_arch.h" |
68 | | | 68 | |
69 | #include <sys/cdefs.h> | | 69 | #include <sys/cdefs.h> |
70 | __KERNEL_RCSID(0, "$NetBSD: dma.c,v 1.47 2024/01/16 07:06:59 thorpej Exp $"); | | 70 | __KERNEL_RCSID(0, "$NetBSD: dma.c,v 1.48 2024/04/30 09:55:45 tsutsui Exp $"); |
71 | | | 71 | |
72 | #include <machine/hp300spu.h> /* XXX param.h includes cpu.h */ | | 72 | #include <machine/hp300spu.h> /* XXX param.h includes cpu.h */ |
73 | | | 73 | |
74 | #include <sys/param.h> | | 74 | #include <sys/param.h> |
75 | #include <sys/systm.h> | | 75 | #include <sys/systm.h> |
76 | #include <sys/callout.h> | | 76 | #include <sys/callout.h> |
77 | #include <sys/device.h> | | 77 | #include <sys/device.h> |
78 | #include <sys/kernel.h> | | 78 | #include <sys/kernel.h> |
79 | #include <sys/proc.h> | | 79 | #include <sys/proc.h> |
80 | | | 80 | |
81 | #include <uvm/uvm_extern.h> | | 81 | #include <uvm/uvm_extern.h> |
82 | | | 82 | |
83 | #include <machine/bus.h> | | 83 | #include <machine/bus.h> |
| @@ -266,27 +266,27 @@ void | | | @@ -266,27 +266,27 @@ void |
266 | dmaupdateipl(int ipl) | | 266 | dmaupdateipl(int ipl) |
267 | { | | 267 | { |
268 | struct dma_softc *sc = dma_softc; | | 268 | struct dma_softc *sc = dma_softc; |
269 | | | 269 | |
270 | if (sc->sc_ih != NULL && sc->sc_ipl == ipl) { | | 270 | if (sc->sc_ih != NULL && sc->sc_ipl == ipl) { |
271 | /* No change. */ | | 271 | /* No change. */ |
272 | return; | | 272 | return; |
273 | } | | 273 | } |
274 | | | 274 | |
275 | if (sc->sc_ih != NULL) { | | 275 | if (sc->sc_ih != NULL) { |
276 | intr_disestablish(sc->sc_ih); | | 276 | intr_disestablish(sc->sc_ih); |
277 | } | | 277 | } |
278 | | | 278 | |
279 | if ((sc->sc_ipl == ipl) == 0) { | | 279 | if ((sc->sc_ipl = ipl) == 0) { |
280 | /* Don't hook up a new handler. */ | | 280 | /* Don't hook up a new handler. */ |
281 | return; | | 281 | return; |
282 | } | | 282 | } |
283 | | | 283 | |
284 | sc->sc_ih = intr_establish(dmaintr, sc, sc->sc_ipl, ISRPRI_BIO); | | 284 | sc->sc_ih = intr_establish(dmaintr, sc, sc->sc_ipl, ISRPRI_BIO); |
285 | if (sc->sc_type == DMA_B && sc->sc_ipl != 3) { | | 285 | if (sc->sc_type == DMA_B && sc->sc_ipl != 3) { |
286 | aprint_error_dev(sc->sc_dev, | | 286 | aprint_error_dev(sc->sc_dev, |
287 | "WARNING: IPL set to %d on maybe-rev. A card!\n", | | 287 | "WARNING: IPL set to %d on maybe-rev. A card!\n", |
288 | sc->sc_ipl); | | 288 | sc->sc_ipl); |
289 | } | | 289 | } |
290 | } | | 290 | } |
291 | | | 291 | |
292 | int | | 292 | int |