Date: Tue, 31 Jul 2007 15:15:42 GMT From: Christopher Davis <loafier@FreeBSD.org> To: Perforce Change Reviews <perforce@FreeBSD.org> Subject: PERFORCE change 124427 for review Message-ID: <200707311515.l6VFFg9I052163@repoman.freebsd.org>
next in thread | raw e-mail | index | archive | help
http://perforce.freebsd.org/chv.cgi?CH=124427 Change 124427 by loafier@chrisdsoc on 2007/07/31 15:15:11 Edit tags, handles, read, write. Affected files ... .. //depot/projects/soc2007/loafier_busalloc/src/sys/dev/sound/sbus/cs4231.c#2 edit Differences ... ==== //depot/projects/soc2007/loafier_busalloc/src/sys/dev/sound/sbus/cs4231.c#2 (text+ko) ==== @@ -112,8 +112,6 @@ struct device *sc_dev; int sc_rid[CS4231_RES_MEM_MAX]; struct resource *sc_res[CS4231_RES_MEM_MAX]; - bus_space_handle_t sc_regh[CS4231_RES_MEM_MAX]; - bus_space_tag_t sc_regt[CS4231_RES_MEM_MAX]; int sc_irqrid[CS4231_RES_IRQ_MAX]; struct resource *sc_irqres[CS4231_RES_IRQ_MAX]; @@ -192,30 +190,30 @@ #define CS4231_LOCK_ASSERT(sc) snd_mtxassert(sc->sc_lock) #define CS_WRITE(sc,r,v) \ - bus_space_write_1((sc)->sc_regt[0], (sc)->sc_regh[0], (r) << 2, (v)) + bus_write_1((sc)->sc_res[0], (r) << 2, (v)) #define CS_READ(sc,r) \ - bus_space_read_1((sc)->sc_regt[0], (sc)->sc_regh[0], (r) << 2) + bus_read_1((sc)->sc_res[0], (r) << 2) #define APC_WRITE(sc,r,v) \ - bus_space_write_4(sc->sc_regt[0], sc->sc_regh[0], r, v) + bus_write_4(sc->sc_res[0], r, v) #define APC_READ(sc,r) \ - bus_space_read_4(sc->sc_regt[0], sc->sc_regh[0], r) + bus_read_4(sc->sc_res[0], r) #define EBDMA_P_WRITE(sc,r,v) \ - bus_space_write_4((sc)->sc_regt[1], (sc)->sc_regh[1], (r), (v)) + bus_write_4((sc)->sc_res[1], (r), (v)) #define EBDMA_P_READ(sc,r) \ - bus_space_read_4((sc)->sc_regt[1], (sc)->sc_regh[1], (r)) + bus_read_4((sc)->sc_res[1], (r)) #define EBDMA_C_WRITE(sc,r,v) \ - bus_space_write_4((sc)->sc_regt[2], (sc)->sc_regh[2], (r), (v)) + bus_write_4((sc)->sc_res[2], (r), (v)) #define EBDMA_C_READ(sc,r) \ - bus_space_read_4((sc)->sc_regt[2], (sc)->sc_regh[2], (r)) + bus_read_4((sc)->sc_res[2], (r)) #define AUXIO_CODEC 0x00 #define AUXIO_WRITE(sc,r,v) \ - bus_space_write_4((sc)->sc_regt[3], (sc)->sc_regh[3], (r), (v)) + bus_write_4((sc)->sc_res[3], (r), (v)) #define AUXIO_READ(sc,r) \ - bus_space_read_4((sc)->sc_regt[3], (sc)->sc_regh[3], (r)) + bus_read_4((sc)->sc_res[3], (r)) #define CODEC_WARM_RESET 0 #define CODEC_COLD_RESET 1 @@ -381,8 +379,6 @@ "cannot map register %d\n", i); goto fail; } - sc->sc_regt[i] = rman_get_bustag(sc->sc_res[i]); - sc->sc_regh[i] = rman_get_bushandle(sc->sc_res[i]); } for (i = 0; i < sc->sc_nires; i++) { sc->sc_irqrid[i] = i;
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200707311515.l6VFFg9I052163>