Module Name: src Committed By: phx Date: Sat Mar 26 17:55:05 UTC 2011
Modified Files: src/sys/arch/sandpoint/stand/altboot: brdsetup.c globals.h Log Message: QNAP support. Detect wm(4) based V1.02 and re(4) based V200 boards. That should include all TS-101 and TS-201 models. Add reset-code and LED-illumination code for the QNAP PIC, which listens on the second UART with 19200 bps. To generate a diff of this commit: cvs rdiff -u -r1.11 -r1.12 src/sys/arch/sandpoint/stand/altboot/brdsetup.c \ src/sys/arch/sandpoint/stand/altboot/globals.h 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/sandpoint/stand/altboot/brdsetup.c diff -u src/sys/arch/sandpoint/stand/altboot/brdsetup.c:1.11 src/sys/arch/sandpoint/stand/altboot/brdsetup.c:1.12 --- src/sys/arch/sandpoint/stand/altboot/brdsetup.c:1.11 Sun Mar 13 01:56:21 2011 +++ src/sys/arch/sandpoint/stand/altboot/brdsetup.c Sat Mar 26 17:55:05 2011 @@ -1,4 +1,4 @@ -/* $NetBSD: brdsetup.c,v 1.11 2011/03/13 01:56:21 phx Exp $ */ +/* $NetBSD: brdsetup.c,v 1.12 2011/03/26 17:55:05 phx Exp $ */ /*- * Copyright (c) 2008 The NetBSD Foundation, Inc. @@ -89,14 +89,14 @@ NULL, synobrdfix, NULL, synoreset }, { "qnap", - "QNAP TS-101", - BRD_QNAPTS101, + "QNAP TS", + BRD_QNAPTS, 0, "eumb", 0x4500, 115200, - NULL, qnapbrdfix, NULL, NULL }, + NULL, qnapbrdfix, NULL, qnapreset }, { "iomega", - "IOMEGA StorCenter", + "IOMEGA StorCenter G2", BRD_STORCENTER, 0, "eumb", 0x4500, 115200, @@ -224,9 +224,10 @@ /* SKnet/Marvell (sk) at dev 15 */ brdtype = BRD_SYNOLOGY; } - else if (PCI_VENDOR(pcicfgread(dev15, PCI_ID_REG)) == 0x8086) { - /* Intel (wm) at dev 15 */ - brdtype = BRD_QNAPTS101; + else if (PCI_VENDOR(pcicfgread(dev15, PCI_ID_REG)) == 0x8086 + || PCI_VENDOR(pcicfgread(dev15, PCI_ID_REG)) == 0x10ec) { + /* Intel (wm) or RealTek (re) at dev 15 */ + brdtype = BRD_QNAPTS; } else if (PCI_VENDOR(pcicfgread(dev13, PCI_ID_REG)) == 0x1106) { /* VIA 6410 (viaide) at dev 13 */ @@ -237,7 +238,7 @@ brdtype = BRD_DLINKDSM; } else if (PCI_VENDOR(pcicfgread(dev16, PCI_ID_REG)) == 0x1283 - || PCI_VENDOR(pcicfgread(dev16, PCI_ID_REG)) == 0x1095) { + || PCI_VENDOR(pcicfgread(dev16, PCI_ID_REG)) == 0x1095) { /* ITE (iteide) or SiI (satalink) at dev 16 */ brdtype = BRD_NH230NAS; } @@ -672,7 +673,17 @@ qnapbrdfix(struct brdprop *brd) { - /* illuminate LEDs */ + init_uart(uart2base, 19200, LCR_8BITS | LCR_PNONE); + /* beep, status LED red */ + send_sat("PW"); +} + +void +qnapreset() +{ + + send_sat("f"); + /*NOTREACHED*/ } void Index: src/sys/arch/sandpoint/stand/altboot/globals.h diff -u src/sys/arch/sandpoint/stand/altboot/globals.h:1.11 src/sys/arch/sandpoint/stand/altboot/globals.h:1.12 --- src/sys/arch/sandpoint/stand/altboot/globals.h:1.11 Sun Mar 13 01:56:21 2011 +++ src/sys/arch/sandpoint/stand/altboot/globals.h Sat Mar 26 17:55:05 2011 @@ -1,4 +1,4 @@ -/* $NetBSD: globals.h,v 1.11 2011/03/13 01:56:21 phx Exp $ */ +/* $NetBSD: globals.h,v 1.12 2011/03/26 17:55:05 phx Exp $ */ #ifdef DEBUG #define DPRINTF(x) printf x @@ -17,7 +17,7 @@ #define BRD_SANDPOINTX3 3 #define BRD_ENCOREPP1 10 #define BRD_KUROBOX 100 -#define BRD_QNAPTS101 101 +#define BRD_QNAPTS 101 #define BRD_SYNOLOGY 102 #define BRD_STORCENTER 103 #define BRD_DLINKDSM 104