Source-Changes-HG archive

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

[src/trunk]: src/sys/arch/sandpoint/pci add EPIC definition for Netronics NH2...



details:   https://anonhg.NetBSD.org/src/rev/53849b9acc8f
branches:  trunk
changeset: 762042:53849b9acc8f
user:      nisimura <nisimura%NetBSD.org@localhost>
date:      Mon Feb 14 09:00:04 2011 +0000

description:
add EPIC definition for Netronics NH230/NH231 and the brothers.

diffstat:

 sys/arch/sandpoint/pci/pci_machdep.c |  16 ++++++++++++++--
 1 files changed, 14 insertions(+), 2 deletions(-)

diffs (51 lines):

diff -r c79225a0afd3 -r 53849b9acc8f sys/arch/sandpoint/pci/pci_machdep.c
--- a/sys/arch/sandpoint/pci/pci_machdep.c      Mon Feb 14 08:50:38 2011 +0000
+++ b/sys/arch/sandpoint/pci/pci_machdep.c      Mon Feb 14 09:00:04 2011 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: pci_machdep.c,v 1.22 2011/02/10 13:54:45 nisimura Exp $        */
+/*     $NetBSD: pci_machdep.c,v 1.23 2011/02/14 09:00:04 nisimura Exp $        */
 
 /*
  * Copyright (c) 1996 Christopher G. Demetriou.  All rights reserved.
@@ -43,7 +43,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: pci_machdep.c,v 1.22 2011/02/10 13:54:45 nisimura Exp $");
+__KERNEL_RCSID(0, "$NetBSD: pci_machdep.c,v 1.23 2011/02/14 09:00:04 nisimura Exp $");
 
 #include "opt_pci.h"
 
@@ -96,6 +96,7 @@
 #define BRD_SYNOLOGY           102
 #define BRD_STORCENTER         103
 #define BRD_DLINKDSM           104
+#define BRD_NH230NAS           105
 #define BRD_UNKNOWN            -1
 
 #define        PCI_CONFIG_ENABLE       0x80000000UL
@@ -158,6 +159,11 @@
                brdtype = BRD_DLINKDSM;
                return;
        }
+       if (PCI_VENDOR(dev16) == PCI_VENDOR_ITE
+           || PCI_VENDOR(dev16) == PCI_VENDOR_CMDTECH) {
+               brdtype = BRD_NH230NAS;
+               return;
+       }
 
        brdtype = BRD_UNKNOWN;
 }
@@ -348,6 +354,12 @@
                /* map line 13,14,15,16 to EPIC IRQ0,1,3,4 */
                *ihp = (line < 15) ? line - 13 : line - 12;
                break;
+       case BRD_NH230NAS:
+               /* map line 13,14,15,16 to EPIC IRQ0,3,1,2 */
+               *ihp =  (line == 16) ? 2 :
+                       (line == 15) ? 1 :
+                       (line == 14) ? 3 : 0;
+               break;
        case BRD_STORCENTER:
        default:
                /* map line 12-15 to EPIC IRQ0-3 */



Home | Main Index | Thread Index | Old Index