diff options
| author | uwe <uwe@NetBSD.org> | 2012-08-09 20:25:05 +0000 |
|---|---|---|
| committer | uwe <uwe@NetBSD.org> | 2012-08-09 20:25:05 +0000 |
| commit | d2dbc22f77cff81c906f83744f74bc3dfb8e50d5 (patch) | |
| tree | cb107a4cc69456ad6fd55fcc754fdbd8f588c452 /sys/dev | |
| parent | a578776c23b289d7cc24b8cdb8eee64dc311ab2f (diff) | |
Use vga_raw_read/vga_raw_write instead of spelling bus space ops explicitly.
Same object code is produced.
Diffstat (limited to 'sys/dev')
| -rw-r--r-- | sys/dev/ic/vga_subr.c | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/sys/dev/ic/vga_subr.c b/sys/dev/ic/vga_subr.c index 940dc02b752..4a10b8a330a 100644 --- a/sys/dev/ic/vga_subr.c +++ b/sys/dev/ic/vga_subr.c @@ -1,4 +1,4 @@ -/* $NetBSD: vga_subr.c,v 1.24 2009/02/02 15:59:20 tsutsui Exp $ */ +/* $NetBSD: vga_subr.c,v 1.25 2012/08/09 20:25:05 uwe Exp $ */ /* * Copyright (c) 1998 @@ -27,7 +27,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: vga_subr.c,v 1.24 2009/02/02 15:59:20 tsutsui Exp $"); +__KERNEL_RCSID(0, "$NetBSD: vga_subr.c,v 1.25 2012/08/09 20:25:05 uwe Exp $"); /* for WSDISPLAY_BORDER_COLOR */ #include "opt_wsdisplay_border.h" @@ -225,7 +225,7 @@ vga_reset(struct vga_handle *vh, void (*md_initfunc)(struct vga_handle *)) if (bus_space_map(vh->vh_iot, 0x3c0, 0x10, 0, &vh->vh_ioh_vga)) return; - reg = bus_space_read_1(vh->vh_iot, vh->vh_ioh_vga, VGA_MISC_DATAR); + reg = vga_raw_read(vh, VGA_MISC_DATAR); vh->vh_mono = !(reg & 0x01); if (bus_space_map(vh->vh_iot, vh->vh_mono ? 0x3b0 : 0x3d0, 0x10, @@ -402,19 +402,19 @@ vga_initregs(struct vga_handle *vh) /* set DAC palette */ if (!vh->vh_mono) { for (i = 0; i < 16; i++) { - bus_space_write_1(vh->vh_iot, vh->vh_ioh_vga, + vga_raw_write(vh, VGA_DAC_ADDRW, vga_atc[i]); - bus_space_write_1(vh->vh_iot, vh->vh_ioh_vga, + vga_raw_write(vh, VGA_DAC_PALETTE, vga_dacpal[i * 3 + 0]); - bus_space_write_1(vh->vh_iot, vh->vh_ioh_vga, + vga_raw_write(vh, VGA_DAC_PALETTE, vga_dacpal[i * 3 + 1]); - bus_space_write_1(vh->vh_iot, vh->vh_ioh_vga, + vga_raw_write(vh, VGA_DAC_PALETTE, vga_dacpal[i * 3 + 2]); } } /* set misc output register */ - bus_space_write_1(vh->vh_iot, vh->vh_ioh_vga, + vga_raw_write(vh, VGA_MISC_DATAW, VGA_MISCOUT | (vh->vh_mono ? 0 : 0x01)); /* reenable video */ |
