From owner-p4-projects@FreeBSD.ORG Sun Aug 12 01:26:42 2007 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id DD65E16A41A; Sun, 12 Aug 2007 01:26:41 +0000 (UTC) Delivered-To: perforce@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 8BFCD16A418 for ; Sun, 12 Aug 2007 01:26:41 +0000 (UTC) (envelope-from loafier@FreeBSD.org) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id 7C7FD13C467 for ; Sun, 12 Aug 2007 01:26:41 +0000 (UTC) (envelope-from loafier@FreeBSD.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.14.1/8.14.1) with ESMTP id l7C1QeE9083416 for ; Sun, 12 Aug 2007 01:26:40 GMT (envelope-from loafier@FreeBSD.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.14.1/8.14.1/Submit) id l7C1QdMv083413 for perforce@freebsd.org; Sun, 12 Aug 2007 01:26:39 GMT (envelope-from loafier@FreeBSD.org) Date: Sun, 12 Aug 2007 01:26:39 GMT Message-Id: <200708120126.l7C1QdMv083413@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to loafier@FreeBSD.org using -f From: Christopher Davis To: Perforce Change Reviews Cc: Subject: PERFORCE change 125073 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 12 Aug 2007 01:26:42 -0000 http://perforce.freebsd.org/chv.cgi?CH=125073 Change 125073 by loafier@chrisdsoc on 2007/08/12 01:26:37 Remove bus_space_tags and handles. Affected files ... .. //depot/projects/soc2007/loafier_busalloc/src/sys/dev/sr/if_sr.c#2 edit .. //depot/projects/soc2007/loafier_busalloc/src/sys/dev/sr/if_sr_isa.c#2 edit .. //depot/projects/soc2007/loafier_busalloc/src/sys/dev/sr/if_sr_pci.c#2 edit .. //depot/projects/soc2007/loafier_busalloc/src/sys/dev/sr/if_srregs.h#2 edit Differences ... ==== //depot/projects/soc2007/loafier_busalloc/src/sys/dev/sr/if_sr.c#2 (text+ko) ==== @@ -495,8 +495,6 @@ if (hc->res_ioport == NULL) { goto errexit; } - hc->bt_ioport = rman_get_bustag(hc->res_ioport); - hc->bh_ioport = rman_get_bushandle(hc->res_ioport); return (0); @@ -534,8 +532,6 @@ if (hc->res_memory == NULL) { goto errexit; } - hc->bt_memory = rman_get_bustag(hc->res_memory); - hc->bh_memory = rman_get_bushandle(hc->res_memory); return (0); ==== //depot/projects/soc2007/loafier_busalloc/src/sys/dev/sr/if_sr_isa.c#2 (text+ko) ==== @@ -323,25 +323,25 @@ static u_int src_get8_io(struct sr_hardc *hc, u_int off) { - return bus_space_read_1(hc->bt_ioport, hc->bh_ioport, SRC_REG(off)); + return bus_read_1(hc->res_ioport, SRC_REG(off)); } static u_int src_get16_io(struct sr_hardc *hc, u_int off) { - return bus_space_read_2(hc->bt_ioport, hc->bh_ioport, SRC_REG(off)); + return bus_read_2(hc->res_ioport, SRC_REG(off)); } static void src_put8_io(struct sr_hardc *hc, u_int off, u_int val) { - bus_space_write_1(hc->bt_ioport, hc->bh_ioport, SRC_REG(off), val); + bus_write_1(hc->res_ioport, SRC_REG(off), val); } static void src_put16_io(struct sr_hardc *hc, u_int off, u_int val) { - bus_space_write_2(hc->bt_ioport, hc->bh_ioport, SRC_REG(off), val); + bus_write_2(hc->res_ioport, SRC_REG(off), val); } static u_int ==== //depot/projects/soc2007/loafier_busalloc/src/sys/dev/sr/if_sr_pci.c#2 (text+ko) ==== @@ -106,16 +106,12 @@ int numports; u_int fecr; struct sr_hardc *hc; - bus_space_tag_t bt_plx; - bus_space_handle_t bh_plx; hc = (struct sr_hardc *)device_get_softc(device); bzero(hc, sizeof(struct sr_hardc)); if (sr_allocate_plx_memory(device, 0x10, 1)) goto errexit; - bt_plx = rman_get_bustag(hc->res_plx_memory); - bh_plx = rman_get_bushandle(hc->res_plx_memory); if (sr_allocate_memory(device, 0x18, 1)) goto errexit; @@ -140,13 +136,13 @@ * * Note: This is "cargo cult" stuff. - jrc */ - bus_space_write_4(bt_plx, bh_plx, 0x00, 0xfffff000); - bus_space_write_4(bt_plx, bh_plx, 0x04, 0x00000001); - bus_space_write_4(bt_plx, bh_plx, 0x18, 0x40030043); - bus_space_write_4(bt_plx, bh_plx, 0x1c, 0xff000000); - bus_space_write_4(bt_plx, bh_plx, 0x20, 0x00000000); - bus_space_write_4(bt_plx, bh_plx, 0x28, 0x000000e9); - bus_space_write_4(bt_plx, bh_plx, 0x68, 0x00010900); + bus_write_4(hc->res_plx_memory, 0x00, 0xfffff000); + bus_write_4(hc->res_plx_memory, 0x04, 0x00000001); + bus_write_4(hc->res_plx_memory, 0x18, 0x40030043); + bus_write_4(hc->res_plx_memory, 0x1c, 0xff000000); + bus_write_4(hc->res_plx_memory, 0x20, 0x00000000); + bus_write_4(hc->res_plx_memory, 0x28, 0x000000e9); + bus_write_4(hc->res_plx_memory, 0x68, 0x00010900); /* * Get info from card. @@ -223,27 +219,23 @@ static u_int src_get8_mem(struct sr_hardc *hc, u_int off) { - return bus_space_read_1(hc->bt_memory, hc->bh_memory, - SRC_PCI_SCA_REG(off)); + return bus_read_1(hc->res_memory, SRC_PCI_SCA_REG(off)); } static u_int src_get16_mem(struct sr_hardc *hc, u_int off) { - return bus_space_read_2(hc->bt_memory, hc->bh_memory, - SRC_PCI_SCA_REG(off)); + return bus_read_2(hc->res_memory, SRC_PCI_SCA_REG(off)); } static void src_put8_mem(struct sr_hardc *hc, u_int off, u_int val) { - bus_space_write_1(hc->bt_memory, hc->bh_memory, - SRC_PCI_SCA_REG(off), val); + bus_write_1(hc->res_memory, SRC_PCI_SCA_REG(off), val); } static void src_put16_mem(struct sr_hardc *hc, u_int off, u_int val) { - bus_space_write_2(hc->bt_memory, hc->bh_memory, - SRC_PCI_SCA_REG(off), val); + bus_write_2(hc->res_memory, SRC_PCI_SCA_REG(off), val); } ==== //depot/projects/soc2007/loafier_busalloc/src/sys/dev/sr/if_srregs.h#2 (text+ko) ==== @@ -162,10 +162,6 @@ sca_regs *sca; /* register array */ - bus_space_tag_t bt_ioport; - bus_space_tag_t bt_memory; - bus_space_handle_t bh_ioport; - bus_space_handle_t bh_memory; int rid_ioport; int rid_memory; int rid_plx_memory; @@ -197,15 +193,15 @@ int sr_detach(device_t device); #define sr_inb(hc, port) \ - bus_space_read_1((hc)->bt_ioport, (hc)->bh_ioport, (port)) + bus_read_1((hc)->res_ioport, (port)) #define sr_outb(hc, port, value) \ - bus_space_write_1((hc)->bt_ioport, (hc)->bh_ioport, (port), (value)) + bus_write_1((hc)->res_ioport, (port), (value)) #define sr_read_fecr(hc) \ - bus_space_read_4((hc)->bt_memory, (hc)->bh_memory, SR_FECR) + bus_read_4((hc)->res_memory, SR_FECR) #define sr_write_fecr(hc, value) \ - bus_space_write_4((hc)->bt_memory, (hc)->bh_memory, SR_FECR, (value)) + bus_write_4((hc)->res_memory, SR_FECR, (value)) #endif /* _IF_SRREGS_H_ */