Source-Changes-HG archive

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

[src/trunk]: src/sys/arch/sandpoint Fixed PCI line to EPIC IRQ mapping for Io...



details:   https://anonhg.NetBSD.org/src/rev/51b580b73d2d
branches:  trunk
changeset: 771007:51b580b73d2d
user:      phx <phx%NetBSD.org@localhost>
date:      Sun Nov 06 00:28:12 2011 +0000

description:
Fixed PCI line to EPIC IRQ mapping for Iomega Storcenter.

diffstat:

 sys/arch/sandpoint/README.NAS        |  17 +++++++++--------
 sys/arch/sandpoint/pci/pci_machdep.c |  17 +++++++++++------
 2 files changed, 20 insertions(+), 14 deletions(-)

diffs (89 lines):

diff -r f4228010c723 -r 51b580b73d2d sys/arch/sandpoint/README.NAS
--- a/sys/arch/sandpoint/README.NAS     Sat Nov 05 23:33:15 2011 +0000
+++ b/sys/arch/sandpoint/README.NAS     Sun Nov 06 00:28:12 2011 +0000
@@ -1,4 +1,4 @@
-$NetBSD: README.NAS,v 1.20 2011/04/21 13:39:54 phx Exp $
+$NetBSD: README.NAS,v 1.21 2011/11/06 00:28:12 phx Exp $
 
 //// MPC8241/8245 NAS products ////
 
@@ -42,15 +42,16 @@
 Kurobox                11, 12, 13, 14  -> 0, 1, 4, 3
 Synology       12, 13, 14, 15  -> 4, 0, 1, 2
 QNAP           13, 14, 15, 16  -> 0, 1, 2, 3
-StorCenter     12, 13, 14, 15  -> 0, 1, 2, 3
-DLink          13, 14, 15, 16  -> 0, 1, 3, 4
+StorCenter     13, 14, 15      -> 1, *, 0
+DLink          13, 14, 15, 16  -> 0, *, 3, 4
 NH230          13, 14, 15, 16  -> 0, 3, 1, 2
 
-- USB EHCI is a multiple function PCI device which has
-  pin assignment A, B and C. Special cases:
-
-               IDSEL   Pin                EPIC IRQ
-  DLink                14      A, B, C         -> 1, 1, 2
+- USB is a multiple function PCI device which has
+  pin assignment A (OHCI), B (OHCI) and C (EHCI).
+  Special cases (*):
+               IDSEL   Pin        EPIC IRQ
+  DLink                14      A, B, C -> 1, 1, 2
+  StorCenter   14      A, B, C -> 2, 3, 4
 
 
 //// e300 NAS products ////
diff -r f4228010c723 -r 51b580b73d2d sys/arch/sandpoint/pci/pci_machdep.c
--- a/sys/arch/sandpoint/pci/pci_machdep.c      Sat Nov 05 23:33:15 2011 +0000
+++ b/sys/arch/sandpoint/pci/pci_machdep.c      Sun Nov 06 00:28:12 2011 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: pci_machdep.c,v 1.29 2011/07/01 19:16:41 dyoung Exp $  */
+/*     $NetBSD: pci_machdep.c,v 1.30 2011/11/06 00:28:12 phx 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.29 2011/07/01 19:16:41 dyoung Exp $");
+__KERNEL_RCSID(0, "$NetBSD: pci_machdep.c,v 1.30 2011/11/06 00:28:12 phx Exp $");
 
 #include "opt_pci.h"
 
@@ -339,7 +339,7 @@
                *ihp = 2;
                break;
        case BRD_KUROBOX:
-               /* map line 11,12,13,14 to EPIC IRQ0,1,4,3 */
+               /* map line 11,12,13,14 to EPIC IRQ 0,1,4,3 */
                *ihp = (line == 13) ? 4 : line - 11;
                break;
        case BRD_QNAPTS:
@@ -347,11 +347,11 @@
                *ihp = line - 13;
                break;
        case BRD_SYNOLOGY:
-               /* map line 12,13-15 to EPIC IRQ4,0-2 */
+               /* map line 12,13-15 to EPIC IRQ 4,0-2 */
                *ihp = (line == 12) ? 4 : line - 13;
                break;
        case BRD_DLINKDSM:
-               /* map line 13,14,15,16 to EPIC IRQ0,1,3,4 */
+               /* map line 13,14A,14B,14C,15,16 to EPIC IRQ 0,1,1,2,3,4 */
                *ihp = (line < 15) ? line - 13 : line - 12;
                if (line == 14 && pin == 3)
                        *ihp += 1;      /* USB pin C (EHCI) uses next IRQ */
@@ -363,8 +363,13 @@
                        (line == 14) ? 3 : 0;
                break;
        case BRD_STORCENTER:
+               /* map line 13,14A,14B,14C,15 to EPIC IRQ 1,2,3,4,0 */
+               *ihp =  (line == 15) ? 0 : 1;
+               if (line == 14)
+                       *ihp += pin;
+               break;
        default:
-               /* map line 12-15 to EPIC IRQ0-3 */
+               /* simply map line 12-15 to EPIC IRQ0-3 */
                *ihp = line - 12;
                break;
        }



Home | Main Index | Thread Index | Old Index