Hi.
On 2018/05/07 16:38, John Nemeth wrote:
I'm trying to add an Oxford Semiconductor 4-port serial card
to puc(4). Using the datasheet, I've gotten to the point where
all four serial ports are probed and attached. However, I don't
seem to be able to communicate through the ports. And, there
doesn't seem to be any real documentation on puc(4). I'm trying
to figure out what the various flags mean. A URL for the datasheet
is:
https://www.semiconductorstore.com/pdf/newsite/oxford/OXPCIe954_ds.pdf
It seems that the Legacy mode (e.g. I/O mapped) of OXPCIe952 is removed
from OXPCIe954. It also seems it has no INTx support, right? Are the device's
com registers not 4 byte stride but 1 byte stride?
Here are the patches that I used to get it started:
Index: pcidevs
===================================================================
RCS file: /cvsroot/src/sys/dev/pci/pcidevs,v
retrieving revision 1.1333
diff -u -r1.1333 pcidevs
--- pcidevs 3 May 2018 04:21:10 -0000 1.1333
+++ pcidevs 7 May 2018 07:58:28 -0000
@@ -6280,6 +6280,7 @@
product OXFORDSEMI OXPCIE952_4 0xc141 OXPCIe952
product OXFORDSEMI OXPCIE952_5 0xc144 OXPCIe952
product OXFORDSEMI OXPCIE952_6 0xc145 OXPCIe952
+product OXFORDSEMI OXPCIE952_7 0xc208 OXPCIe952
Not 952 but 954
/* Packet Engines products */
product PACKETENGINES GNICII 0x0911 G-NIC II Ethernet
Index: pucdata.c
===================================================================
RCS file: /cvsroot/src/sys/dev/pci/pucdata.c,v
retrieving revision 1.101
diff -u -r1.101 pucdata.c
--- pucdata.c 13 Apr 2018 07:57:04 -0000 1.101
+++ pucdata.c 7 May 2018 07:58:53 -0000
@@ -1108,6 +1108,19 @@
},
},
+ /* Oxford Semiconductor OXPCIe952 PCIe UARTs */
+ { "Oxford Semiconductor OXPCIe952 UART",
+ { PCI_VENDOR_OXFORDSEMI, PCI_PRODUCT_OXFORDSEMI_OXPCIE952_7,
+ 0, 0 },
+ { 0xffff, 0xffff, 0, 0 },
+ {
+ { PUC_PORT_TYPE_COM, PCI_BAR0, 0x1000, COM_FREQ },
+ { PUC_PORT_TYPE_COM, PCI_BAR0, 0x1200, COM_FREQ },
+ { PUC_PORT_TYPE_COM, PCI_BAR0, 0x1400, COM_FREQ },
+ { PUC_PORT_TYPE_COM, PCI_BAR0, 0x1600, COM_FREQ },
+ },
+ },
+
/* Oxford Semiconductor OXmPCI952 PCI UARTs */
{ "Oxford Semiconductor OXmPCI952 UARTs",
{ PCI_VENDOR_OXFORDSEMI, PCI_PRODUCT_OXFORDSEMI_EXSYS_EX41092,
It seems FreeBSD's puc(4) support OXPCIe954, so it will help
to see FreeBSD's sys/dev/puc/pucdata.c.
If it's a PCIe addin card, could you tell me the product name?
(I don't say I'll work to support it :))
FYI:
http://mail-index.netbsd.org/tech-kern/2014/02/09/msg016616.html
http://mail-index.netbsd.org/tech-kern/2014/01/23/msg016459.html
(If you're trying to use the device for console, you will modify
#if 0'd code in the diff.)
sys/dev/ic/com.c has a lof of #ifdefs. Some of them should not be determined
at compile time (e.g. COM16650 and COM_REGMAP), but the change is not easy.
Please someone(TM) do it.
--
-----------------------------------------------
SAITOH Masanobu (msai...@execsw.org
msai...@netbsd.org)