From owner-svn-src-all@FreeBSD.ORG Tue Nov 24 16:54:55 2009 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 31D381065692; Tue, 24 Nov 2009 16:54:55 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 20A2B8FC1F; Tue, 24 Nov 2009 16:54:55 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id nAOGstja024262; Tue, 24 Nov 2009 16:54:55 GMT (envelope-from jhb@svn.freebsd.org) Received: (from jhb@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id nAOGssfT024256; Tue, 24 Nov 2009 16:54:54 GMT (envelope-from jhb@svn.freebsd.org) Message-Id: <200911241654.nAOGssfT024256@svn.freebsd.org> From: John Baldwin Date: Tue, 24 Nov 2009 16:54:54 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r199756 - head/sys/dev/an X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 24 Nov 2009 16:54:55 -0000 Author: jhb Date: Tue Nov 24 16:54:54 2009 New Revision: 199756 URL: http://svn.freebsd.org/changeset/base/199756 Log: Use bus_*() rather than bus_space_*(). Modified: head/sys/dev/an/if_an.c head/sys/dev/an/if_an_isa.c head/sys/dev/an/if_an_pccard.c head/sys/dev/an/if_an_pci.c head/sys/dev/an/if_anreg.h Modified: head/sys/dev/an/if_an.c ============================================================================== --- head/sys/dev/an/if_an.c Tue Nov 24 16:53:58 2009 (r199755) +++ head/sys/dev/an/if_an.c Tue Nov 24 16:54:54 2009 (r199756) @@ -349,9 +349,6 @@ an_probe(device_t dev) * to be able to issue commands and call some of the * other routines. */ - sc->an_bhandle = rman_get_bushandle(sc->port_res); - sc->an_btag = rman_get_bustag(sc->port_res); - ssid.an_len = sizeof(ssid); ssid.an_type = AN_RID_SSIDLIST; Modified: head/sys/dev/an/if_an_isa.c ============================================================================== --- head/sys/dev/an/if_an_isa.c Tue Nov 24 16:53:58 2009 (r199755) +++ head/sys/dev/an/if_an_isa.c Tue Nov 24 16:54:54 2009 (r199756) @@ -111,8 +111,6 @@ an_attach_isa(device_t dev) an_alloc_port(dev, sc->port_rid, 1); an_alloc_irq(dev, sc->irq_rid, 0); - sc->an_bhandle = rman_get_bushandle(sc->port_res); - sc->an_btag = rman_get_bustag(sc->port_res); sc->an_dev = dev; error = an_attach(sc, flags); Modified: head/sys/dev/an/if_an_pccard.c ============================================================================== --- head/sys/dev/an/if_an_pccard.c Tue Nov 24 16:53:58 2009 (r199755) +++ head/sys/dev/an/if_an_pccard.c Tue Nov 24 16:54:54 2009 (r199756) @@ -141,8 +141,6 @@ an_pccard_attach(device_t dev) an_alloc_irq(dev, sc->irq_rid, 0); - sc->an_bhandle = rman_get_bushandle(sc->port_res); - sc->an_btag = rman_get_bustag(sc->port_res); sc->an_dev = dev; error = an_attach(sc, flags); Modified: head/sys/dev/an/if_an_pci.c ============================================================================== --- head/sys/dev/an/if_an_pci.c Tue Nov 24 16:53:58 2009 (r199755) +++ head/sys/dev/an/if_an_pci.c Tue Nov 24 16:54:54 2009 (r199756) @@ -175,9 +175,6 @@ an_attach_pci(dev) goto fail; } - sc->an_btag = rman_get_bustag(sc->port_res); - sc->an_bhandle = rman_get_bushandle(sc->port_res); - /* Allocate memory for MPI350 */ if (sc->mpi350) { /* Allocate memory */ @@ -187,8 +184,6 @@ an_attach_pci(dev) device_printf(dev, "couldn't map memory\n"); goto fail; } - sc->an_mem_btag = rman_get_bustag(sc->mem_res); - sc->an_mem_bhandle = rman_get_bushandle(sc->mem_res); /* Allocate aux. memory */ sc->mem_aux_rid = PCIR_BAR(2); @@ -198,8 +193,6 @@ an_attach_pci(dev) device_printf(dev, "couldn't map aux memory\n"); goto fail; } - sc->an_mem_aux_btag = rman_get_bustag(sc->mem_aux_res); - sc->an_mem_aux_bhandle = rman_get_bushandle(sc->mem_aux_res); /* Allocate DMA region */ error = bus_dma_tag_create(NULL, /* parent */ Modified: head/sys/dev/an/if_anreg.h ============================================================================== --- head/sys/dev/an/if_anreg.h Tue Nov 24 16:53:58 2009 (r199755) +++ head/sys/dev/an/if_anreg.h Tue Nov 24 16:54:54 2009 (r199756) @@ -45,47 +45,39 @@ /* * register space access macros */ -#define CSR_WRITE_2(sc, reg, val) \ - bus_space_write_2(sc->an_btag, sc->an_bhandle, reg, val) +#define CSR_WRITE_2(sc, reg, val) bus_write_2(sc->port_res, reg, val) -#define CSR_READ_2(sc, reg) \ - bus_space_read_2(sc->an_btag, sc->an_bhandle, reg) +#define CSR_READ_2(sc, reg) bus_read_2(sc->port_res, reg) -#define CSR_WRITE_1(sc, reg, val) \ - bus_space_write_1(sc->an_btag, sc->an_bhandle, reg, val) +#define CSR_WRITE_1(sc, reg, val) bus_write_1(sc->port_res, reg, val) -#define CSR_READ_1(sc, reg) \ - bus_space_read_1(sc->an_btag, sc->an_bhandle, reg) +#define CSR_READ_1(sc, reg) bus_read_1(sc->port_res, reg) /* * memory space access macros */ -#define CSR_MEM_WRITE_2(sc, reg, val) \ - bus_space_write_2(sc->an_mem_btag, sc->an_mem_bhandle, reg, val) +#define CSR_MEM_WRITE_2(sc, reg, val) bus_write_2(sc->mem_res, reg, val) -#define CSR_MEM_READ_2(sc, reg) \ - bus_space_read_2(sc->an_mem_btag, sc->an_mem_bhandle, reg) +#define CSR_MEM_READ_2(sc, reg) bus_read_2(sc->mem_res, reg) -#define CSR_MEM_WRITE_1(sc, reg, val) \ - bus_space_write_1(sc->an_mem_btag, sc->an_mem_bhandle, reg, val) +#define CSR_MEM_WRITE_1(sc, reg, val) bus_write_1(sc->mem_res, reg, val) -#define CSR_MEM_READ_1(sc, reg) \ - bus_space_read_1(sc->an_mem_btag, sc->an_mem_bhandle, reg) +#define CSR_MEM_READ_1(sc, reg) bus_read_1(sc->mem_res, reg) /* * aux. memory space access macros */ #define CSR_MEM_AUX_WRITE_4(sc, reg, val) \ - bus_space_write_4(sc->an_mem_aux_btag, sc->an_mem_aux_bhandle, reg, val) + bus_write_4(sc->mem_aux_res, reg, val) #define CSR_MEM_AUX_READ_4(sc, reg) \ - bus_space_read_4(sc->an_mem_aux_btag, sc->an_mem_aux_bhandle, reg) + bus_read_4(sc->mem_aux_res, reg) #define CSR_MEM_AUX_WRITE_1(sc, reg, val) \ - bus_space_write_1(sc->an_mem_aux_btag, sc->an_mem_aux_bhandle, reg, val) + bus_write_1(sc->mem_aux_res, reg, val) #define CSR_MEM_AUX_READ_1(sc, reg) \ - bus_space_read_1(sc->an_mem_aux_btag, sc->an_mem_aux_bhandle, reg) + bus_read_1(sc->mem_aux_res, reg) /* * Size of Aironet I/O space. @@ -454,11 +446,6 @@ struct an_softc { void* irq_handle; /* handle for irq handler */ struct resource* irq_res; /* resource for irq */ - bus_space_handle_t an_bhandle_p; - bus_space_handle_t an_bhandle; - bus_space_tag_t an_btag; - bus_space_handle_t an_mem_bhandle; - bus_space_tag_t an_mem_btag; bus_space_handle_t an_mem_aux_bhandle; bus_space_tag_t an_mem_aux_btag; bus_dma_tag_t an_dtag;