Source-Changes-HG archive

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

[src/trunk]: src/sys/dev/pci - Add support for Moschip NM9904 and NM9922. The...



details:   https://anonhg.NetBSD.org/src/rev/3d6ad558764a
branches:  trunk
changeset: 762434:3d6ad558764a
user:      msaitoh <msaitoh%NetBSD.org@localhost>
date:      Sun Feb 20 22:22:02 2011 +0000

description:
- Add support for Moschip NM9904 and NM9922. These devices use PCI multi
  function, so only one PUC_PORT_TYPE_COM entry is used in these devices.
- Use macro.

diffstat:

 sys/dev/pci/pucdata.c |  56 +++++++++++++++++++++++++++++++++-----------------
 1 files changed, 37 insertions(+), 19 deletions(-)

diffs (196 lines):

diff -r 5a14594eb378 -r 3d6ad558764a sys/dev/pci/pucdata.c
--- a/sys/dev/pci/pucdata.c     Sun Feb 20 22:16:50 2011 +0000
+++ b/sys/dev/pci/pucdata.c     Sun Feb 20 22:22:02 2011 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: pucdata.c,v 1.69 2010/08/01 18:50:24 msaitoh Exp $     */
+/*     $NetBSD: pucdata.c,v 1.70 2011/02/20 22:22:02 msaitoh Exp $     */
 
 /*
  * Copyright (c) 1998, 1999 Christopher G. Demetriou.  All rights reserved.
@@ -36,7 +36,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: pucdata.c,v 1.69 2010/08/01 18:50:24 msaitoh Exp $");
+__KERNEL_RCSID(0, "$NetBSD: pucdata.c,v 1.70 2011/02/20 22:22:02 msaitoh Exp $");
 
 #include <sys/param.h>
 #include <sys/systm.h>
@@ -721,7 +721,7 @@
 
        /* NetMos 1P PCI : 1P */
        {   "NetMos NM9805 1284 Printer port",
-           {   PCI_VENDOR_NETMOS,      0x9805, 0,      0       },
+           {   PCI_VENDOR_NETMOS,      PCI_PRODUCT_NETMOS_NM9805, 0, 0 },
            {   0xffff, 0xffff, 0,      0       },
            {
                { PUC_PORT_TYPE_LPT, 0x10, 0x00, 0x00 },
@@ -730,7 +730,7 @@
 
        /* NetMos 2P PCI : 2P */
        {   "NetMos NM9815 Dual 1284 Printer port",
-           {   PCI_VENDOR_NETMOS,      0x9815, 0,      0       },
+           {   PCI_VENDOR_NETMOS,      PCI_PRODUCT_NETMOS_NM9815, 0, 0 },
            {   0xffff, 0xffff, 0,      0       },
            {
                { PUC_PORT_TYPE_LPT, 0x10, 0x00, 0x00 },
@@ -740,7 +740,7 @@
 
        /* NetMos 1S PCI NM9835 : 1S */
        {   "NetMos NM9835 UART",
-           {   PCI_VENDOR_NETMOS, 0x9835, 0x1000, 0x0001       },
+           {   PCI_VENDOR_NETMOS, PCI_PRODUCT_NETMOS_NM9835, 0x1000, 0x0001 },
            {   0xffff, 0xffff, 0xffff, 0xffff  },
            {
                { PUC_PORT_TYPE_COM, 0x10, 0x00, COM_FREQ },
@@ -749,7 +749,7 @@
 
        /* NetMos 2S PCI NM9835 : 2S */
        {   "NetMos NM9835 Dual UART",
-           {   PCI_VENDOR_NETMOS, 0x9835, 0x1000, 0x0002       },
+           {   PCI_VENDOR_NETMOS, PCI_PRODUCT_NETMOS_NM9835, 0x1000, 0x0002 },
            {   0xffff, 0xffff, 0xffff, 0xffff  },
            {
                { PUC_PORT_TYPE_COM, 0x10, 0x00, COM_FREQ },
@@ -759,7 +759,7 @@
 
        /* NetMos 2S1P PCI 16C650 : 2S, 1P */
        {   "NetMos NM9835 Dual UART and 1284 Printer port",
-           {   PCI_VENDOR_NETMOS,      0x9835, 0,      0       },
+           {   PCI_VENDOR_NETMOS, PCI_PRODUCT_NETMOS_NM9835, 0, 0 },
            {   0xffff, 0xffff, 0,      0       },
            {
                { PUC_PORT_TYPE_COM, 0x10, 0x00, COM_FREQ },
@@ -770,7 +770,7 @@
 
        /* NetMos 4S0P PCI NM9845 : 4S, 0P */
        {   "NetMos NM9845 Quad UART",
-          {   PCI_VENDOR_NETMOS, 0x9845, 0x1000, 0x0004  },
+          {   PCI_VENDOR_NETMOS, PCI_PRODUCT_NETMOS_NM9845, 0x1000, 0x0004 },
           {   0xffff, 0xffff, 0xffff, 0xffff  },
           {
               { PUC_PORT_TYPE_COM, 0x10, 0x00, COM_FREQ },
@@ -782,7 +782,7 @@
 
        /* NetMos 4S1P PCI NM9845 : 4S, 1P */
        {   "NetMos NM9845 Quad UART and 1284 Printer port",
-          {   PCI_VENDOR_NETMOS, 0x9845, 0x1000, 0x0014  },
+          {   PCI_VENDOR_NETMOS, PCI_PRODUCT_NETMOS_NM9845, 0x1000, 0x0014 },
           {   0xffff, 0xffff, 0xffff, 0xffff  },
           {
               { PUC_PORT_TYPE_COM, 0x10, 0x00, COM_FREQ },
@@ -795,7 +795,7 @@
 
        /* NetMos 6S PCI 16C650 : 6S, 0P */
        {   "NetMos NM9845 6 UART",
-          {   PCI_VENDOR_NETMOS, 0x9845, 0x1000, 0x0006  },
+          {   PCI_VENDOR_NETMOS, PCI_PRODUCT_NETMOS_NM9845, 0x1000, 0x0006 },
           {   0xffff, 0xffff, 0xffff, 0xffff  },
           {
               { PUC_PORT_TYPE_COM, 0x10, 0x00, COM_FREQ },
@@ -809,7 +809,7 @@
 
        /* NetMos 4S1P PCI NM9845 : 4S, 1P */
        {   "NetMos NM9845 Quad UART and 1284 Printer port (unknown type)",
-           {   PCI_VENDOR_NETMOS,      0x9845, 0,      0       },
+           {   PCI_VENDOR_NETMOS, PCI_PRODUCT_NETMOS_NM9845, 0, 0 },
            {   0xffff, 0xffff, 0,      0       },
            {
                { PUC_PORT_TYPE_COM, 0x10, 0x00, COM_FREQ },
@@ -822,7 +822,7 @@
 
        /* NetMos 4S1P PCI NM9855 : 4S, 1P */
        {   "NetMos NM9855 Quad UART and 1284 Printer port (unknown type)",
-           {   PCI_VENDOR_NETMOS,      0x9855, 0x1000, 0x0014  },
+           {   PCI_VENDOR_NETMOS, PCI_PRODUCT_NETMOS_NM9855, 0x1000, 0x0014 },
            {   0xffff, 0xffff, 0xffff, 0xffff  },
            {
                { PUC_PORT_TYPE_LPT, 0x10, 0x00, 0x00 },
@@ -835,7 +835,7 @@
 
        /* NetMos 6S PCI NM9865 : 1S */
        {   "NetMos NM9865 1 UART",
-           {   PCI_VENDOR_NETMOS,      0x9865, 0xa000, 0x1000  },
+           {   PCI_VENDOR_NETMOS, 0x9865,      0xa000, 0x1000  },
            {   0xffff, 0xffff, 0xffff, 0xffff  },
            {
                { PUC_PORT_TYPE_COM, 0x10, 0x00, COM_FREQ },
@@ -844,7 +844,7 @@
 
        /* NetMos 2S PCI NM9865 : 2S */
        {   "NetMos NM9865 2 UART",
-           {   PCI_VENDOR_NETMOS,      0x9865, 0xa000, 0x3002  },
+           {   PCI_VENDOR_NETMOS, PCI_PRODUCT_NETMOS_NM9865, 0xa000, 0x3002 },
            {   0xffff, 0xffff, 0xffff, 0xffff  },
            {
                { PUC_PORT_TYPE_COM, 0x10, 0x00, COM_FREQ },
@@ -854,7 +854,7 @@
 
        /* NetMos 3S PCI NM9865 : 3S */
        {   "NetMos NM9865 3 UART",
-           {   PCI_VENDOR_NETMOS,      0x9865, 0xa000, 0x3003  },
+           {   PCI_VENDOR_NETMOS, PCI_PRODUCT_NETMOS_NM9865, 0xa000, 0x3003 },
            {   0xffff, 0xffff, 0xffff, 0xffff  },
            {
                { PUC_PORT_TYPE_COM, 0x10, 0x00, COM_FREQ },
@@ -865,7 +865,7 @@
 
        /* NetMos 4S PCI NM9865 : 4S */
        {   "NetMos NM9865 4 UART",
-           {   PCI_VENDOR_NETMOS,      0x9865, 0xa000, 0x3004  },
+           {   PCI_VENDOR_NETMOS, PCI_PRODUCT_NETMOS_NM9865, 0xa000, 0x3004 },
            {   0xffff, 0xffff, 0xffff, 0xffff  },
            {
                { PUC_PORT_TYPE_COM, 0x10, 0x00, COM_FREQ },
@@ -877,7 +877,7 @@
 
        /* NetMos PCI NM9865 : 1S 1P */
        {   "NetMos NM9865 Single UART and Single LPT",
-           {   PCI_VENDOR_NETMOS,      0x9865, 0xa000, 0x3011  },
+           {   PCI_VENDOR_NETMOS, PCI_PRODUCT_NETMOS_NM9865, 0xa000, 0x3011 },
            {   0xffff, 0xffff, 0xffff, 0xffff  },
            {
                { PUC_PORT_TYPE_COM, 0x10, 0x00, COM_FREQ },
@@ -887,7 +887,7 @@
 
        /* NetMos PCI NM9865 : 2S 1P */
        {   "NetMos NM9865 Dual UART and Single LPT",
-           {   PCI_VENDOR_NETMOS,      0x9865, 0xa000, 0x3012  },
+           {   PCI_VENDOR_NETMOS, PCI_PRODUCT_NETMOS_NM9865, 0xa000, 0x3012 },
            {   0xffff, 0xffff, 0xffff, 0xffff  },
            {
                { PUC_PORT_TYPE_COM, 0x10, 0x00, COM_FREQ },
@@ -898,7 +898,7 @@
 
        /* NetMos PCI NM9865 : 2P */
        {   "NetMos NM9865 Dual LPT",
-           {   PCI_VENDOR_NETMOS,      0x9865, 0xa000, 0x3020  },
+           {   PCI_VENDOR_NETMOS, PCI_PRODUCT_NETMOS_NM9865, 0xa000, 0x3020 },
            {   0xffff, 0xffff, 0xffff, 0xffff  },
            {
                { PUC_PORT_TYPE_LPT, 0x10, 0x00, 0x00 },
@@ -924,6 +924,24 @@
            },
        },
 
+       /* NetMos PCIe NM9904 (PCI multi function): 4S */
+       {   "NetMos NM9904 UART",
+           {   PCI_VENDOR_NETMOS, PCI_PRODUCT_NETMOS_NM9904, 0, 0 },
+           {   0xffff, 0xffff,                               0, 0 },
+           {
+               { PUC_PORT_TYPE_COM, 0x10, 0x00, COM_FREQ },
+           },
+       },
+
+       /* NetMos PCIe NM9922 (PCI multi function): 2S */
+       {   "NetMos NM9922 UART",
+           {   PCI_VENDOR_NETMOS, PCI_PRODUCT_NETMOS_NM9922, 0, 0 },
+           {   0xffff, 0xffff,                               0, 0 },
+           {
+               { PUC_PORT_TYPE_COM, 0x10, 0x00, COM_FREQ },
+           },
+       },
+
        /*
         * Boards with an Oxford Semiconductor chip.
         *



Home | Main Index | Thread Index | Old Index