From: "Andrey Panin" <pazke@centrinvest.ru>
To: James Lamanna <jlamanna@gmail.com>
Cc: Robert Hancock <hancockrwd@gmail.com>,
linux-kernel@vger.kernel.org, linux-serial@vger.kernel.org
Subject: Re: SIIG DP CyberSerial 4S PCIe Support
Date: Tue, 9 Mar 2010 17:15:52 +0300 [thread overview]
Message-ID: <20100309141552.GD30538@centrinvest.ru> (raw)
In-Reply-To: <aa4c40ff1003082115x3e9e1492je90e5afb826b3408@mail.gmail.com>
[-- Attachment #1: Type: text/plain, Size: 625 bytes --]
On 067, 03 08, 2010 at 09:15:26PM -0800, James Lamanna wrote:
> That's probably the case.
> It looks like 8250 doesn't know about this PCIe device at all.
> The Oxford PCI ID is not in pci_ids.h nor is the SIIG subsystem ID.
> I'll see if I can maybe work up a patch to support this device, since I've found
> the datasheet for the Oxford 4 port UART controller, but I may need some help.
> Or if anyone else (who has more experience with this) wants to formulate one,
> it would be greatly appreciated.
Looks like you card can use existing code for Oxford Semiconductor UARTs.
Can you test the attached patch for 2.6.33 ?
[-- Attachment #2: patch-siig-pcie --]
[-- Type: text/plain, Size: 3150 bytes --]
diff -urdpX dontdiff linux-2.6.33.vanilla/drivers/serial/8250_pci.c linux-2.6.33/drivers/serial/8250_pci.c
--- linux-2.6.33.vanilla/drivers/serial/8250_pci.c 2010-03-09 16:19:55.000000000 +0300
+++ linux-2.6.33/drivers/serial/8250_pci.c 2010-03-09 16:26:02.000000000 +0300
@@ -431,6 +431,38 @@ static void __devexit sbs_exit(struct pc
}
/*
+ * Oxford Semiconductor Inc.
+ * Check that device is part of the Tornado range of devices, then determine
+ * the number of ports available on the device.
+ */
+static int pci_oxsemi_tornado_init(struct pci_dev *dev)
+{
+ u8 __iomem *p;
+ unsigned long deviceID;
+ unsigned int number_uarts = 0;
+
+ /* OxSemi Tornado devices are all 0xCxxx */
+ if (dev->vendor == PCI_VENDOR_ID_OXSEMI &&
+ (dev->device & 0xF000) != 0xC000)
+ return 0;
+
+ p = pci_iomap(dev, 0, 5);
+ if (p == NULL)
+ return -ENOMEM;
+
+ deviceID = ioread32(p);
+ /* Tornado device */
+ if (deviceID == 0x07000200) {
+ number_uarts = ioread8(p + 4);
+ printk(KERN_DEBUG
+ "%d ports detected on Oxford PCI Express device\n",
+ number_uarts);
+ }
+ pci_iounmap(dev, p);
+ return number_uarts;
+}
+
+/*
* SIIG serial cards have an PCI interface chip which also controls
* the UART clocking frequency. Each UART can be clocked independently
* (except cards equiped with 4 UARTs) and initial clocking settings
@@ -515,6 +547,8 @@ static int pci_siig_init(struct pci_dev
return pci_siig10x_init(dev);
else if (type == 0x2000)
return pci_siig20x_init(dev);
+ else if ((type & 0xf000) == 0xc000)
+ return pci_oxsemi_tornado_init(dev);
moan_device("Unknown SIIG card", dev);
return -ENODEV;
@@ -902,38 +936,6 @@ static void __devexit pci_ite887x_exit(s
release_region(ioport, ITE_887x_IOSIZE);
}
-/*
- * Oxford Semiconductor Inc.
- * Check that device is part of the Tornado range of devices, then determine
- * the number of ports available on the device.
- */
-static int pci_oxsemi_tornado_init(struct pci_dev *dev)
-{
- u8 __iomem *p;
- unsigned long deviceID;
- unsigned int number_uarts = 0;
-
- /* OxSemi Tornado devices are all 0xCxxx */
- if (dev->vendor == PCI_VENDOR_ID_OXSEMI &&
- (dev->device & 0xF000) != 0xC000)
- return 0;
-
- p = pci_iomap(dev, 0, 5);
- if (p == NULL)
- return -ENOMEM;
-
- deviceID = ioread32(p);
- /* Tornado device */
- if (deviceID == 0x07000200) {
- number_uarts = ioread8(p + 4);
- printk(KERN_DEBUG
- "%d ports detected on Oxford PCI Express device\n",
- number_uarts);
- }
- pci_iounmap(dev, p);
- return number_uarts;
-}
-
static int
pci_default_setup(struct serial_private *priv,
const struct pciserial_board *board,
@@ -2984,6 +2986,13 @@ static struct pci_device_id serial_pci_t
PCI_VENDOR_ID_MAINPINE, 0x4008, 0, 0,
pbn_oxsemi_8_4000000 },
/*
+ * SIIG cards utilizing OxSemi Tornado
+ */
+ { PCI_VENDOR_ID_SIIG, 0xc208, /* SIIG DP CyberSerial 4S PCIe */
+ PCI_ANY_ID, PCI_ANY_ID, 0, 0,
+ pbn_oxsemi_4_4000000 },
+
+ /*
* SBS Technologies, Inc. P-Octal and PMC-OCTPRO cards,
* from skokodyn@yahoo.com
*/
next prev parent reply other threads:[~2010-03-09 14:29 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-03-08 19:07 SIIG DP CyberSerial 4S PCIe Support James Lamanna
2010-03-08 21:13 ` James Lamanna
2010-03-08 21:13 ` James Lamanna
2010-03-09 2:19 ` Robert Hancock
2010-03-09 5:15 ` James Lamanna
2010-03-09 5:15 ` James Lamanna
2010-03-09 14:15 ` Andrey Panin [this message]
2010-03-09 15:06 ` James Lamanna
2010-03-09 15:09 ` James Lamanna
2010-03-11 13:45 ` Andrey Panin
2010-03-18 21:06 ` Andrew Morton
2010-03-20 2:05 ` James Lamanna
2010-03-24 8:32 ` Andrey Panin
2010-03-24 8:32 ` Andrey Panin
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20100309141552.GD30538@centrinvest.ru \
--to=pazke@centrinvest.ru \
--cc=hancockrwd@gmail.com \
--cc=jlamanna@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-serial@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.