summaryrefslogtreecommitdiffstats
path: root/sys/pci
diff options
context:
space:
mode:
authorgibbs <gibbs@FreeBSD.org>2000-01-08 00:32:08 +0000
committergibbs <gibbs@FreeBSD.org>2000-01-08 00:32:08 +0000
commita5d1c762146eab389d6175cbfb0f638afdcae470 (patch)
tree504557c7234b91dc2c7b547e3b09e1a0c7909677 /sys/pci
parentee075553541608b623df4734878053946e7c7188 (diff)
downloadFreeBSD-src-a5d1c762146eab389d6175cbfb0f638afdcae470.zip
FreeBSD-src-a5d1c762146eab389d6175cbfb0f638afdcae470.tar.gz
Really enable external SCB ram on Ultra2 capable controllers.
Don't even bother to look for SCB ram on controllers < aic7870. Clear any parity errors generated by looking at external SCB ram.
Diffstat (limited to 'sys/pci')
-rw-r--r--sys/pci/ahc_pci.c12
1 files changed, 9 insertions, 3 deletions
diff --git a/sys/pci/ahc_pci.c b/sys/pci/ahc_pci.c
index 8ab1652..f803bb5 100644
--- a/sys/pci/ahc_pci.c
+++ b/sys/pci/ahc_pci.c
@@ -868,8 +868,10 @@ ahc_ext_scbram_present(struct ahc_softc *ahc)
if ((ahc->features & AHC_ULTRA2) != 0)
ramps = (ahc_inb(ahc, DSCOMMAND0) & RAMPS) != 0;
- else
+ else if ((ahc->chip & AHC_CHIPID_MASK) >= AHC_AIC7870)
ramps = (devconfig & RAMPSM) != 0;
+ else
+ ramps = 0;
if (ramps && single_user)
return (1);
@@ -898,9 +900,9 @@ ahc_ext_scbram_config(struct ahc_softc *ahc, int enable, int pcheck, int fast)
dscommand0 = ahc_inb(ahc, DSCOMMAND0);
if (enable)
- dscommand0 |= INTSCBRAMSEL;
- else
dscommand0 &= ~INTSCBRAMSEL;
+ else
+ dscommand0 |= INTSCBRAMSEL;
ahc_outb(ahc, DSCOMMAND0, dscommand0);
} else {
if (fast)
@@ -958,6 +960,8 @@ ahc_probe_ext_scbram(struct ahc_softc *ahc)
|| (ahc_inb(ahc, ERROR) & MPARERR) == 0)
pcheck = TRUE;
+ ahc_outb(ahc, CLRINT, CLRPARERR);
+
/* Now see if we can do fast timing */
ahc_ext_scbram_config(ahc, enable, pcheck, /*fast*/TRUE);
test_num_scbs = ahc_probe_scbs(ahc);
@@ -965,7 +969,9 @@ ahc_probe_ext_scbram(struct ahc_softc *ahc)
&& ((ahc_inb(ahc, INTSTAT) & BRKADRINT) == 0
|| (ahc_inb(ahc, ERROR) & MPARERR) == 0))
fast = TRUE;
+
done:
+ ahc_outb(ahc, CLRINT, CLRPARERR);
if (bootverbose && enable) {
printf("%s: External SRAM, %dns access%s\n",
ahc_name(ahc), fast ? 10 : 20,
OpenPOWER on IntegriCloud