diff options
author | jhb <jhb@FreeBSD.org> | 2009-11-17 18:22:14 +0000 |
---|---|---|
committer | jhb <jhb@FreeBSD.org> | 2009-11-17 18:22:14 +0000 |
commit | c8decde1ac9b2805d8b80fbc6a2a9c08bee4d13e (patch) | |
tree | c5680c0a28eb661bd755e21353bebdafdfddc6c2 /sys/dev/sn | |
parent | 9fd2522ee91ee46f6e32e5ded433e64953b900e9 (diff) | |
download | FreeBSD-src-c8decde1ac9b2805d8b80fbc6a2a9c08bee4d13e.zip FreeBSD-src-c8decde1ac9b2805d8b80fbc6a2a9c08bee4d13e.tar.gz |
Use the bus_*() routines rather than bus_space_*() for register operations.
Diffstat (limited to 'sys/dev/sn')
-rw-r--r-- | sys/dev/sn/if_sn.c | 2 | ||||
-rw-r--r-- | sys/dev/sn/if_sn_pccard.c | 2 | ||||
-rw-r--r-- | sys/dev/sn/if_snvar.h | 18 |
3 files changed, 8 insertions, 14 deletions
diff --git a/sys/dev/sn/if_sn.c b/sys/dev/sn/if_sn.c index 923c028..751071a 100644 --- a/sys/dev/sn/if_sn.c +++ b/sys/dev/sn/if_sn.c @@ -1220,8 +1220,6 @@ sn_activate(device_t dev) sn_deactivate(dev); return ENOMEM; } - sc->bst = rman_get_bustag(sc->port_res); - sc->bsh = rman_get_bushandle(sc->port_res); return (0); } diff --git a/sys/dev/sn/if_sn_pccard.c b/sys/dev/sn/if_sn_pccard.c index 034f51a..5c0d4ee 100644 --- a/sys/dev/sn/if_sn_pccard.c +++ b/sys/dev/sn/if_sn_pccard.c @@ -271,8 +271,6 @@ sn_pccard_megahertz_activate(device_t dev) sn_deactivate(dev); return ENOMEM; } - sc->bst = rman_get_bustag(sc->port_res); - sc->bsh = rman_get_bushandle(sc->port_res); return 0; } diff --git a/sys/dev/sn/if_snvar.h b/sys/dev/sn/if_snvar.h index 048f23a..79fc6e8 100644 --- a/sys/dev/sn/if_snvar.h +++ b/sys/dev/sn/if_snvar.h @@ -32,8 +32,6 @@ struct sn_softc { struct ifnet *ifp; - bus_space_tag_t bst; - bus_space_handle_t bsh; struct mtx sc_mtx; int pages_wanted; /* Size of outstanding MMU ALLOC */ int intr_mask; /* Most recently set interrupt mask */ @@ -55,20 +53,20 @@ void sn_intr(void *); int sn_activate(device_t); void sn_deactivate(device_t); -#define CSR_READ_1(sc, off) (bus_space_read_1((sc)->bst, (sc)->bsh, off)) -#define CSR_READ_2(sc, off) (bus_space_read_2((sc)->bst, (sc)->bsh, off)) +#define CSR_READ_1(sc, off) (bus_read_1((sc)->port_res, off)) +#define CSR_READ_2(sc, off) (bus_read_2((sc)->port_res, off)) #define CSR_WRITE_1(sc, off, val) \ - bus_space_write_1(sc->bst, sc->bsh, off, val) + bus_write_1((sc)->port_res, off, val) #define CSR_WRITE_2(sc, off, val) \ - bus_space_write_2(sc->bst, sc->bsh, off, val) + bus_write_2((sc)->port_res, off, val) #define CSR_WRITE_MULTI_1(sc, off, addr, count) \ - bus_space_write_multi_1(sc->bst, sc->bsh, off, addr, count) + bus_write_multi_1((sc)->port_res, off, addr, count) #define CSR_WRITE_MULTI_2(sc, off, addr, count) \ - bus_space_write_multi_2(sc->bst, sc->bsh, off, addr, count) + bus_write_multi_2((sc)->port_res, off, addr, count) #define CSR_READ_MULTI_1(sc, off, addr, count) \ - bus_space_read_multi_1(sc->bst, sc->bsh, off, addr, count) + bus_read_multi_1((sc)->port_res, off, addr, count) #define CSR_READ_MULTI_2(sc, off, addr, count) \ - bus_space_read_multi_2(sc->bst, sc->bsh, off, addr, count) + bus_read_multi_2((sc)->port_res, off, addr, count) #define SN_LOCK(_sc) mtx_lock(&(_sc)->sc_mtx) #define SN_UNLOCK(_sc) mtx_unlock(&(_sc)->sc_mtx) |