Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/netbsd-1-5]: src/sys/dev/pci Pull up revision 1.4 (requested by matt):



details:   https://anonhg.NetBSD.org/src/rev/47e41c256722
branches:  netbsd-1-5
changeset: 490935:47e41c256722
user:      he <he%NetBSD.org@localhost>
date:      Tue Mar 20 18:38:44 2001 +0000

description:
Pull up revision 1.4 (requested by matt):
  Fix c896 support related to PCI configuration and handling of
  64-bit BARs.

diffstat:

 sys/dev/pci/siop_pci_common.c |  14 +++++++++++---
 1 files changed, 11 insertions(+), 3 deletions(-)

diffs (28 lines):

diff -r e9f92b7fb28d -r 47e41c256722 sys/dev/pci/siop_pci_common.c
--- a/sys/dev/pci/siop_pci_common.c     Tue Mar 20 18:35:51 2001 +0000
+++ b/sys/dev/pci/siop_pci_common.c     Tue Mar 20 18:38:44 2001 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: siop_pci_common.c,v 1.2.4.1 2000/12/15 04:50:57 he Exp $       */
+/*     $NetBSD: siop_pci_common.c,v 1.2.4.2 2001/03/20 18:38:44 he Exp $       */
 
 /*
  * Copyright (c) 2000 Manuel Bouyer.
@@ -242,8 +242,16 @@
        }
 
        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",



Home | Main Index | Thread Index | Old Index