diff options
| author | tsutsui <tsutsui@NetBSD.org> | 2007-03-06 14:45:31 +0000 |
|---|---|---|
| committer | tsutsui <tsutsui@NetBSD.org> | 2007-03-06 14:45:31 +0000 |
| commit | f343bfa8eb8b7079d28c256f11b781fc71048188 (patch) | |
| tree | bf228112a0922c644c93c21643aae7d9b9f6a091 /sys/arch/atari/dev | |
| parent | d5aef94bf1b6a5e5e4258f464daa450254b722ee (diff) | |
Treat bus_space_handle_t as opaque, and use bus_space_vaddr(9) to
get device address.
XXX: This driver should be rewritten to use bus_space(9) more properly.
Diffstat (limited to 'sys/arch/atari/dev')
| -rw-r--r-- | sys/arch/atari/dev/hdfd.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/sys/arch/atari/dev/hdfd.c b/sys/arch/atari/dev/hdfd.c index e58c1161175..c58a92c3a3f 100644 --- a/sys/arch/atari/dev/hdfd.c +++ b/sys/arch/atari/dev/hdfd.c @@ -1,4 +1,4 @@ -/* $NetBSD: hdfd.c,v 1.54 2007/03/06 14:10:07 tsutsui Exp $ */ +/* $NetBSD: hdfd.c,v 1.55 2007/03/06 14:45:31 tsutsui Exp $ */ /*- * Copyright (c) 1996 Leo Weppelman @@ -91,7 +91,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: hdfd.c,v 1.54 2007/03/06 14:10:07 tsutsui Exp $"); +__KERNEL_RCSID(0, "$NetBSD: hdfd.c,v 1.55 2007/03/06 14:45:31 tsutsui Exp $"); #include "opt_ddb.h" @@ -328,6 +328,7 @@ fdcprobe(parent, cfp, aux) { static int fdc_matched = 0; bus_space_tag_t mb_tag; + bus_space_handle_t handle; /* Match only once */ if(strcmp("fdc", aux) || fdc_matched) @@ -339,12 +340,12 @@ fdcprobe(parent, cfp, aux) if ((mb_tag = mb_alloc_bus_space_tag()) == NULL) return 0; - if (bus_space_map(mb_tag, FD_IOBASE, FD_IOSIZE, 0, - (void **)(void *)&fdio_addr)) { + if (bus_space_map(mb_tag, FD_IOBASE, FD_IOSIZE, 0, &handle)) { printf("fdcprobe: cannot map io-area\n"); mb_free_bus_space_tag(mb_tag); return (0); } + fdio_addr = bus_space_vaddr(mb_tag, handle); /* XXX */ #ifdef FD_DEBUG printf("fdcprobe: I/O mapping done va: %p\n", fdio_addr); @@ -365,8 +366,7 @@ fdcprobe(parent, cfp, aux) out: if (fdc_matched == 0) { - bus_space_unmap(mb_tag, (void *)__UNVOLATILE(fdio_addr), - FD_IOSIZE); + bus_space_unmap(mb_tag, handle, FD_IOSIZE); mb_free_bus_space_tag(mb_tag); } |
