Module Name: src
Committed By: cliff
Date: Thu May 6 20:48:39 UTC 2010
Modified Files:
src/sys/arch/mips/rmi [matt-nb5-mips64]: rmixl_intr.c rmixl_pcie.c
Log Message:
fix pcie IRQ assignments for XLS2xx
To generate a diff of this commit:
cvs rdiff -u -r1.1.2.18 -r1.1.2.19 src/sys/arch/mips/rmi/rmixl_intr.c
cvs rdiff -u -r1.1.2.12 -r1.1.2.13 src/sys/arch/mips/rmi/rmixl_pcie.c
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Modified files:
Index: src/sys/arch/mips/rmi/rmixl_intr.c
diff -u src/sys/arch/mips/rmi/rmixl_intr.c:1.1.2.18 src/sys/arch/mips/rmi/rmixl_intr.c:1.1.2.19
--- src/sys/arch/mips/rmi/rmixl_intr.c:1.1.2.18 Sat May 1 06:13:34 2010
+++ src/sys/arch/mips/rmi/rmixl_intr.c Thu May 6 20:48:39 2010
@@ -1,4 +1,4 @@
-/* $NetBSD: rmixl_intr.c,v 1.1.2.18 2010/05/01 06:13:34 cliff Exp $ */
+/* $NetBSD: rmixl_intr.c,v 1.1.2.19 2010/05/06 20:48:39 cliff Exp $ */
/*-
* Copyright (c) 2007 Ruslan Ermilov and Vsevolod Lobko.
@@ -64,7 +64,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: rmixl_intr.c,v 1.1.2.18 2010/05/01 06:13:34 cliff Exp $");
+__KERNEL_RCSID(0, "$NetBSD: rmixl_intr.c,v 1.1.2.19 2010/05/06 20:48:39 cliff Exp $");
#include "opt_ddb.h"
#define __INTR_PRIVATE
@@ -159,8 +159,47 @@
};
/*
+ * rmixl_irtnames_xls2xx
+ * - use for XLS2xx
+ */
+static const char * const rmixl_irtnames_xls2xx[NIRTS] = {
+ "int 0 (watchdog)", /* 0 */
+ "int 1 (timer0)", /* 1 */
+ "int 2 (timer1)", /* 2 */
+ "int 3 (timer2)", /* 3 */
+ "int 4 (timer3)", /* 4 */
+ "int 5 (timer4)", /* 5 */
+ "int 6 (timer5)", /* 6 */
+ "int 7 (timer6)", /* 7 */
+ "int 8 (timer7)", /* 8 */
+ "int 9 (uart0)", /* 9 */
+ "int 10 (uart1)", /* 10 */
+ "int 11 (i2c0)", /* 11 */
+ "int 12 (i2c1)", /* 12 */
+ "int 13 (pcmcia)", /* 13 */
+ "int 14 (gpio_a)", /* 14 */
+ "int 15 (irq15)", /* 15 */
+ "int 16 (bridge_tb)", /* 16 */
+ "int 17 (gmac0)", /* 17 */
+ "int 18 (gmac1)", /* 18 */
+ "int 19 (gmac2)", /* 19 */
+ "int 20 (gmac3)", /* 20 */
+ "int 21 (irq21)", /* 21 */
+ "int 22 (irq22)", /* 22 */
+ "int 23 (pcie_link2)", /* 23 */
+ "int 24 (pcie_link3)", /* 24 */
+ "int 25 (bridge_err)", /* 25 */
+ "int 26 (pcie_link0)", /* 26 */
+ "int 27 (pcie_link1)", /* 27 */
+ "int 28 (irq28)", /* 28 */
+ "int 29 (pcie_err)", /* 29 */
+ "int 30 (gpio_b)", /* 30 */
+ "int 31 (usb)", /* 31 */
+};
+
+/*
* rmixl_irtnames_xls1xx
- * - use for XLS1xx, XLS2xx, XLS4xx-Lite
+ * - use for XLS1xx, XLS4xx-Lite
*/
static const char * const rmixl_irtnames_xls1xx[NIRTS] = {
"int 0 (watchdog)", /* 0 */
@@ -517,12 +556,14 @@
switch (MIPS_PRID_IMPL(mips_options.mips_cpu_id)) {
case MIPS_XLS104:
case MIPS_XLS108:
- case MIPS_XLS204:
- case MIPS_XLS208:
case MIPS_XLS404LITE:
case MIPS_XLS408LITE:
name = rmixl_irtnames_xls1xx[irq];
break;
+ case MIPS_XLS204:
+ case MIPS_XLS208:
+ name = rmixl_irtnames_xls2xx[irq];
+ break;
case MIPS_XLS404:
case MIPS_XLS408:
case MIPS_XLS416:
Index: src/sys/arch/mips/rmi/rmixl_pcie.c
diff -u src/sys/arch/mips/rmi/rmixl_pcie.c:1.1.2.12 src/sys/arch/mips/rmi/rmixl_pcie.c:1.1.2.13
--- src/sys/arch/mips/rmi/rmixl_pcie.c:1.1.2.12 Mon Apr 12 22:42:06 2010
+++ src/sys/arch/mips/rmi/rmixl_pcie.c Thu May 6 20:48:39 2010
@@ -1,4 +1,4 @@
-/* $NetBSD: rmixl_pcie.c,v 1.1.2.12 2010/04/12 22:42:06 cliff Exp $ */
+/* $NetBSD: rmixl_pcie.c,v 1.1.2.13 2010/05/06 20:48:39 cliff Exp $ */
/*
* Copyright (c) 2001 Wasabi Systems, Inc.
@@ -40,7 +40,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: rmixl_pcie.c,v 1.1.2.12 2010/04/12 22:42:06 cliff Exp $");
+__KERNEL_RCSID(0, "$NetBSD: rmixl_pcie.c,v 1.1.2.13 2010/05/06 20:48:39 cliff Exp $");
#include "opt_pci.h"
#include "pci.h"
@@ -1030,8 +1030,6 @@
switch (MIPS_PRID_IMPL(mips_options.mips_cpu_id)) {
case MIPS_XLS104:
case MIPS_XLS108:
- case MIPS_XLS204:
- case MIPS_XLS208:
case MIPS_XLS404LITE:
case MIPS_XLS408LITE:
switch (pa->pa_bus) {
@@ -1047,6 +1045,29 @@
panic("%s: bad bus %d\n", __func__, pa->pa_bus);
}
break;
+ case MIPS_XLS204:
+ case MIPS_XLS208:
+ switch (pa->pa_bus) {
+ case 1:
+ link = 0;
+ irq = 26;
+ break;
+ case 2:
+ link = 1;
+ irq = 27;
+ break;
+ case 3:
+ link = 2;
+ irq = 23;
+ break;
+ case 4:
+ link = 3;
+ irq = 24;
+ break;
+ default:
+ panic("%s: bad bus %d\n", __func__, pa->pa_bus);
+ }
+ break;
case MIPS_XLS404:
case MIPS_XLS408:
case MIPS_XLS416:
@@ -1097,8 +1118,6 @@
switch (MIPS_PRID_IMPL(mips_options.mips_cpu_id)) {
case MIPS_XLS104:
case MIPS_XLS108:
- case MIPS_XLS204:
- case MIPS_XLS208:
case MIPS_XLS404LITE:
case MIPS_XLS408LITE:
switch (irq) {
@@ -1108,6 +1127,17 @@
break;
}
break;
+ case MIPS_XLS204:
+ case MIPS_XLS208:
+ switch (irq) {
+ case 23:
+ case 24:
+ case 26:
+ case 27:
+ name = rmixl_intr_string(irq);
+ break;
+ }
+ break;
case MIPS_XLS404:
case MIPS_XLS408:
case MIPS_XLS416: