Source-Changes-HG archive

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

[src/trunk]: src/sys/arch/sandpoint/stand/altboot QNAP support. Detect wm(4) ...



details:   https://anonhg.NetBSD.org/src/rev/08ef90fca4ac
branches:  trunk
changeset: 763580:08ef90fca4ac
user:      phx <phx%NetBSD.org@localhost>
date:      Sat Mar 26 17:55:05 2011 +0000

description:
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.

diffstat:

 sys/arch/sandpoint/stand/altboot/brdsetup.c |  31 +++++++++++++++++++---------
 sys/arch/sandpoint/stand/altboot/globals.h  |   4 +-
 2 files changed, 23 insertions(+), 12 deletions(-)

diffs (88 lines):

diff -r f1eae99cc747 -r 08ef90fca4ac sys/arch/sandpoint/stand/altboot/brdsetup.c
--- a/sys/arch/sandpoint/stand/altboot/brdsetup.c       Sat Mar 26 16:30:20 2011 +0000
+++ b/sys/arch/sandpoint/stand/altboot/brdsetup.c       Sat Mar 26 17:55:05 2011 +0000
@@ -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
diff -r f1eae99cc747 -r 08ef90fca4ac sys/arch/sandpoint/stand/altboot/globals.h
--- a/sys/arch/sandpoint/stand/altboot/globals.h        Sat Mar 26 16:30:20 2011 +0000
+++ b/sys/arch/sandpoint/stand/altboot/globals.h        Sat Mar 26 17:55:05 2011 +0000
@@ -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



Home | Main Index | Thread Index | Old Index