Problem with Oxford 950 2xRS232

Russell King rmk+pcmcia at
Sun May 11 19:35:37 EDT 2008

On Thu, May 01, 2008 at 06:54:47PM -0500, John R. wrote:
> I have a SerialGear 2 port PCMCIA card that (according to the 
> manufacturer) has an Oxford 950 chip.  It should have a 16C950 UART.

The Oxford 950 chips come in various varieties - OXCF950 ("compact flash"
aka PCMCIA), OXCB950 (Cardbus) and the plain OX16C950.

> May  1 18:36:35 laptop pccard: PCMCIA card inserted into slot 0
> May  1 18:36:35 laptop pcmcia: registering new device pcmcia0.0
> May  1 18:36:36 laptop 0.0: ttyS1 at I/O 0x3108 (irq = 9) is a 16450
> Only one port detected and the UART appears to be incorrect.  I used 
> setserial to change it to 16950 but had the same non-working results. 

... which rather agrees with what the autodetection code thought of the
device - it tried various features found on the 16550 devices, found them
missing, so decided it was a 16450.  To put it another way, we tried to
enable the FIFO, the chip reported no FIFO.  We tried to test the scratch
register, which passed. That means it behaves like a 16450, so we drive
it as if it's a 16450.

Telling the serial code that it has a chip with more features than it
autodetected will always result in failure.

> laptop # lspcmcia -v
> Socket 0 Bridge:        [yenta_cardbus]         (bus ID: 0000:01:00.0)
>          Configuration:  state: on       ready: yes
>                          Voltage: 3.3V Vcc: 3.3V Vpp: 0.0V
> Socket 0 Device 0:      [serial_cs]             (bus ID: 0.0)
>          Configuration:  state: on
>          Product Name:   PC CARD GENERIC
>          Identification: manf_id: 0x0279 card_id: 0x950b
>                          function: 2 (serial)
>                          prod_id(1): "PC CARD" (0x6a1d140a)
>                          prod_id(2): "GENERIC" (0x346680b7)
>                          prod_id(3): --- (---)
>                          prod_id(4): --- (---)
> Socket 1 Bridge:        [yenta_cardbus]         (bus ID: 0000:01:00.1)
>          Configuration:  state: on       ready: yes
> Nothing appears in lspci output for this card.

... which is what you'd expect from a PCMCIA card (not a Cardbus card.)
The card you report above _is_ a PCMCIA card, not a Cardbus card.  The
IDs correspond with an OXCF950, but for some reason it refuses to detect
as an OXCF950.

Maybe there's a IO port resource clash?  Have you tried reconfiguring
the IO ranges to avoid 0x3108-0x310f?  (Don't ask me how to do that with
the new fangled kernel PCMCIA stuff.)

>  From the mailing list archives is this thread which seems similar to my 
> problem (a different card):

Well, the patch for that is below - but it won't do you any good because
your card won't match this.  As I said back then, OXCF950 devices are
rather troublesome because they're fitted with a variety of different
crystals, resulting in different baud bases.  Unless you know that
information, you have to spend some quality time with the card to try
and persuade it to work.

diff --git a/drivers/serial/serial_cs.c b/drivers/serial/serial_cs.c
index 164d2a4..79ce481 100644
--- a/drivers/serial/serial_cs.c
+++ b/drivers/serial/serial_cs.c
@@ -161,6 +161,17 @@ static void quirk_wakeup_oxsemi(struct pcmcia_device *link)
 	outb(12, info->c950ctrl + 1);
+ * "CDMA" "CARD_A".  Seems to have a non-standard clock rate of 15.36MHz
+ * and initially communicates at 230400 baud (confirmed by AT+IPR=?). --rmk
+ */
+static void quirk_setup_oxsemi(struct pcmcia_device *link, struct uart_port *port)
+	if (link->prod_id[0] && strcmp(link->prod_id[0], "CDMA") &&
+	    link->prod_id[1] && strcmp(link->prod_id[1], "CARD_A"))
+		port->uartclk = 15360000;
 /* request_region? oxsemi branch does no request_region too... */
  * This sequence is needed to properly initialize MC45 attached to OXCF950.
@@ -233,6 +244,7 @@ static const struct serial_quirk quirks[] = {
 		.prodid	= ~0,
 		.multi	= -1,
 		.wakeup	= quirk_wakeup_oxsemi,
+		.setup	= quirk_setup_oxsemi,
 	}, {
 		.manfid	= MANFID_POSSIO,
 		.prodid	= PRODID_POSSIO_GCC,

Russell King
 Linux kernel    2.6 ARM Linux   -
 maintainer of:

More information about the linux-pcmcia mailing list