diff options
| author | John Baldwin <jhb@FreeBSD.org> | 2009-11-17 18:22:14 +0000 |
|---|---|---|
| committer | John Baldwin <jhb@FreeBSD.org> | 2009-11-17 18:22:14 +0000 |
| commit | dc8ecaacd4443e166c36ce7bf286e2cf1fc79d13 (patch) | |
| tree | c5680c0a28eb661bd755e21353bebdafdfddc6c2 /sys/dev/sn | |
| parent | 77e6010f2469639eb0b0dbe7f5d36446b24cc45f (diff) | |
Notes
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 923c0285784e..751071a77ec2 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 034f51a70456..5c0d4eeeac3e 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 048f23a41fc0..79fc6e81b9c3 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) |
