summaryrefslogtreecommitdiff
path: root/sys/dev
diff options
context:
space:
mode:
authormatt <matt@NetBSD.org>2000-11-29 02:00:38 +0000
committermatt <matt@NetBSD.org>2000-11-29 02:00:38 +0000
commit435b4c7b35066d561efbbb242e0599fd253bc638 (patch)
treece8c3f900579efe0ecae89eb747dea0fbbf908fa /sys/dev
parentb0623ac1a48ca083415945193f4320e0b4d178ec (diff)
Fix c896 support. If the first mem bar is 64bit, then the second one will
be too. And offset for the 2nd being after the 1st by a 64-bit bar, not 32-bit.
Diffstat (limited to 'sys/dev')
-rw-r--r--sys/dev/pci/siop_pci_common.c14
1 files changed, 11 insertions, 3 deletions
diff --git a/sys/dev/pci/siop_pci_common.c b/sys/dev/pci/siop_pci_common.c
index e3581daa693..99c02c79801 100644
--- a/sys/dev/pci/siop_pci_common.c
+++ b/sys/dev/pci/siop_pci_common.c
@@ -1,4 +1,4 @@
-/* $NetBSD: siop_pci_common.c,v 1.3 2000/10/23 14:57:23 bouyer Exp $ */
+/* $NetBSD: siop_pci_common.c,v 1.4 2000/11/29 02:00:38 matt Exp $ */
/*
* Copyright (c) 2000 Manuel Bouyer.
@@ -242,8 +242,16 @@ siop_pci_attach_common(sc, pa)
}
if (sc->siop.features & SF_CHIP_RAM) {
- if (pci_mapreg_map(pa, 0x18,
- PCI_MAPREG_TYPE_MEM | PCI_MAPREG_MEM_TYPE_32BIT, 0,
+ int bar;
+ switch (memtype) {
+ case PCI_MAPREG_TYPE_MEM | PCI_MAPREG_MEM_TYPE_32BIT:
+ bar = 0x18;
+ break;
+ case PCI_MAPREG_TYPE_MEM | PCI_MAPREG_MEM_TYPE_64BIT:
+ bar = 0x1c;
+ break;
+ }
+ if (pci_mapreg_map(pa, bar, memtype, 0,
&sc->siop.sc_ramt, &sc->siop.sc_ramh,
&sc->siop.sc_scriptaddr, NULL) == 0) {
printf("%s: using on-board RAM\n",