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.
This commit is contained in:
matt 2000-11-29 02:00:38 +00:00
parent b0623ac1a4
commit 435b4c7b35
1 changed files with 11 additions and 3 deletions

View File

@ -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",