From 172658cb96949e48c4e678c96c5767fb973f3a17 Mon Sep 17 00:00:00 2001 From: chuck Date: Fri, 12 Jan 1996 23:09:08 +0000 Subject: [PATCH] we no longer need to add in the offset to the mapped VA to get the correct device address (bus_tmp, bus_map, and mapiodev now do this for us). also, we handle all our mappings, so don't have obio.c do any for us (i.e. don't set ra->ra_len in xycmatch). nuke uneeded variable in match function. --- sys/arch/sparc/dev/xd.c | 12 ++---------- sys/arch/sparc/dev/xy.c | 12 ++---------- 2 files changed, 4 insertions(+), 20 deletions(-) diff --git a/sys/arch/sparc/dev/xd.c b/sys/arch/sparc/dev/xd.c index 2cf9bcef713..680c61cbe97 100644 --- a/sys/arch/sparc/dev/xd.c +++ b/sys/arch/sparc/dev/xd.c @@ -36,7 +36,7 @@ * x d . c x y l o g i c s 7 5 3 / 7 0 5 3 v m e / s m d d r i v e r * * author: Chuck Cranor - * id: $Id: xd.c,v 1.3 1996/01/12 20:20:51 deraadt Exp $ + * id: $Id: xd.c,v 1.4 1996/01/12 23:09:08 chuck Exp $ * started: 27-Feb-95 * references: [1] Xylogics Model 753 User's Manual * part number: 166-753-001, Revision B, May 21, 1988. @@ -353,23 +353,18 @@ int xdcmatch(parent, match, aux) struct romaux *ra = &ca->ca_ra; struct xdc *xdc; int del = 0; - void *vaddr; if (strcmp(cf->cf_driver->cd_name, ra->ra_name)) return (0); if (cputyp == CPU_SUN4) { - vaddr = ra->ra_vaddr; - if ((u_long) ra->ra_paddr & PGOFSET) - (u_long) vaddr |= ((u_long) ra->ra_paddr & PGOFSET); - xdc = (struct xdc *) vaddr; + xdc = (struct xdc *) ra->ra_vaddr; if (probeget(&xdc->xdc_csr, 1) == -1) return (0); xdc->xdc_csr = XDC_RESET; XDC_WAIT(xdc, del, XDC_RESETUSEC, XDC_RESET); if (del <= 0) return (0); - ra->ra_len = NBPG; } return (1); } @@ -394,9 +389,6 @@ xdcattach(parent, self, aux) ca->ca_ra.ra_vaddr = mapiodev(ca->ca_ra.ra_reg, 0, ca->ca_ra.ra_len, ca->ca_bustype); - if ((u_long) ca->ca_ra.ra_paddr & PGOFSET) - (u_long) ca->ca_ra.ra_vaddr |= - ((u_long) ca->ca_ra.ra_paddr & PGOFSET); xdc->xdc = (struct xdc *) ca->ca_ra.ra_vaddr; pri = ca->ca_ra.ra_intr[0].int_pri; diff --git a/sys/arch/sparc/dev/xy.c b/sys/arch/sparc/dev/xy.c index eeda0e56703..2b19a664b31 100644 --- a/sys/arch/sparc/dev/xy.c +++ b/sys/arch/sparc/dev/xy.c @@ -36,7 +36,7 @@ * x y . c x y l o g i c s 4 5 0 / 4 5 1 s m d d r i v e r * * author: Chuck Cranor - * id: $Id: xy.c,v 1.3 1996/01/12 20:20:53 deraadt Exp $ + * id: $Id: xy.c,v 1.4 1996/01/12 23:09:10 chuck Exp $ * started: 14-Sep-95 * references: [1] Xylogics Model 753 User's Manual * part number: 166-753-001, Revision B, May 21, 1988. @@ -296,21 +296,16 @@ int xycmatch(parent, match, aux) struct romaux *ra = &ca->ca_ra; struct xyc *xyc; int del = 0; - void *vaddr; if (strcmp(cf->cf_driver->cd_name, ra->ra_name)) return (0); if (cputyp == CPU_SUN4) { - vaddr = ra->ra_vaddr; - if ((u_long) ra->ra_paddr & PGOFSET) - (u_long) vaddr |= ((u_long) ra->ra_paddr & PGOFSET); - xyc = (struct xyc *) vaddr; + xyc = (struct xyc *) ra->ra_vaddr; if (probeget(&xyc->xyc_rsetup, 1) == -1) return (0); if (xyc_unbusy(xyc, XYC_RESETUSEC) == XY_ERR_FAIL) return(0); - ra->ra_len = NBPG; } return (1); } @@ -337,9 +332,6 @@ xycattach(parent, self, aux) ca->ca_ra.ra_vaddr = mapiodev(ca->ca_ra.ra_reg, 0, ca->ca_ra.ra_len, ca->ca_bustype); - if ((u_long) ca->ca_ra.ra_paddr & PGOFSET) - (u_long) ca->ca_ra.ra_vaddr |= - ((u_long) ca->ca_ra.ra_paddr & PGOFSET); xyc->xyc = (struct xyc *) ca->ca_ra.ra_vaddr; pri = ca->ca_ra.ra_intr[0].int_pri; -- 2.20.1