Subject: Is sbdsp.c misusing bus_space_write_1?
To: None <current-users@NetBSD.ORG>
From: John F. Woods <jfw@funhouse.com>
List: current-users
Date: 07/03/1998 08:05:51
In studying the soundblaster driver (to figure out how to write a proper
ProAudio Spectrum driver), I noticed that sbdsp.c has the following
code:

	if (bus_space_map(iot, JAZZ16_CONFIG_PORT, 1, 0, &ioh)) {
           ...
	}
	bus_space_write_1(iot, ioh, 0, JAZZ16_WAKEUP);
	delay(10000);			/* delay 10 ms */
	bus_space_write_1(iot, ioh, 0, JAZZ16_SETBASE);
	bus_space_write_1(iot, ioh, 0, sc->sc_iobase & 0x70);

Now, does bus_space_map create a mapping which you apply local offsets
to, or does it simply validate certain regions of the given mapped
space which you still must supply correct offsets to?  (In other
words, should those 0s be JAZZ16_CONFIG_PORT?)