More meth updates.
[linux-2.6/linux-mips.git] / drivers / serial / uart00.c
blob0601bd634b7b69eeb9c686677f2903cd59072cdc
1 /*
2 * linux/drivers/serial/uart00.c
4 * Driver for UART00 serial ports
6 * Based on drivers/char/serial_amba.c, by ARM Limited &
7 * Deep Blue Solutions Ltd.
8 * Copyright 2001 Altera Corporation
10 * This program is free software; you can redistribute it and/or modify
11 * it under the terms of the GNU General Public License as published by
12 * the Free Software Foundation; either version 2 of the License, or
13 * (at your option) any later version.
15 * This program is distributed in the hope that it will be useful,
16 * but WITHOUT ANY WARRANTY; without even the implied warranty of
17 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
18 * GNU General Public License for more details.
20 * You should have received a copy of the GNU General Public License
21 * along with this program; if not, write to the Free Software
22 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
24 * $Id: uart00.c,v 1.35 2002/07/28 10:03:28 rmk Exp $
27 #include <linux/config.h>
28 #include <linux/module.h>
29 #include <linux/tty.h>
30 #include <linux/ioport.h>
31 #include <linux/init.h>
32 #include <linux/serial.h>
33 #include <linux/console.h>
34 #include <linux/sysrq.h>
35 #include <linux/pld/pld_hotswap.h>
37 #include <asm/io.h>
38 #include <asm/irq.h>
39 #include <asm/sizes.h>
41 #if defined(CONFIG_SERIAL_UART00_CONSOLE) && defined(CONFIG_MAGIC_SYSRQ)
42 #define SUPPORT_SYSRQ
43 #endif
45 #include <linux/serial_core.h>
46 #include <asm/arch/excalibur.h>
47 #define UART00_TYPE (volatile unsigned int*)
48 #include <asm/arch/uart00.h>
49 #include <asm/arch/int_ctrl00.h>
51 #define UART_NR 2
53 #define SERIAL_UART00_NAME "ttyUA"
54 #define SERIAL_UART00_MAJOR 204
55 #define SERIAL_UART00_MINOR 16 /* Temporary - will change in future */
56 #define SERIAL_UART00_NR UART_NR
57 #define UART_PORT_SIZE 0x50
59 #define UART00_ISR_PASS_LIMIT 256
62 * Access macros for the UART00 UARTs
64 #define UART_GET_INT_STATUS(p) inl(UART_ISR((p)->membase))
65 #define UART_PUT_IES(p, c) outl(c,UART_IES((p)->membase))
66 #define UART_GET_IES(p) inl(UART_IES((p)->membase))
67 #define UART_PUT_IEC(p, c) outl(c,UART_IEC((p)->membase))
68 #define UART_GET_IEC(p) inl(UART_IEC((p)->membase))
69 #define UART_PUT_CHAR(p, c) outl(c,UART_TD((p)->membase))
70 #define UART_GET_CHAR(p) inl(UART_RD((p)->membase))
71 #define UART_GET_RSR(p) inl(UART_RSR((p)->membase))
72 #define UART_GET_RDS(p) inl(UART_RDS((p)->membase))
73 #define UART_GET_MSR(p) inl(UART_MSR((p)->membase))
74 #define UART_GET_MCR(p) inl(UART_MCR((p)->membase))
75 #define UART_PUT_MCR(p, c) outl(c,UART_MCR((p)->membase))
76 #define UART_GET_MC(p) inl(UART_MC((p)->membase))
77 #define UART_PUT_MC(p, c) outl(c,UART_MC((p)->membase))
78 #define UART_GET_TSR(p) inl(UART_TSR((p)->membase))
79 #define UART_GET_DIV_HI(p) inl(UART_DIV_HI((p)->membase))
80 #define UART_PUT_DIV_HI(p,c) outl(c,UART_DIV_HI((p)->membase))
81 #define UART_GET_DIV_LO(p) inl(UART_DIV_LO((p)->membase))
82 #define UART_PUT_DIV_LO(p,c) outl(c,UART_DIV_LO((p)->membase))
83 #define UART_RX_DATA(s) ((s) & UART_RSR_RX_LEVEL_MSK)
84 #define UART_TX_READY(s) (((s) & UART_TSR_TX_LEVEL_MSK) < 15)
85 //#define UART_TX_EMPTY(p) ((UART_GET_FR(p) & UART00_UARTFR_TMSK) == 0)
87 static void uart00_stop_tx(struct uart_port *port, unsigned int tty_stop)
89 UART_PUT_IEC(port, UART_IEC_TIE_MSK);
92 static void uart00_stop_rx(struct uart_port *port)
94 UART_PUT_IEC(port, UART_IEC_RE_MSK);
97 static void uart00_enable_ms(struct uart_port *port)
99 UART_PUT_IES(port, UART_IES_ME_MSK);
102 static void
103 uart00_rx_chars(struct uart_port *port, struct pt_regs *regs)
105 struct tty_struct *tty = port->info->tty;
106 unsigned int status, ch, rds, flg, ignored = 0;
108 status = UART_GET_RSR(port);
109 while (UART_RX_DATA(status)) {
111 * We need to read rds before reading the
112 * character from the fifo
114 rds = UART_GET_RDS(port);
115 ch = UART_GET_CHAR(port);
116 port->icount.rx++;
118 if (tty->flip.count >= TTY_FLIPBUF_SIZE)
119 goto ignore_char;
121 flg = TTY_NORMAL;
124 * Note that the error handling code is
125 * out of the main execution path
127 if (rds & (UART_RDS_BI_MSK |UART_RDS_FE_MSK|
128 UART_RDS_PE_MSK |UART_RDS_PE_MSK))
129 goto handle_error;
130 if (uart_handle_sysrq_char(port, ch, regs))
131 goto ignore_char;
133 error_return:
134 *tty->flip.flag_buf_ptr++ = flg;
135 *tty->flip.char_buf_ptr++ = ch;
136 tty->flip.count++;
137 ignore_char:
138 status = UART_GET_RSR(port);
140 out:
141 tty_flip_buffer_push(tty);
142 return;
144 handle_error:
145 if (rds & UART_RDS_BI_MSK) {
146 status &= ~(UART_RDS_FE_MSK | UART_RDS_PE_MSK);
147 port->icount.brk++;
148 if (uart_handle_break(port))
149 goto ignore_char;
150 } else if (rds & UART_RDS_PE_MSK)
151 port->icount.parity++;
152 else if (rds & UART_RDS_FE_MSK)
153 port->icount.frame++;
154 if (rds & UART_RDS_OE_MSK)
155 port->icount.overrun++;
157 if (rds & port->ignore_status_mask) {
158 if (++ignored > 100)
159 goto out;
160 goto ignore_char;
162 rds &= port->read_status_mask;
164 if (rds & UART_RDS_BI_MSK)
165 flg = TTY_BREAK;
166 else if (rds & UART_RDS_PE_MSK)
167 flg = TTY_PARITY;
168 else if (rds & UART_RDS_FE_MSK)
169 flg = TTY_FRAME;
171 if (rds & UART_RDS_OE_MSK) {
173 * CHECK: does overrun affect the current character?
174 * ASSUMPTION: it does not.
176 *tty->flip.flag_buf_ptr++ = flg;
177 *tty->flip.char_buf_ptr++ = ch;
178 tty->flip.count++;
179 if (tty->flip.count >= TTY_FLIPBUF_SIZE)
180 goto ignore_char;
181 ch = 0;
182 flg = TTY_OVERRUN;
184 #ifdef SUPPORT_SYSRQ
185 port->sysrq = 0;
186 #endif
187 goto error_return;
190 static void uart00_tx_chars(struct uart_port *port)
192 struct circ_buf *xmit = &port->info->xmit;
193 int count;
195 if (port->x_char) {
196 while ((UART_GET_TSR(port) & UART_TSR_TX_LEVEL_MSK) == 15)
197 barrier();
198 UART_PUT_CHAR(port, port->x_char);
199 port->icount.tx++;
200 port->x_char = 0;
201 return;
203 if (uart_circ_empty(xmit) || uart_tx_stopped(port)) {
204 uart00_stop_tx(port, 0);
205 return;
208 count = port->fifosize >> 1;
209 do {
210 while ((UART_GET_TSR(port) & UART_TSR_TX_LEVEL_MSK) == 15)
211 barrier();
212 UART_PUT_CHAR(port, xmit->buf[xmit->tail]);
213 xmit->tail = (xmit->tail + 1) & (UART_XMIT_SIZE - 1);
214 port->icount.tx++;
215 if (uart_circ_empty(xmit))
216 break;
217 } while (--count > 0);
219 if (uart_circ_chars_pending(xmit) < WAKEUP_CHARS)
220 uart_write_wakeup(port);
222 if (uart_circ_empty(xmit))
223 uart00_stop_tx(port, 0);
226 static void uart00_start_tx(struct uart_port *port, unsigned int tty_start)
228 UART_PUT_IES(port, UART_IES_TIE_MSK);
229 uart00_tx_chars(port);
232 static void uart00_modem_status(struct uart_port *port)
234 unsigned int status;
236 status = UART_GET_MSR(port);
238 if (!(status & (UART_MSR_DCTS_MSK | UART_MSR_DDSR_MSK |
239 UART_MSR_TERI_MSK | UART_MSR_DDCD_MSK)))
240 return;
242 if (status & UART_MSR_DDCD_MSK)
243 uart_handle_dcd_change(port, status & UART_MSR_DCD_MSK);
245 if (status & UART_MSR_DDSR_MSK)
246 port->icount.dsr++;
248 if (status & UART_MSR_DCTS_MSK)
249 uart_handle_cts_change(port, status & UART_MSR_CTS_MSK);
251 wake_up_interruptible(&port->info->delta_msr_wait);
254 static void uart00_int(int irq, void *dev_id, struct pt_regs *regs)
256 struct uart_port *port = dev_id;
257 unsigned int status, pass_counter = 0;
259 status = UART_GET_INT_STATUS(port);
260 do {
261 if (status & UART_ISR_RI_MSK)
262 uart00_rx_chars(port, regs);
263 if (status & UART_ISR_MI_MSK)
264 uart00_modem_status(port);
265 if (status & (UART_ISR_TI_MSK | UART_ISR_TII_MSK))
266 uart00_tx_chars(port);
267 if (pass_counter++ > UART00_ISR_PASS_LIMIT)
268 break;
270 status = UART_GET_INT_STATUS(port);
271 } while (status);
274 static unsigned int uart00_tx_empty(struct uart_port *port)
276 return UART_GET_TSR(port) & UART_TSR_TX_LEVEL_MSK? 0 : TIOCSER_TEMT;
279 static unsigned int uart00_get_mctrl(struct uart_port *port)
281 unsigned int result = 0;
282 unsigned int status;
284 status = UART_GET_MSR(port);
285 if (status & UART_MSR_DCD_MSK)
286 result |= TIOCM_CAR;
287 if (status & UART_MSR_DSR_MSK)
288 result |= TIOCM_DSR;
289 if (status & UART_MSR_CTS_MSK)
290 result |= TIOCM_CTS;
291 if (status & UART_MSR_RI_MSK)
292 result |= TIOCM_RI;
294 return result;
297 static void uart00_set_mctrl_null(struct uart_port *port, unsigned int mctrl)
301 static void uart00_break_ctl(struct uart_port *port, int break_state)
303 unsigned long flags;
304 unsigned int mcr;
306 spin_lock_irqsave(&port->lock, flags);
307 mcr = UART_GET_MCR(port);
308 if (break_state == -1)
309 mcr |= UART_MCR_BR_MSK;
310 else
311 mcr &= ~UART_MCR_BR_MSK;
312 UART_PUT_MCR(port, mcr);
313 spin_unlock_irqrestore(&port->lock, flags);
316 static void
317 uart00_set_termios(struct uart_port *port, struct termios *termios,
318 struct termios *old)
320 unsigned int uart_mc, old_ies, baud, quot;
321 unsigned long flags;
324 * We don't support CREAD (yet)
326 termios->c_cflag |= CREAD;
329 * Ask the core to calculate the divisor for us.
331 baud = uart_get_baud_rate(port, termios, old, 0, port->uartclk/16);
332 quot = uart_get_divisor(port, baud);
334 /* byte size and parity */
335 switch (termios->c_cflag & CSIZE) {
336 case CS5:
337 uart_mc = UART_MC_CLS_CHARLEN_5;
338 break;
339 case CS6:
340 uart_mc = UART_MC_CLS_CHARLEN_6;
341 break;
342 case CS7:
343 uart_mc = UART_MC_CLS_CHARLEN_7;
344 break;
345 default: // CS8
346 uart_mc = UART_MC_CLS_CHARLEN_8;
347 break;
349 if (termios->c_cflag & CSTOPB)
350 uart_mc|= UART_MC_ST_TWO;
351 if (termios->c_cflag & PARENB) {
352 uart_mc |= UART_MC_PE_MSK;
353 if (!(termios->c_cflag & PARODD))
354 uart_mc |= UART_MC_EP_MSK;
357 spin_lock_irqsave(&port->lock, flags);
360 * Update the per-port timeout.
362 uart_update_timeout(port, termios->c_cflag, baud);
364 port->read_status_mask = UART_RDS_OE_MSK;
365 if (termios->c_iflag & INPCK)
366 port->read_status_mask |= UART_RDS_FE_MSK | UART_RDS_PE_MSK;
367 if (termios->c_iflag & (BRKINT | PARMRK))
368 port->read_status_mask |= UART_RDS_BI_MSK;
371 * Characters to ignore
373 port->ignore_status_mask = 0;
374 if (termios->c_iflag & IGNPAR)
375 port->ignore_status_mask |= UART_RDS_FE_MSK | UART_RDS_PE_MSK;
376 if (termios->c_iflag & IGNBRK) {
377 port->ignore_status_mask |= UART_RDS_BI_MSK;
379 * If we're ignoring parity and break indicators,
380 * ignore overruns to (for real raw support).
382 if (termios->c_iflag & IGNPAR)
383 port->ignore_status_mask |= UART_RDS_OE_MSK;
386 /* first, disable everything */
387 old_ies = UART_GET_IES(port);
389 if (UART_ENABLE_MS(port, termios->c_cflag))
390 old_ies |= UART_IES_ME_MSK;
392 /* Set baud rate */
393 UART_PUT_DIV_LO(port, (quot & 0xff));
394 UART_PUT_DIV_HI(port, ((quot & 0xf00) >> 8));
396 UART_PUT_MC(port, uart_mc);
397 UART_PUT_IES(port, old_ies);
399 spin_unlock_irqrestore(&port->lock, flags);
402 static int uart00_startup(struct uart_port *port)
404 int result;
407 * Allocate the IRQ
409 result = request_irq(port->irq, uart00_int, 0, "uart00", port);
410 if (result) {
411 printk(KERN_ERR "Request of irq %d failed\n", port->irq);
412 return result;
416 * Finally, enable interrupts. Use the TII interrupt to minimise
417 * the number of interrupts generated. If higher performance is
418 * needed, consider using the TI interrupt with a suitable FIFO
419 * threshold
421 UART_PUT_IES(port, UART_IES_RE_MSK | UART_IES_TIE_MSK);
423 return 0;
426 static void uart00_shutdown(struct uart_port *port)
429 * disable all interrupts, disable the port
431 UART_PUT_IEC(port, 0xff);
433 /* disable break condition and fifos */
434 UART_PUT_MCR(port, UART_GET_MCR(port) &~UART_MCR_BR_MSK);
437 * Free the interrupt
439 free_irq(port->irq, port);
442 static const char *uart00_type(struct uart_port *port)
444 return port->type == PORT_UART00 ? "Altera UART00" : NULL;
448 * Release the memory region(s) being used by 'port'
450 static void uart00_release_port(struct uart_port *port)
452 release_mem_region(port->mapbase, UART_PORT_SIZE);
454 #ifdef CONFIG_ARCH_CAMELOT
455 if (port->membase != (void*)IO_ADDRESS(EXC_UART00_BASE)) {
456 iounmap(port->membase);
458 #endif
462 * Request the memory region(s) being used by 'port'
464 static int uart00_request_port(struct uart_port *port)
466 return request_mem_region(port->mapbase, UART_PORT_SIZE, "serial_uart00")
467 != NULL ? 0 : -EBUSY;
471 * Configure/autoconfigure the port.
473 static void uart00_config_port(struct uart_port *port, int flags)
477 * Map the io memory if this is a soft uart
479 if (!port->membase)
480 port->membase = ioremap_nocache(port->mapbase,SZ_4K);
482 if (!port->membase)
483 printk(KERN_ERR "serial00: cannot map io memory\n");
484 else
485 port->type = PORT_UART00;
490 * verify the new serial_struct (for TIOCSSERIAL).
492 static int uart00_verify_port(struct uart_port *port, struct serial_struct *ser)
494 int ret = 0;
495 if (ser->type != PORT_UNKNOWN && ser->type != PORT_UART00)
496 ret = -EINVAL;
497 if (ser->irq < 0 || ser->irq >= NR_IRQS)
498 ret = -EINVAL;
499 if (ser->baud_base < 9600)
500 ret = -EINVAL;
501 return ret;
504 static struct uart_ops uart00_pops = {
505 .tx_empty = uart00_tx_empty,
506 .set_mctrl = uart00_set_mctrl_null,
507 .get_mctrl = uart00_get_mctrl,
508 .stop_tx = uart00_stop_tx,
509 .start_tx = uart00_start_tx,
510 .stop_rx = uart00_stop_rx,
511 .enable_ms = uart00_enable_ms,
512 .break_ctl = uart00_break_ctl,
513 .startup = uart00_startup,
514 .shutdown = uart00_shutdown,
515 .set_termios = uart00_set_termios,
516 .type = uart00_type,
517 .release_port = uart00_release_port,
518 .request_port = uart00_request_port,
519 .config_port = uart00_config_port,
520 .verify_port = uart00_verify_port,
524 #ifdef CONFIG_ARCH_CAMELOT
525 static struct uart_port epxa10db_port = {
526 .membase = (void*)IO_ADDRESS(EXC_UART00_BASE),
527 .mapbase = EXC_UART00_BASE,
528 .iotype = SERIAL_IO_MEM,
529 .irq = IRQ_UART,
530 .uartclk = EXC_AHB2_CLK_FREQUENCY,
531 .fifosize = 16,
532 .ops = &uart00_pops,
533 .flags = ASYNC_BOOT_AUTOCONF,
535 #endif
538 #ifdef CONFIG_SERIAL_UART00_CONSOLE
539 static void uart00_console_write(struct console *co, const char *s, unsigned count)
541 #ifdef CONFIG_ARCH_CAMELOT
542 struct uart_port *port = &epxa10db_port;
543 unsigned int status, old_ies;
544 int i;
547 * First save the CR then disable the interrupts
549 old_ies = UART_GET_IES(port);
550 UART_PUT_IEC(port,0xff);
553 * Now, do each character
555 for (i = 0; i < count; i++) {
556 do {
557 status = UART_GET_TSR(port);
558 } while (!UART_TX_READY(status));
559 UART_PUT_CHAR(port, s[i]);
560 if (s[i] == '\n') {
561 do {
562 status = UART_GET_TSR(port);
563 } while (!UART_TX_READY(status));
564 UART_PUT_CHAR(port, '\r');
569 * Finally, wait for transmitter to become empty
570 * and restore the IES
572 do {
573 status = UART_GET_TSR(port);
574 } while (status & UART_TSR_TX_LEVEL_MSK);
575 UART_PUT_IES(port, old_ies);
576 #endif
579 static void __init
580 uart00_console_get_options(struct uart_port *port, int *baud,
581 int *parity, int *bits)
583 unsigned int uart_mc, quot;
585 uart_mc = UART_GET_MC(port);
587 *parity = 'n';
588 if (uart_mc & UART_MC_PE_MSK) {
589 if (uart_mc & UART_MC_EP_MSK)
590 *parity = 'e';
591 else
592 *parity = 'o';
595 switch (uart_mc & UART_MC_CLS_MSK) {
596 case UART_MC_CLS_CHARLEN_5:
597 *bits = 5;
598 break;
599 case UART_MC_CLS_CHARLEN_6:
600 *bits = 6;
601 break;
602 case UART_MC_CLS_CHARLEN_7:
603 *bits = 7;
604 break;
605 case UART_MC_CLS_CHARLEN_8:
606 *bits = 8;
607 break;
609 quot = UART_GET_DIV_LO(port) | (UART_GET_DIV_HI(port) << 8);
610 *baud = port->uartclk / (16 *quot );
613 static int __init uart00_console_setup(struct console *co, char *options)
615 struct uart_port *port;
616 int baud = 38400;
617 int bits = 8;
618 int parity = 'n';
619 int flow = 'n';
621 #ifdef CONFIG_ARCH_CAMELOT
622 port = &epxa10db_port; ;
623 #else
624 return -ENODEV;
625 #endif
626 if (options)
627 uart_parse_options(options, &baud, &parity, &bits, &flow);
628 else
629 uart00_console_get_options(port, &baud, &parity, &bits);
631 return uart_set_options(port, co, baud, parity, bits, flow);
634 extern struct uart_driver uart00_reg;
635 static struct console uart00_console = {
636 .name = SERIAL_UART00_NAME,
637 .write = uart00_console_write,
638 .device = uart_console_device,
639 .setup = uart00_console_setup,
640 .flags = CON_PRINTBUFFER,
641 .index = 0,
642 .data = &uart00_reg;
645 static int __init uart00_console_init(void)
647 register_console(&uart00_console);
648 return 0;
650 console_initcall(uart00_console_init);
652 #define UART00_CONSOLE &uart00_console
653 #else
654 #define UART00_CONSOLE NULL
655 #endif
657 static struct uart_driver uart00_reg = {
658 .owner = NULL,
659 .driver_name = SERIAL_UART00_NAME,
660 .dev_name = SERIAL_UART00_NAME,
661 .major = SERIAL_UART00_MAJOR,
662 .minor = SERIAL_UART00_MINOR,
663 .nr = UART_NR,
664 .cons = UART00_CONSOLE,
667 struct dev_port_entry{
668 unsigned int base_addr;
669 struct uart_port *port;
672 static struct dev_port_entry dev_port_map[UART_NR];
674 #ifdef CONFIG_PLD_HOTSWAP
676 * Keep a mapping of dev_info addresses -> port lines to use when
677 * removing ports dev==NULL indicates unused entry
680 struct uart00_ps_data{
681 unsigned int clk;
682 unsigned int fifosize;
685 int uart00_add_device(struct pldhs_dev_info* dev_info, void* dev_ps_data)
687 struct uart00_ps_data* dev_ps=dev_ps_data;
688 struct uart_port * port;
689 int i,result;
691 i=0;
692 while(dev_port_map[i].port)
693 i++;
695 if(i==UART_NR){
696 printk(KERN_WARNING "uart00: Maximum number of ports reached\n");
697 return 0;
700 port=kmalloc(sizeof(struct uart_port),GFP_KERNEL);
701 if(!port)
702 return -ENOMEM;
704 printk("clk=%d fifo=%d\n",dev_ps->clk,dev_ps->fifosize);
705 port->membase=0;
706 port->mapbase=dev_info->base_addr;
707 port->iotype=SERIAL_IO_MEM;
708 port->irq=dev_info->irq;
709 port->uartclk=dev_ps->clk;
710 port->fifosize=dev_ps->fifosize;
711 port->ops=&uart00_pops;
712 port->line=i;
713 port->flags=ASYNC_BOOT_AUTOCONF;
715 result=uart_add_one_port(&uart00_reg, port);
716 if(result){
717 printk("uart_add_one_port returned %d\n",result);
718 return result;
720 dev_port_map[i].base_addr=dev_info->base_addr;
721 dev_port_map[i].port=port;
722 printk("uart00: added device at %x as ttyUA%d\n",dev_port_map[i].base_addr,i);
723 return 0;
727 int uart00_remove_devices(void)
729 int i,result;
732 result=0;
733 for(i=1;i<UART_NR;i++){
734 if(dev_port_map[i].base_addr){
735 result=uart_remove_one_port(&uart00_reg, dev_port_map[i].port);
736 if(result)
737 return result;
739 /* port removed sucessfully, so now tidy up */
740 kfree(dev_port_map[i].port);
741 dev_port_map[i].base_addr=0;
742 dev_port_map[i].port=NULL;
745 return 0;
749 struct pld_hotswap_ops uart00_pldhs_ops={
750 .name = "uart00",
751 .add_device = uart00_add_device,
752 .remove_devices = uart00_remove_devices,
755 #endif
757 static int __init uart00_init(void)
759 int result;
761 printk(KERN_INFO "Serial: UART00 driver $Revision: 1.35 $\n");
763 printk(KERN_WARNING "serial_uart00:Using temporary major/minor pairs"
764 " - these WILL change in the future\n");
766 result = uart_register_driver(&uart00_reg);
767 if (result)
768 return result;
769 #ifdef CONFIG_ARCH_CAMELOT
770 result = uart_add_one_port(&uart00_reg,&epxa10db_port);
771 #endif
772 if (result)
773 uart_unregister_driver(&uart00_reg);
775 #ifdef CONFIG_PLD_HOTSWAP
776 pldhs_register_driver(&uart00_pldhs_ops);
777 #endif
778 return result;
781 __initcall(uart00_init);