diff --git a/sys/arch/sandpoint/README.NAS b/sys/arch/sandpoint/README.NAS index 0bd1f92affac..b4991e9b73c2 100644 --- a/sys/arch/sandpoint/README.NAS +++ b/sys/arch/sandpoint/README.NAS @@ -1,4 +1,4 @@ -$NetBSD: README.NAS,v 1.6 2010/05/27 15:35:46 phx Exp $ +$NetBSD: README.NAS,v 1.7 2010/05/28 15:45:11 phx Exp $ //// MPC8241/8245 NAS products //// @@ -23,7 +23,7 @@ re.15 viaide.13 IOMEGA StorCenter PCI IDSEL EPIC IRQ Kurobox 11, 12, 13, 14 -> 0, 1, 4, 3 Synology 12, 13, 14, 15 -> 4, 0, 1, 2 -QNAP 12, 13, 14, 15 -> 0, 1, 2, 3 +QNAP 13, 14, 15, 16 -> 0, 1, 2, 3 StorCenter 12, 13, 14, 15 -> 0, 1, 2, 3 - USB EHCI is a multiple function PCI device which has diff --git a/sys/arch/sandpoint/pci/pci_machdep.c b/sys/arch/sandpoint/pci/pci_machdep.c index 79f7945349cf..5da9cb5ec896 100644 --- a/sys/arch/sandpoint/pci/pci_machdep.c +++ b/sys/arch/sandpoint/pci/pci_machdep.c @@ -1,4 +1,4 @@ -/* $NetBSD: pci_machdep.c,v 1.18 2010/05/27 14:54:42 phx Exp $ */ +/* $NetBSD: pci_machdep.c,v 1.19 2010/05/28 15:45:11 phx Exp $ */ /* * Copyright (c) 1996 Christopher G. Demetriou. All rights reserved. @@ -43,7 +43,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: pci_machdep.c,v 1.18 2010/05/27 14:54:42 phx Exp $"); +__KERNEL_RCSID(0, "$NetBSD: pci_machdep.c,v 1.19 2010/05/28 15:45:11 phx Exp $"); #include "opt_pci.h" @@ -322,8 +322,8 @@ pci_intr_map(struct pci_attach_args *pa, pci_intr_handle_t *ihp) *ihp = (line == 13) ? 4 : line - 11; break; case BRD_QNAPTS101: - /* map line 12-15 to EPIC IRQ0-3 */ - *ihp = line - 12; + /* map line 13-16 to EPIC IRQ0-3 */ + *ihp = line - 13; break; case BRD_SYNOLOGY: /* map line 12,13-15 to EPIC IRQ4,0-2 */ diff --git a/sys/arch/sandpoint/stand/netboot/brdsetup.c b/sys/arch/sandpoint/stand/netboot/brdsetup.c index d52aab396db3..395100a791b2 100644 --- a/sys/arch/sandpoint/stand/netboot/brdsetup.c +++ b/sys/arch/sandpoint/stand/netboot/brdsetup.c @@ -1,4 +1,4 @@ -/* $NetBSD: brdsetup.c,v 1.19 2010/05/20 20:18:51 phx Exp $ */ +/* $NetBSD: brdsetup.c,v 1.20 2010/05/28 15:45:11 phx Exp $ */ /*- * Copyright (c) 2008 The NetBSD Foundation, Inc. @@ -45,10 +45,11 @@ void xxx ## pcifix(struct brdprop *); \ void xxx ## reset(void) -BRD_DECL(enc); BRD_DECL(mot); +BRD_DECL(enc); BRD_DECL(kuro); BRD_DECL(syno); +BRD_DECL(qnap); static struct brdprop brdlist[] = { { @@ -57,14 +58,14 @@ static struct brdprop brdlist[] = { BRD_SANDPOINTX3, 0, "com", 0x3f8, 115200, - motsetup, NULL, motpcifix }, + motsetup, motbrdfix, motpcifix }, { "encpp1", "EnCore PP1", BRD_ENCOREPP1, 0, "com", 0x3f8, 115200, - encsetup, NULL, encpcifix }, + encsetup, encbrdfix, encpcifix }, { "kurobox", "KuroBox", @@ -86,7 +87,7 @@ static struct brdprop brdlist[] = { BRD_QNAPTS101, 0, "eumb", 0x4500, 115200, - NULL, NULL, NULL }, + NULL, NULL, qnappcifix }, { "iomega", "IOMEGA Storcenter", @@ -667,6 +668,37 @@ synopcifix(struct brdprop *brd) pcicfgwrite(nic, 0x3c, val); } +void +qnappcifix(struct brdprop *brd) +{ + unsigned ide, nic, usb, val; + + ide = pcimaketag(0, 13, 0); + val = pcicfgread(ide, 0x3c) & 0xffffff00; + val |= 13; + pcicfgwrite(ide, 0x3c, val); + + usb = pcimaketag(0, 14, 0); + val = pcicfgread(usb, 0x3c) & 0xffffff00; + val |= 14; + pcicfgwrite(usb, 0x3c, val); + + usb = pcimaketag(0, 14, 1); + val = pcicfgread(usb, 0x3c) & 0xffffff00; + val |= 14; + pcicfgwrite(usb, 0x3c, val); + + usb = pcimaketag(0, 14, 2); + val = pcicfgread(usb, 0x3c) & 0xffffff00; + val |= 14; + pcicfgwrite(usb, 0x3c, val); + + nic = pcimaketag(0, 15, 0); + val = pcicfgread(nic, 0x3c) & 0xffffff00; + val |= 15; + pcicfgwrite(nic, 0x3c, val); +} + void synoreset() {