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/tl | |
| parent | 77e6010f2469639eb0b0dbe7f5d36446b24cc45f (diff) | |
Notes
Diffstat (limited to 'sys/dev/tl')
| -rw-r--r-- | sys/dev/tl/if_tl.c | 3 | ||||
| -rw-r--r-- | sys/dev/tl/if_tlreg.h | 20 |
2 files changed, 6 insertions, 17 deletions
diff --git a/sys/dev/tl/if_tl.c b/sys/dev/tl/if_tl.c index f1a3db8b59c6..2d23b5ee2705 100644 --- a/sys/dev/tl/if_tl.c +++ b/sys/dev/tl/if_tl.c @@ -1170,9 +1170,6 @@ tl_attach(dev) goto fail; } - sc->tl_btag = rman_get_bustag(sc->tl_res); - sc->tl_bhandle = rman_get_bushandle(sc->tl_res); - #ifdef notdef /* * The ThunderLAN manual suggests jacking the PCI latency diff --git a/sys/dev/tl/if_tlreg.h b/sys/dev/tl/if_tlreg.h index f04b52bda59c..46a79865b5b6 100644 --- a/sys/dev/tl/if_tlreg.h +++ b/sys/dev/tl/if_tlreg.h @@ -112,8 +112,6 @@ struct tl_softc { struct ifnet *tl_ifp; device_t tl_dev; struct ifmedia ifmedia; /* media info */ - bus_space_handle_t tl_bhandle; - bus_space_tag_t tl_btag; void *tl_intrhand; struct resource *tl_irq; struct resource *tl_res; @@ -493,19 +491,13 @@ struct tl_stats { /* * register space access macros */ -#define CSR_WRITE_4(sc, reg, val) \ - bus_space_write_4(sc->tl_btag, sc->tl_bhandle, reg, val) -#define CSR_WRITE_2(sc, reg, val) \ - bus_space_write_2(sc->tl_btag, sc->tl_bhandle, reg, val) -#define CSR_WRITE_1(sc, reg, val) \ - bus_space_write_1(sc->tl_btag, sc->tl_bhandle, reg, val) +#define CSR_WRITE_4(sc, reg, val) bus_write_4(sc->tl_res, reg, val) +#define CSR_WRITE_2(sc, reg, val) bus_write_2(sc->tl_res, reg, val) +#define CSR_WRITE_1(sc, reg, val) bus_write_1(sc->tl_res, reg, val) -#define CSR_READ_4(sc, reg) \ - bus_space_read_4(sc->tl_btag, sc->tl_bhandle, reg) -#define CSR_READ_2(sc, reg) \ - bus_space_read_2(sc->tl_btag, sc->tl_bhandle, reg) -#define CSR_READ_1(sc, reg) \ - bus_space_read_1(sc->tl_btag, sc->tl_bhandle, reg) +#define CSR_READ_4(sc, reg) bus_read_4(sc->tl_res, reg) +#define CSR_READ_2(sc, reg) bus_read_2(sc->tl_res, reg) +#define CSR_READ_1(sc, reg) bus_read_1(sc->tl_res, reg) #define CMD_PUT(sc, x) CSR_WRITE_4(sc, TL_HOSTCMD, x) #define CMD_SET(sc, x) \ |
