PCMCIA wireless CDMA card
Russell King
rmk+pcmcia at arm.linux.org.uk
Mon Feb 18 16:42:29 EST 2008
On Mon, Feb 18, 2008 at 09:00:34PM +0000, Russell King wrote:
> On Mon, Apr 16, 2007 at 12:54:58AM -0400, Brian Walsh wrote:
> > I have a CDMA wireless card which I am trying to bring up. However it does
> > not seem to be responding properly. When trying to minicom to the device
> > to get an AT response I just get a bunch of garbage in the terminal
> > suggesting to me that it is not talking at a valid baud rate.
>
> Right, finally, some news on these cards, thanks should go to Brian
> sending me his card (and appologies that I've not looked at it earlier.)
> They can be made to work by:
>
> # setserial $SERIAL_DEVICE baud_base 960000
>
> then talk to the card at 230400 and issue standard AT commands.
>
> Alternatively, the patch below sets the UART clock rate automatically.
> However, I'm not sure if its worth submitting into the kernel tree or
> not - are these cards current technology?
Replacement patch below.
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") == 0 &&
+ link->prod_id[1] && strcmp(link->prod_id[1], "CARD_A") == 0)
+ 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 - http://www.arm.linux.org.uk/
maintainer of:
More information about the linux-pcmcia
mailing list