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.
This commit is contained in:
phx 2011-03-26 17:55:05 +00:00
parent 02bd0cacbd
commit b65ff74068
2 changed files with 23 additions and 12 deletions

View File

@ -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 @@ static struct brdprop brdlist[] = {
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 @@ brdsetup(void)
/* 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 @@ brdsetup(void)
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 @@ void
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

View File

@ -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 @@ extern int brdtype;
#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