1 --- a/drivers/serial/Kconfig
2 +++ b/drivers/serial/Kconfig
5 Support for Console on the NWP serial ports.
8 + bool "Lantiq serial driver"
11 + select SERIAL_CORE_CONSOLE
13 + Driver for the Lantiq SoC ASC hardware
16 tristate "Freescale QUICC Engine serial port support"
17 depends on QUICC_ENGINE
18 --- a/drivers/serial/Makefile
19 +++ b/drivers/serial/Makefile
21 obj-$(CONFIG_SERIAL_MRST_MAX3110) += mrst_max3110.o
22 obj-$(CONFIG_SERIAL_MFD_HSU) += mfd.o
23 obj-$(CONFIG_SERIAL_OMAP) += omap-serial.o
24 +obj-$(CONFIG_SERIAL_LANTIQ) += lantiq.o
26 +++ b/drivers/serial/lantiq.c
29 + * Based on drivers/char/serial.c, by Linus Torvalds, Theodore Ts'o.
31 + * This program is free software; you can redistribute it and/or modify it
32 + * under the terms of the GNU General Public License version 2 as published
33 + * by the Free Software Foundation.
35 + * This program is distributed in the hope that it will be useful,
36 + * but WITHOUT ANY WARRANTY; without even the implied warranty of
37 + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
38 + * GNU General Public License for more details.
40 + * You should have received a copy of the GNU General Public License
41 + * along with this program; if not, write to the Free Software
42 + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
44 + * Copyright (C) 2004 Infineon IFAP DC COM CPE
45 + * Copyright (C) 2007 Felix Fietkau <nbd@openwrt.org>
46 + * Copyright (C) 2007 John Crispin <blogic@openwrt.org>
47 + * Copyright (C) 2010 Thomas Langer, Lantiq Deutschland
50 +#include <linux/slab.h>
51 +#include <linux/module.h>
52 +#include <linux/ioport.h>
53 +#include <linux/init.h>
54 +#include <linux/console.h>
55 +#include <linux/sysrq.h>
56 +#include <linux/device.h>
57 +#include <linux/tty.h>
58 +#include <linux/tty_flip.h>
59 +#include <linux/serial_core.h>
60 +#include <linux/serial.h>
61 +#include <linux/platform_device.h>
62 +#include <linux/io.h>
63 +#include <linux/clk.h>
65 +#define lq_r32(reg) __raw_readl(reg)
66 +#define lq_r8(reg) __raw_readb(reg)
67 +#define lq_w32(val, reg) __raw_writel(val, reg)
68 +#define lq_w8(val, reg) __raw_writeb(val, reg)
69 +#define lq_w32_mask(clear, set, reg) lq_w32((lq_r32(reg) & ~(clear)) | (set), reg)
71 +#define PORT_IFXMIPSASC 111
74 +#define UART_DUMMY_UER_RX 1
76 +#define DRVNAME "lq_asc"
79 +#define IFXMIPS_ASC_TBUF (0x0020 + 3)
80 +#define IFXMIPS_ASC_RBUF (0x0024 + 3)
82 +#define IFXMIPS_ASC_TBUF 0x0020
83 +#define IFXMIPS_ASC_RBUF 0x0024
86 +#define IFXMIPS_ASC_FSTAT 0x0048
87 +#define IFXMIPS_ASC_WHBSTATE 0x0018
88 +#define IFXMIPS_ASC_STATE 0x0014
89 +#define IFXMIPS_ASC_IRNCR 0x00F8
90 +#define IFXMIPS_ASC_CLC 0x0000
91 +#define IFXMIPS_ASC_ID 0x0008
92 +#define IFXMIPS_ASC_PISEL 0x0004
93 +#define IFXMIPS_ASC_TXFCON 0x0044
94 +#define IFXMIPS_ASC_RXFCON 0x0040
95 +#define IFXMIPS_ASC_CON 0x0010
96 +#define IFXMIPS_ASC_BG 0x0050
97 +#define IFXMIPS_ASC_IRNREN 0x00F4
99 +#define ASC_IRNREN_TX 0x1
100 +#define ASC_IRNREN_RX 0x2
101 +#define ASC_IRNREN_ERR 0x4
102 +#define ASC_IRNREN_TX_BUF 0x8
103 +#define ASC_IRNCR_TIR 0x1
104 +#define ASC_IRNCR_RIR 0x2
105 +#define ASC_IRNCR_EIR 0x4
107 +#define ASCOPT_CSIZE 0x3
108 +#define ASCOPT_CS7 0x1
109 +#define ASCOPT_CS8 0x2
110 +#define ASCOPT_PARENB 0x4
111 +#define ASCOPT_STOPB 0x8
112 +#define ASCOPT_PARODD 0x0
113 +#define ASCOPT_CREAD 0x20
116 +#define ASCCLC_DISS 0x2
117 +#define ASCCLC_RMCMASK 0x0000FF00
118 +#define ASCCLC_RMCOFFSET 8
119 +#define ASCCON_M_8ASYNC 0x0
120 +#define ASCCON_M_7ASYNC 0x2
121 +#define ASCCON_ODD 0x00000020
122 +#define ASCCON_STP 0x00000080
123 +#define ASCCON_BRS 0x00000100
124 +#define ASCCON_FDE 0x00000200
125 +#define ASCCON_R 0x00008000
126 +#define ASCCON_FEN 0x00020000
127 +#define ASCCON_ROEN 0x00080000
128 +#define ASCCON_TOEN 0x00100000
129 +#define ASCSTATE_PE 0x00010000
130 +#define ASCSTATE_FE 0x00020000
131 +#define ASCSTATE_ROE 0x00080000
132 +#define ASCSTATE_ANY (ASCSTATE_ROE|ASCSTATE_PE|ASCSTATE_FE)
133 +#define ASCWHBSTATE_CLRREN 0x00000001
134 +#define ASCWHBSTATE_SETREN 0x00000002
135 +#define ASCWHBSTATE_CLRPE 0x00000004
136 +#define ASCWHBSTATE_CLRFE 0x00000008
137 +#define ASCWHBSTATE_CLRROE 0x00000020
138 +#define ASCTXFCON_TXFEN 0x0001
139 +#define ASCTXFCON_TXFFLU 0x0002
140 +#define ASCTXFCON_TXFITLMASK 0x3F00
141 +#define ASCTXFCON_TXFITLOFF 8
142 +#define ASCRXFCON_RXFEN 0x0001
143 +#define ASCRXFCON_RXFFLU 0x0002
144 +#define ASCRXFCON_RXFITLMASK 0x3F00
145 +#define ASCRXFCON_RXFITLOFF 8
146 +#define ASCFSTAT_RXFFLMASK 0x003F
147 +#define ASCFSTAT_TXFFLMASK 0x3F00
148 +#define ASCFSTAT_TXFFLOFF 8
149 +#define ASCFSTAT_RXFREEMASK 0x003F0000
150 +#define ASCFSTAT_RXFREEOFF 16
151 +#define ASCFSTAT_TXFREEMASK 0x3F000000
152 +#define ASCFSTAT_TXFREEOFF 24
154 +static void lqasc_tx_chars(struct uart_port *port);
155 +extern void prom_printf(const char *fmt, ...);
156 +static struct lq_uart_port *lqasc_port[2];
157 +static struct uart_driver lqasc_reg;
159 +struct lq_uart_port {
160 + struct uart_port port;
162 + unsigned int tx_irq;
163 + unsigned int rx_irq;
164 + unsigned int err_irq;
167 +static inline struct
168 +lq_uart_port *to_lq_uart_port(struct uart_port *port)
170 + return container_of(port, struct lq_uart_port, port);
174 +lqasc_stop_tx(struct uart_port *port)
180 +lqasc_start_tx(struct uart_port *port)
182 + unsigned long flags;
183 + local_irq_save(flags);
184 + lqasc_tx_chars(port);
185 + local_irq_restore(flags);
190 +lqasc_stop_rx(struct uart_port *port)
192 + lq_w32(ASCWHBSTATE_CLRREN, port->membase + IFXMIPS_ASC_WHBSTATE);
196 +lqasc_enable_ms(struct uart_port *port)
201 +lqasc_rx_chars(struct uart_port *port)
203 + struct tty_struct *tty = port->state->port.tty;
204 + unsigned int ch = 0, rsr = 0, fifocnt;
206 + fifocnt = lq_r32(port->membase + IFXMIPS_ASC_FSTAT) & ASCFSTAT_RXFFLMASK;
207 + while (fifocnt--) {
208 + u8 flag = TTY_NORMAL;
209 + ch = lq_r8(port->membase + IFXMIPS_ASC_RBUF);
210 + rsr = (lq_r32(port->membase + IFXMIPS_ASC_STATE)
211 + & ASCSTATE_ANY) | UART_DUMMY_UER_RX;
212 + tty_flip_buffer_push(tty);
216 + * Note that the error handling code is
217 + * out of the main execution path
219 + if (rsr & ASCSTATE_ANY) {
220 + if (rsr & ASCSTATE_PE) {
221 + port->icount.parity++;
222 + lq_w32_mask(0, ASCWHBSTATE_CLRPE,
223 + port->membase + IFXMIPS_ASC_WHBSTATE);
224 + } else if (rsr & ASCSTATE_FE) {
225 + port->icount.frame++;
226 + lq_w32_mask(0, ASCWHBSTATE_CLRFE,
227 + port->membase + IFXMIPS_ASC_WHBSTATE);
229 + if (rsr & ASCSTATE_ROE) {
230 + port->icount.overrun++;
231 + lq_w32_mask(0, ASCWHBSTATE_CLRROE,
232 + port->membase + IFXMIPS_ASC_WHBSTATE);
235 + rsr &= port->read_status_mask;
237 + if (rsr & ASCSTATE_PE)
239 + else if (rsr & ASCSTATE_FE)
243 + if ((rsr & port->ignore_status_mask) == 0)
244 + tty_insert_flip_char(tty, ch, flag);
246 + if (rsr & ASCSTATE_ROE)
248 + * Overrun is special, since it's reported
249 + * immediately, and doesn't affect the current
252 + tty_insert_flip_char(tty, 0, TTY_OVERRUN);
255 + tty_flip_buffer_push(tty);
260 +lqasc_tx_chars(struct uart_port *port)
262 + struct circ_buf *xmit = &port->state->xmit;
263 + if (uart_tx_stopped(port)) {
264 + lqasc_stop_tx(port);
268 + while (((lq_r32(port->membase + IFXMIPS_ASC_FSTAT) &
269 + ASCFSTAT_TXFREEMASK) >> ASCFSTAT_TXFREEOFF) != 0) {
270 + if (port->x_char) {
271 + lq_w8(port->x_char, port->membase + IFXMIPS_ASC_TBUF);
277 + if (uart_circ_empty(xmit))
280 + lq_w8(port->state->xmit.buf[port->state->xmit.tail],
281 + port->membase + IFXMIPS_ASC_TBUF);
282 + xmit->tail = (xmit->tail + 1) & (UART_XMIT_SIZE - 1);
286 + if (uart_circ_chars_pending(xmit) < WAKEUP_CHARS)
287 + uart_write_wakeup(port);
291 +lqasc_tx_int(int irq, void *_port)
293 + struct uart_port *port = (struct uart_port *)_port;
294 + lq_w32(ASC_IRNCR_TIR, port->membase + IFXMIPS_ASC_IRNCR);
295 + lqasc_start_tx(port);
296 + return IRQ_HANDLED;
300 +lqasc_err_int(int irq, void *_port)
302 + struct uart_port *port = (struct uart_port *)_port;
303 + /* clear any pending interrupts */
304 + lq_w32_mask(0, ASCWHBSTATE_CLRPE | ASCWHBSTATE_CLRFE | ASCWHBSTATE_CLRROE,
305 + port->membase + IFXMIPS_ASC_WHBSTATE);
306 + return IRQ_HANDLED;
310 +lqasc_rx_int(int irq, void *_port)
312 + struct uart_port *port = (struct uart_port *)_port;
313 + lq_w32(ASC_IRNCR_RIR, port->membase + IFXMIPS_ASC_IRNCR);
314 + lqasc_rx_chars(port);
315 + return IRQ_HANDLED;
319 +lqasc_tx_empty(struct uart_port *port)
322 + status = lq_r32(port->membase + IFXMIPS_ASC_FSTAT) & ASCFSTAT_TXFFLMASK;
323 + return status ? 0 : TIOCSER_TEMT;
327 +lqasc_get_mctrl(struct uart_port *port)
329 + return TIOCM_CTS | TIOCM_CAR | TIOCM_DSR;
333 +lqasc_set_mctrl(struct uart_port *port, u_int mctrl)
338 +lqasc_break_ctl(struct uart_port *port, int break_state)
343 +lqasc_startup(struct uart_port *port)
345 + struct lq_uart_port *ifx_port = to_lq_uart_port(port);
348 + port->uartclk = clk_get_rate(ifx_port->clk);
350 + lq_w32_mask(ASCCLC_DISS | ASCCLC_RMCMASK, (1 << ASCCLC_RMCOFFSET),
351 + port->membase + IFXMIPS_ASC_CLC);
353 + lq_w32(0, port->membase + IFXMIPS_ASC_PISEL);
355 + ((TXFIFO_FL << ASCTXFCON_TXFITLOFF) & ASCTXFCON_TXFITLMASK) |
356 + ASCTXFCON_TXFEN | ASCTXFCON_TXFFLU,
357 + port->membase + IFXMIPS_ASC_TXFCON);
359 + ((RXFIFO_FL << ASCRXFCON_RXFITLOFF) & ASCRXFCON_RXFITLMASK)
360 + | ASCRXFCON_RXFEN | ASCRXFCON_RXFFLU,
361 + port->membase + IFXMIPS_ASC_RXFCON);
362 + /* make sure other settings are written to hardware before setting enable bits */
364 + lq_w32_mask(0, ASCCON_M_8ASYNC | ASCCON_FEN | ASCCON_TOEN |
365 + ASCCON_ROEN, port->membase + IFXMIPS_ASC_CON);
367 + retval = request_irq(ifx_port->tx_irq, lqasc_tx_int,
368 + IRQF_DISABLED, "asc_tx", port);
370 + pr_err("failed to request lqasc_tx_int\n");
374 + retval = request_irq(ifx_port->rx_irq, lqasc_rx_int,
375 + IRQF_DISABLED, "asc_rx", port);
377 + pr_err("failed to request lqasc_rx_int\n");
381 + retval = request_irq(ifx_port->err_irq, lqasc_err_int,
382 + IRQF_DISABLED, "asc_err", port);
384 + pr_err("failed to request lqasc_err_int\n");
388 + lq_w32(ASC_IRNREN_RX | ASC_IRNREN_ERR | ASC_IRNREN_TX,
389 + port->membase + IFXMIPS_ASC_IRNREN);
393 + free_irq(ifx_port->rx_irq, port);
395 + free_irq(ifx_port->tx_irq, port);
400 +lqasc_shutdown(struct uart_port *port)
402 + struct lq_uart_port *ifx_port = to_lq_uart_port(port);
403 + free_irq(ifx_port->tx_irq, port);
404 + free_irq(ifx_port->rx_irq, port);
405 + free_irq(ifx_port->err_irq, port);
407 + lq_w32(0, port->membase + IFXMIPS_ASC_CON);
408 + lq_w32_mask(ASCRXFCON_RXFEN, ASCRXFCON_RXFFLU,
409 + port->membase + IFXMIPS_ASC_RXFCON);
410 + lq_w32_mask(ASCTXFCON_TXFEN, ASCTXFCON_TXFFLU,
411 + port->membase + IFXMIPS_ASC_TXFCON);
415 +lqasc_set_termios(struct uart_port *port,
416 + struct ktermios *new, struct ktermios *old)
418 + unsigned int cflag;
419 + unsigned int iflag;
422 + unsigned int con = 0;
423 + unsigned long flags;
425 + cflag = new->c_cflag;
426 + iflag = new->c_iflag;
428 + switch (cflag & CSIZE) {
430 + con = ASCCON_M_7ASYNC;
436 + con = ASCCON_M_8ASYNC;
440 + if (cflag & CSTOPB)
443 + if (cflag & PARENB) {
444 + if (!(cflag & PARODD))
445 + con &= ~ASCCON_ODD;
450 + port->read_status_mask = ASCSTATE_ROE;
452 + port->read_status_mask |= ASCSTATE_FE | ASCSTATE_PE;
454 + port->ignore_status_mask = 0;
455 + if (iflag & IGNPAR)
456 + port->ignore_status_mask |= ASCSTATE_FE | ASCSTATE_PE;
458 + if (iflag & IGNBRK) {
460 + * If we're ignoring parity and break indicators,
461 + * ignore overruns too (for real raw support).
463 + if (iflag & IGNPAR)
464 + port->ignore_status_mask |= ASCSTATE_ROE;
467 + if ((cflag & CREAD) == 0)
468 + port->ignore_status_mask |= UART_DUMMY_UER_RX;
470 + /* set error signals - framing, parity and overrun, enable receiver */
471 + con |= ASCCON_FEN | ASCCON_TOEN | ASCCON_ROEN;
473 + local_irq_save(flags);
476 + lq_w32_mask(0, con, port->membase + IFXMIPS_ASC_CON);
478 + /* Set baud rate - take a divider of 2 into account */
479 + baud = uart_get_baud_rate(port, new, old, 0, port->uartclk / 16);
480 + quot = uart_get_divisor(port, baud);
481 + quot = quot / 2 - 1;
483 + /* disable the baudrate generator */
484 + lq_w32_mask(ASCCON_R, 0, port->membase + IFXMIPS_ASC_CON);
486 + /* make sure the fractional divider is off */
487 + lq_w32_mask(ASCCON_FDE, 0, port->membase + IFXMIPS_ASC_CON);
489 + /* set up to use divisor of 2 */
490 + lq_w32_mask(ASCCON_BRS, 0, port->membase + IFXMIPS_ASC_CON);
492 + /* now we can write the new baudrate into the register */
493 + lq_w32(quot, port->membase + IFXMIPS_ASC_BG);
495 + /* turn the baudrate generator back on */
496 + lq_w32_mask(0, ASCCON_R, port->membase + IFXMIPS_ASC_CON);
499 + lq_w32(ASCWHBSTATE_SETREN, port->membase + IFXMIPS_ASC_WHBSTATE);
501 + local_irq_restore(flags);
505 +lqasc_type(struct uart_port *port)
507 + if (port->type == PORT_IFXMIPSASC)
514 +lqasc_release_port(struct uart_port *port)
516 + if (port->flags & UPF_IOREMAP) {
517 + iounmap(port->membase);
518 + port->membase = NULL;
523 +lqasc_request_port(struct uart_port *port)
525 + struct platform_device *pdev = to_platform_device(port->dev);
526 + struct resource *mmres;
529 + mmres = platform_get_resource(pdev, IORESOURCE_MEM, 0);
532 + size = resource_size(mmres);
534 + if (port->flags & UPF_IOREMAP) {
535 + port->membase = ioremap_nocache(port->mapbase, size);
536 + if (port->membase == NULL)
543 +lqasc_config_port(struct uart_port *port, int flags)
545 + if (flags & UART_CONFIG_TYPE) {
546 + port->type = PORT_IFXMIPSASC;
547 + lqasc_request_port(port);
552 +lqasc_verify_port(struct uart_port *port,
553 + struct serial_struct *ser)
556 + if (ser->type != PORT_UNKNOWN && ser->type != PORT_IFXMIPSASC)
558 + if (ser->irq < 0 || ser->irq >= NR_IRQS)
560 + if (ser->baud_base < 9600)
565 +static struct uart_ops lqasc_pops = {
566 + .tx_empty = lqasc_tx_empty,
567 + .set_mctrl = lqasc_set_mctrl,
568 + .get_mctrl = lqasc_get_mctrl,
569 + .stop_tx = lqasc_stop_tx,
570 + .start_tx = lqasc_start_tx,
571 + .stop_rx = lqasc_stop_rx,
572 + .enable_ms = lqasc_enable_ms,
573 + .break_ctl = lqasc_break_ctl,
574 + .startup = lqasc_startup,
575 + .shutdown = lqasc_shutdown,
576 + .set_termios = lqasc_set_termios,
577 + .type = lqasc_type,
578 + .release_port = lqasc_release_port,
579 + .request_port = lqasc_request_port,
580 + .config_port = lqasc_config_port,
581 + .verify_port = lqasc_verify_port,
585 +lqasc_console_putchar(struct uart_port *port, int ch)
589 + if (!port->membase)
593 + fifofree = (lq_r32(port->membase + IFXMIPS_ASC_FSTAT)
594 + & ASCFSTAT_TXFREEMASK) >> ASCFSTAT_TXFREEOFF;
595 + } while (fifofree == 0);
596 + lq_w8(ch, port->membase + IFXMIPS_ASC_TBUF);
601 +lqasc_console_write(struct console *co, const char *s, u_int count)
603 + struct lq_uart_port *ifx_port;
604 + struct uart_port *port;
605 + unsigned long flags;
607 + if (co->index >= MAXPORTS)
610 + ifx_port = lqasc_port[co->index];
614 + port = &ifx_port->port;
616 + local_irq_save(flags);
617 + uart_console_write(port, s, count, lqasc_console_putchar);
618 + local_irq_restore(flags);
622 +lqasc_console_setup(struct console *co, char *options)
624 + struct lq_uart_port *ifx_port;
625 + struct uart_port *port;
631 + if (co->index >= MAXPORTS)
634 + ifx_port = lqasc_port[co->index];
638 + port = &ifx_port->port;
640 + port->uartclk = clk_get_rate(ifx_port->clk);
643 + uart_parse_options(options, &baud, &parity, &bits, &flow);
644 + return uart_set_options(port, co, baud, parity, bits, flow);
647 +static struct console lqasc_console = {
649 + .write = lqasc_console_write,
650 + .device = uart_console_device,
651 + .setup = lqasc_console_setup,
652 + .flags = CON_PRINTBUFFER,
654 + .data = &lqasc_reg,
658 +lqasc_console_init(void)
660 + register_console(&lqasc_console);
663 +console_initcall(lqasc_console_init);
665 +static struct uart_driver lqasc_reg = {
666 + .owner = THIS_MODULE,
667 + .driver_name = DRVNAME,
668 + .dev_name = "ttyS",
669 + .major = TTY_MAJOR,
672 + .cons = &lqasc_console,
675 +static int __devinit
676 +lqasc_probe(struct platform_device *pdev)
678 + struct lq_uart_port *ifx_port;
679 + struct uart_port *port;
680 + struct resource *mmres, *irqres;
681 + int tx_irq, rx_irq, err_irq;
685 + mmres = platform_get_resource(pdev, IORESOURCE_MEM, 0);
686 + irqres = platform_get_resource(pdev, IORESOURCE_IRQ, 0);
687 + if (!mmres || !irqres)
690 + if (pdev->id >= MAXPORTS)
693 + if (lqasc_port[pdev->id] != NULL)
696 + clk = clk_get(&pdev->dev, "fpi");
698 + pr_err("failed to get fpi clk\n");
702 + tx_irq = platform_get_irq_byname(pdev, "tx");
704 + /* without named resources: assume standard irq scheme */
705 + tx_irq = irqres->start;
706 + rx_irq = irqres->start+2;
707 + err_irq = irqres->start+3;
709 + /* other irqs must be named also! */
710 + rx_irq = platform_get_irq_byname(pdev, "rx");
711 + err_irq = platform_get_irq_byname(pdev, "err");
712 + if ((rx_irq < 0) | (err_irq < 0))
716 + ifx_port = kzalloc(sizeof(struct lq_uart_port), GFP_KERNEL);
720 + port = &ifx_port->port;
722 + port->iotype = SERIAL_IO_MEM;
723 + port->flags = ASYNC_BOOT_AUTOCONF | UPF_IOREMAP;
724 + port->ops = &lqasc_pops;
725 + port->fifosize = 16;
726 + port->type = PORT_IFXMIPSASC,
727 + port->line = pdev->id;
728 + port->dev = &pdev->dev;
730 + port->irq = tx_irq; /* unused, just to be backward-compatibe */
731 + port->mapbase = mmres->start;
733 + ifx_port->clk = clk;
735 + ifx_port->tx_irq = tx_irq;
736 + ifx_port->rx_irq = rx_irq;
737 + ifx_port->err_irq = err_irq;
739 + lqasc_port[pdev->id] = ifx_port;
740 + platform_set_drvdata(pdev, ifx_port);
742 + ret = uart_add_one_port(&lqasc_reg, port);
747 +static int __devexit
748 +lqasc_remove(struct platform_device *pdev)
750 + struct lq_uart_port *ifx_port = platform_get_drvdata(pdev);
753 + clk_put(ifx_port->clk);
754 + platform_set_drvdata(pdev, NULL);
755 + lqasc_port[pdev->id] = NULL;
756 + ret = uart_remove_one_port(&lqasc_reg, &ifx_port->port);
762 +static struct platform_driver lqasc_driver = {
763 + .probe = lqasc_probe,
764 + .remove = __devexit_p(lqasc_remove),
768 + .owner = THIS_MODULE,
777 + ret = uart_register_driver(&lqasc_reg);
781 + ret = platform_driver_register(&lqasc_driver);
783 + uart_unregister_driver(&lqasc_reg);
791 + platform_driver_unregister(&lqasc_driver);
792 + uart_unregister_driver(&lqasc_reg);
795 +module_init(init_lqasc);
796 +module_exit(exit_lqasc);
798 +MODULE_DESCRIPTION("Lantiq serial port driver");
799 +MODULE_LICENSE("GPL");