Date: Tue, 22 Dec 2009 21:44:25 +0000 (UTC) From: Pyun YongHyeon <yongari@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r200877 - head/sys/dev/ste Message-ID: <200912222144.nBMLiP4n077545@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: yongari Date: Tue Dec 22 21:44:25 2009 New Revision: 200877 URL: http://svn.freebsd.org/changeset/base/200877 Log: Prefer bus_write_{1,2,4}/bus_read_{1,2,4} to bus_space_write_{1,2,4}/bus_space_read_{1,2,4}. Remove unused ste_bhandle and ste_btag in softc. Modified: head/sys/dev/ste/if_ste.c head/sys/dev/ste/if_stereg.h Modified: head/sys/dev/ste/if_ste.c ============================================================================== --- head/sys/dev/ste/if_ste.c Tue Dec 22 21:42:54 2009 (r200876) +++ head/sys/dev/ste/if_ste.c Tue Dec 22 21:44:25 2009 (r200877) @@ -972,9 +972,6 @@ ste_attach(device_t dev) goto fail; } - sc->ste_btag = rman_get_bustag(sc->ste_res); - sc->ste_bhandle = rman_get_bushandle(sc->ste_res); - /* Allocate interrupt */ rid = 0; sc->ste_irq = bus_alloc_resource_any(dev, SYS_RES_IRQ, &rid, Modified: head/sys/dev/ste/if_stereg.h ============================================================================== --- head/sys/dev/ste/if_stereg.h Tue Dec 22 21:42:54 2009 (r200876) +++ head/sys/dev/ste/if_stereg.h Tue Dec 22 21:44:25 2009 (r200877) @@ -465,18 +465,18 @@ struct ste_desc_onefrag { * register space access macros */ #define CSR_WRITE_4(sc, reg, val) \ - bus_space_write_4(sc->ste_btag, sc->ste_bhandle, reg, val) + bus_write_4((sc)->ste_res, reg, val) #define CSR_WRITE_2(sc, reg, val) \ - bus_space_write_2(sc->ste_btag, sc->ste_bhandle, reg, val) + bus_write_2((sc)->ste_res, reg, val) #define CSR_WRITE_1(sc, reg, val) \ - bus_space_write_1(sc->ste_btag, sc->ste_bhandle, reg, val) + bus_write_1((sc)->ste_res, reg, val) #define CSR_READ_4(sc, reg) \ - bus_space_read_4(sc->ste_btag, sc->ste_bhandle, reg) + bus_read_4((sc)->ste_res, reg) #define CSR_READ_2(sc, reg) \ - bus_space_read_2(sc->ste_btag, sc->ste_bhandle, reg) + bus_read_2((sc)->ste_res, reg) #define CSR_READ_1(sc, reg) \ - bus_space_read_1(sc->ste_btag, sc->ste_bhandle, reg) + bus_read_1((sc)->ste_res, reg) #define STE_DESC_ALIGN 8 #define STE_RX_LIST_CNT 128 @@ -544,8 +544,6 @@ struct ste_chain_data { struct ste_softc { struct ifnet *ste_ifp; - bus_space_tag_t ste_btag; - bus_space_handle_t ste_bhandle; struct resource *ste_res; int ste_res_id; int ste_res_type;
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200912222144.nBMLiP4n077545>