apbuart.c 16 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710
  1. /*
  2. * Driver for GRLIB serial ports (APBUART)
  3. *
  4. * Based on linux/drivers/serial/amba.c
  5. *
  6. * Copyright (C) 2000 Deep Blue Solutions Ltd.
  7. * Copyright (C) 2003 Konrad Eisele <eiselekd@web.de>
  8. * Copyright (C) 2006 Daniel Hellstrom <daniel@gaisler.com>, Aeroflex Gaisler AB
  9. * Copyright (C) 2008 Gilead Kutnick <kutnickg@zin-tech.com>
  10. * Copyright (C) 2009 Kristoffer Glembo <kristoffer@gaisler.com>, Aeroflex Gaisler AB
  11. */
  12. #if defined(CONFIG_SERIAL_GRLIB_GAISLER_APBUART_CONSOLE) && defined(CONFIG_MAGIC_SYSRQ)
  13. #define SUPPORT_SYSRQ
  14. #endif
  15. #include <linux/module.h>
  16. #include <linux/tty.h>
  17. #include <linux/ioport.h>
  18. #include <linux/init.h>
  19. #include <linux/serial.h>
  20. #include <linux/console.h>
  21. #include <linux/sysrq.h>
  22. #include <linux/kthread.h>
  23. #include <linux/device.h>
  24. #include <linux/of.h>
  25. #include <linux/of_device.h>
  26. #include <linux/of_platform.h>
  27. #include <linux/platform_device.h>
  28. #include <linux/io.h>
  29. #include <linux/serial_core.h>
  30. #include <asm/irq.h>
  31. #include "apbuart.h"
  32. #define SERIAL_APBUART_MAJOR TTY_MAJOR
  33. #define SERIAL_APBUART_MINOR 64
  34. #define UART_DUMMY_RSR_RX 0x8000 /* for ignore all read */
  35. static void apbuart_tx_chars(struct uart_port *port);
  36. static void apbuart_stop_tx(struct uart_port *port)
  37. {
  38. unsigned int cr;
  39. cr = UART_GET_CTRL(port);
  40. cr &= ~UART_CTRL_TI;
  41. UART_PUT_CTRL(port, cr);
  42. }
  43. static void apbuart_start_tx(struct uart_port *port)
  44. {
  45. unsigned int cr;
  46. cr = UART_GET_CTRL(port);
  47. cr |= UART_CTRL_TI;
  48. UART_PUT_CTRL(port, cr);
  49. if (UART_GET_STATUS(port) & UART_STATUS_THE)
  50. apbuart_tx_chars(port);
  51. }
  52. static void apbuart_stop_rx(struct uart_port *port)
  53. {
  54. unsigned int cr;
  55. cr = UART_GET_CTRL(port);
  56. cr &= ~(UART_CTRL_RI);
  57. UART_PUT_CTRL(port, cr);
  58. }
  59. static void apbuart_enable_ms(struct uart_port *port)
  60. {
  61. /* No modem status change interrupts for APBUART */
  62. }
  63. static void apbuart_rx_chars(struct uart_port *port)
  64. {
  65. struct tty_struct *tty = port->state->port.tty;
  66. unsigned int status, ch, rsr, flag;
  67. unsigned int max_chars = port->fifosize;
  68. status = UART_GET_STATUS(port);
  69. while (UART_RX_DATA(status) && (max_chars--)) {
  70. ch = UART_GET_CHAR(port);
  71. flag = TTY_NORMAL;
  72. port->icount.rx++;
  73. rsr = UART_GET_STATUS(port) | UART_DUMMY_RSR_RX;
  74. UART_PUT_STATUS(port, 0);
  75. if (rsr & UART_STATUS_ERR) {
  76. if (rsr & UART_STATUS_BR) {
  77. rsr &= ~(UART_STATUS_FE | UART_STATUS_PE);
  78. port->icount.brk++;
  79. if (uart_handle_break(port))
  80. goto ignore_char;
  81. } else if (rsr & UART_STATUS_PE) {
  82. port->icount.parity++;
  83. } else if (rsr & UART_STATUS_FE) {
  84. port->icount.frame++;
  85. }
  86. if (rsr & UART_STATUS_OE)
  87. port->icount.overrun++;
  88. rsr &= port->read_status_mask;
  89. if (rsr & UART_STATUS_PE)
  90. flag = TTY_PARITY;
  91. else if (rsr & UART_STATUS_FE)
  92. flag = TTY_FRAME;
  93. }
  94. if (uart_handle_sysrq_char(port, ch))
  95. goto ignore_char;
  96. uart_insert_char(port, rsr, UART_STATUS_OE, ch, flag);
  97. ignore_char:
  98. status = UART_GET_STATUS(port);
  99. }
  100. tty_flip_buffer_push(tty);
  101. }
  102. static void apbuart_tx_chars(struct uart_port *port)
  103. {
  104. struct circ_buf *xmit = &port->state->xmit;
  105. int count;
  106. if (port->x_char) {
  107. UART_PUT_CHAR(port, port->x_char);
  108. port->icount.tx++;
  109. port->x_char = 0;
  110. return;
  111. }
  112. if (uart_circ_empty(xmit) || uart_tx_stopped(port)) {
  113. apbuart_stop_tx(port);
  114. return;
  115. }
  116. /* amba: fill FIFO */
  117. count = port->fifosize >> 1;
  118. do {
  119. UART_PUT_CHAR(port, xmit->buf[xmit->tail]);
  120. xmit->tail = (xmit->tail + 1) & (UART_XMIT_SIZE - 1);
  121. port->icount.tx++;
  122. if (uart_circ_empty(xmit))
  123. break;
  124. } while (--count > 0);
  125. if (uart_circ_chars_pending(xmit) < WAKEUP_CHARS)
  126. uart_write_wakeup(port);
  127. if (uart_circ_empty(xmit))
  128. apbuart_stop_tx(port);
  129. }
  130. static irqreturn_t apbuart_int(int irq, void *dev_id)
  131. {
  132. struct uart_port *port = dev_id;
  133. unsigned int status;
  134. spin_lock(&port->lock);
  135. status = UART_GET_STATUS(port);
  136. if (status & UART_STATUS_DR)
  137. apbuart_rx_chars(port);
  138. if (status & UART_STATUS_THE)
  139. apbuart_tx_chars(port);
  140. spin_unlock(&port->lock);
  141. return IRQ_HANDLED;
  142. }
  143. static unsigned int apbuart_tx_empty(struct uart_port *port)
  144. {
  145. unsigned int status = UART_GET_STATUS(port);
  146. return status & UART_STATUS_THE ? TIOCSER_TEMT : 0;
  147. }
  148. static unsigned int apbuart_get_mctrl(struct uart_port *port)
  149. {
  150. /* The GRLIB APBUART handles flow control in hardware */
  151. return TIOCM_CAR | TIOCM_DSR | TIOCM_CTS;
  152. }
  153. static void apbuart_set_mctrl(struct uart_port *port, unsigned int mctrl)
  154. {
  155. /* The GRLIB APBUART handles flow control in hardware */
  156. }
  157. static void apbuart_break_ctl(struct uart_port *port, int break_state)
  158. {
  159. /* We don't support sending break */
  160. }
  161. static int apbuart_startup(struct uart_port *port)
  162. {
  163. int retval;
  164. unsigned int cr;
  165. /* Allocate the IRQ */
  166. retval = request_irq(port->irq, apbuart_int, 0, "apbuart", port);
  167. if (retval)
  168. return retval;
  169. /* Finally, enable interrupts */
  170. cr = UART_GET_CTRL(port);
  171. UART_PUT_CTRL(port,
  172. cr | UART_CTRL_RE | UART_CTRL_TE |
  173. UART_CTRL_RI | UART_CTRL_TI);
  174. return 0;
  175. }
  176. static void apbuart_shutdown(struct uart_port *port)
  177. {
  178. unsigned int cr;
  179. /* disable all interrupts, disable the port */
  180. cr = UART_GET_CTRL(port);
  181. UART_PUT_CTRL(port,
  182. cr & ~(UART_CTRL_RE | UART_CTRL_TE |
  183. UART_CTRL_RI | UART_CTRL_TI));
  184. /* Free the interrupt */
  185. free_irq(port->irq, port);
  186. }
  187. static void apbuart_set_termios(struct uart_port *port,
  188. struct ktermios *termios, struct ktermios *old)
  189. {
  190. unsigned int cr;
  191. unsigned long flags;
  192. unsigned int baud, quot;
  193. /* Ask the core to calculate the divisor for us. */
  194. baud = uart_get_baud_rate(port, termios, old, 0, port->uartclk / 16);
  195. if (baud == 0)
  196. panic("invalid baudrate %i\n", port->uartclk / 16);
  197. /* uart_get_divisor calc a *16 uart freq, apbuart is *8 */
  198. quot = (uart_get_divisor(port, baud)) * 2;
  199. cr = UART_GET_CTRL(port);
  200. cr &= ~(UART_CTRL_PE | UART_CTRL_PS);
  201. if (termios->c_cflag & PARENB) {
  202. cr |= UART_CTRL_PE;
  203. if ((termios->c_cflag & PARODD))
  204. cr |= UART_CTRL_PS;
  205. }
  206. /* Enable flow control. */
  207. if (termios->c_cflag & CRTSCTS)
  208. cr |= UART_CTRL_FL;
  209. spin_lock_irqsave(&port->lock, flags);
  210. /* Update the per-port timeout. */
  211. uart_update_timeout(port, termios->c_cflag, baud);
  212. port->read_status_mask = UART_STATUS_OE;
  213. if (termios->c_iflag & INPCK)
  214. port->read_status_mask |= UART_STATUS_FE | UART_STATUS_PE;
  215. /* Characters to ignore */
  216. port->ignore_status_mask = 0;
  217. if (termios->c_iflag & IGNPAR)
  218. port->ignore_status_mask |= UART_STATUS_FE | UART_STATUS_PE;
  219. /* Ignore all characters if CREAD is not set. */
  220. if ((termios->c_cflag & CREAD) == 0)
  221. port->ignore_status_mask |= UART_DUMMY_RSR_RX;
  222. /* Set baud rate */
  223. quot -= 1;
  224. UART_PUT_SCAL(port, quot);
  225. UART_PUT_CTRL(port, cr);
  226. spin_unlock_irqrestore(&port->lock, flags);
  227. }
  228. static const char *apbuart_type(struct uart_port *port)
  229. {
  230. return port->type == PORT_APBUART ? "GRLIB/APBUART" : NULL;
  231. }
  232. static void apbuart_release_port(struct uart_port *port)
  233. {
  234. release_mem_region(port->mapbase, 0x100);
  235. }
  236. static int apbuart_request_port(struct uart_port *port)
  237. {
  238. return request_mem_region(port->mapbase, 0x100, "grlib-apbuart")
  239. != NULL ? 0 : -EBUSY;
  240. return 0;
  241. }
  242. /* Configure/autoconfigure the port */
  243. static void apbuart_config_port(struct uart_port *port, int flags)
  244. {
  245. if (flags & UART_CONFIG_TYPE) {
  246. port->type = PORT_APBUART;
  247. apbuart_request_port(port);
  248. }
  249. }
  250. /* Verify the new serial_struct (for TIOCSSERIAL) */
  251. static int apbuart_verify_port(struct uart_port *port,
  252. struct serial_struct *ser)
  253. {
  254. int ret = 0;
  255. if (ser->type != PORT_UNKNOWN && ser->type != PORT_APBUART)
  256. ret = -EINVAL;
  257. if (ser->irq < 0 || ser->irq >= NR_IRQS)
  258. ret = -EINVAL;
  259. if (ser->baud_base < 9600)
  260. ret = -EINVAL;
  261. return ret;
  262. }
  263. static struct uart_ops grlib_apbuart_ops = {
  264. .tx_empty = apbuart_tx_empty,
  265. .set_mctrl = apbuart_set_mctrl,
  266. .get_mctrl = apbuart_get_mctrl,
  267. .stop_tx = apbuart_stop_tx,
  268. .start_tx = apbuart_start_tx,
  269. .stop_rx = apbuart_stop_rx,
  270. .enable_ms = apbuart_enable_ms,
  271. .break_ctl = apbuart_break_ctl,
  272. .startup = apbuart_startup,
  273. .shutdown = apbuart_shutdown,
  274. .set_termios = apbuart_set_termios,
  275. .type = apbuart_type,
  276. .release_port = apbuart_release_port,
  277. .request_port = apbuart_request_port,
  278. .config_port = apbuart_config_port,
  279. .verify_port = apbuart_verify_port,
  280. };
  281. static struct uart_port grlib_apbuart_ports[UART_NR];
  282. static struct device_node *grlib_apbuart_nodes[UART_NR];
  283. static int apbuart_scan_fifo_size(struct uart_port *port, int portnumber)
  284. {
  285. int ctrl, loop = 0;
  286. int status;
  287. int fifosize;
  288. unsigned long flags;
  289. ctrl = UART_GET_CTRL(port);
  290. /*
  291. * Enable the transceiver and wait for it to be ready to send data.
  292. * Clear interrupts so that this process will not be externally
  293. * interrupted in the middle (which can cause the transceiver to
  294. * drain prematurely).
  295. */
  296. local_irq_save(flags);
  297. UART_PUT_CTRL(port, ctrl | UART_CTRL_TE);
  298. while (!UART_TX_READY(UART_GET_STATUS(port)))
  299. loop++;
  300. /*
  301. * Disable the transceiver so data isn't actually sent during the
  302. * actual test.
  303. */
  304. UART_PUT_CTRL(port, ctrl & ~(UART_CTRL_TE));
  305. fifosize = 1;
  306. UART_PUT_CHAR(port, 0);
  307. /*
  308. * So long as transmitting a character increments the tranceivier FIFO
  309. * length the FIFO must be at least that big. These bytes will
  310. * automatically drain off of the FIFO.
  311. */
  312. status = UART_GET_STATUS(port);
  313. while (((status >> 20) & 0x3F) == fifosize) {
  314. fifosize++;
  315. UART_PUT_CHAR(port, 0);
  316. status = UART_GET_STATUS(port);
  317. }
  318. fifosize--;
  319. UART_PUT_CTRL(port, ctrl);
  320. local_irq_restore(flags);
  321. if (fifosize == 0)
  322. fifosize = 1;
  323. return fifosize;
  324. }
  325. static void apbuart_flush_fifo(struct uart_port *port)
  326. {
  327. int i;
  328. for (i = 0; i < port->fifosize; i++)
  329. UART_GET_CHAR(port);
  330. }
  331. /* ======================================================================== */
  332. /* Console driver, if enabled */
  333. /* ======================================================================== */
  334. #ifdef CONFIG_SERIAL_GRLIB_GAISLER_APBUART_CONSOLE
  335. static void apbuart_console_putchar(struct uart_port *port, int ch)
  336. {
  337. unsigned int status;
  338. do {
  339. status = UART_GET_STATUS(port);
  340. } while (!UART_TX_READY(status));
  341. UART_PUT_CHAR(port, ch);
  342. }
  343. static void
  344. apbuart_console_write(struct console *co, const char *s, unsigned int count)
  345. {
  346. struct uart_port *port = &grlib_apbuart_ports[co->index];
  347. unsigned int status, old_cr, new_cr;
  348. /* First save the CR then disable the interrupts */
  349. old_cr = UART_GET_CTRL(port);
  350. new_cr = old_cr & ~(UART_CTRL_RI | UART_CTRL_TI);
  351. UART_PUT_CTRL(port, new_cr);
  352. uart_console_write(port, s, count, apbuart_console_putchar);
  353. /*
  354. * Finally, wait for transmitter to become empty
  355. * and restore the TCR
  356. */
  357. do {
  358. status = UART_GET_STATUS(port);
  359. } while (!UART_TX_READY(status));
  360. UART_PUT_CTRL(port, old_cr);
  361. }
  362. static void __init
  363. apbuart_console_get_options(struct uart_port *port, int *baud,
  364. int *parity, int *bits)
  365. {
  366. if (UART_GET_CTRL(port) & (UART_CTRL_RE | UART_CTRL_TE)) {
  367. unsigned int quot, status;
  368. status = UART_GET_STATUS(port);
  369. *parity = 'n';
  370. if (status & UART_CTRL_PE) {
  371. if ((status & UART_CTRL_PS) == 0)
  372. *parity = 'e';
  373. else
  374. *parity = 'o';
  375. }
  376. *bits = 8;
  377. quot = UART_GET_SCAL(port) / 8;
  378. *baud = port->uartclk / (16 * (quot + 1));
  379. }
  380. }
  381. static int __init apbuart_console_setup(struct console *co, char *options)
  382. {
  383. struct uart_port *port;
  384. int baud = 38400;
  385. int bits = 8;
  386. int parity = 'n';
  387. int flow = 'n';
  388. pr_debug("apbuart_console_setup co=%p, co->index=%i, options=%s\n",
  389. co, co->index, options);
  390. /*
  391. * Check whether an invalid uart number has been specified, and
  392. * if so, search for the first available port that does have
  393. * console support.
  394. */
  395. if (co->index >= grlib_apbuart_port_nr)
  396. co->index = 0;
  397. port = &grlib_apbuart_ports[co->index];
  398. spin_lock_init(&port->lock);
  399. if (options)
  400. uart_parse_options(options, &baud, &parity, &bits, &flow);
  401. else
  402. apbuart_console_get_options(port, &baud, &parity, &bits);
  403. return uart_set_options(port, co, baud, parity, bits, flow);
  404. }
  405. static struct uart_driver grlib_apbuart_driver;
  406. static struct console grlib_apbuart_console = {
  407. .name = "ttyS",
  408. .write = apbuart_console_write,
  409. .device = uart_console_device,
  410. .setup = apbuart_console_setup,
  411. .flags = CON_PRINTBUFFER,
  412. .index = -1,
  413. .data = &grlib_apbuart_driver,
  414. };
  415. static void grlib_apbuart_configure(void);
  416. static int __init apbuart_console_init(void)
  417. {
  418. grlib_apbuart_configure();
  419. register_console(&grlib_apbuart_console);
  420. return 0;
  421. }
  422. console_initcall(apbuart_console_init);
  423. #define APBUART_CONSOLE (&grlib_apbuart_console)
  424. #else
  425. #define APBUART_CONSOLE NULL
  426. #endif
  427. static struct uart_driver grlib_apbuart_driver = {
  428. .owner = THIS_MODULE,
  429. .driver_name = "serial",
  430. .dev_name = "ttyS",
  431. .major = SERIAL_APBUART_MAJOR,
  432. .minor = SERIAL_APBUART_MINOR,
  433. .nr = UART_NR,
  434. .cons = APBUART_CONSOLE,
  435. };
  436. /* ======================================================================== */
  437. /* OF Platform Driver */
  438. /* ======================================================================== */
  439. static int __devinit apbuart_probe(struct of_device *op,
  440. const struct of_device_id *match)
  441. {
  442. int i = -1;
  443. struct uart_port *port = NULL;
  444. i = 0;
  445. for (i = 0; i < grlib_apbuart_port_nr; i++) {
  446. if (op->node == grlib_apbuart_nodes[i])
  447. break;
  448. }
  449. port = &grlib_apbuart_ports[i];
  450. port->dev = &op->dev;
  451. uart_add_one_port(&grlib_apbuart_driver, (struct uart_port *) port);
  452. apbuart_flush_fifo((struct uart_port *) port);
  453. printk(KERN_INFO "grlib-apbuart at 0x%llx, irq %d\n",
  454. (unsigned long long) port->mapbase, port->irq);
  455. return 0;
  456. }
  457. static struct of_device_id __initdata apbuart_match[] = {
  458. {
  459. .name = "GAISLER_APBUART",
  460. },
  461. {},
  462. };
  463. static struct of_platform_driver grlib_apbuart_of_driver = {
  464. .match_table = apbuart_match,
  465. .probe = apbuart_probe,
  466. .driver = {
  467. .owner = THIS_MODULE,
  468. .name = "grlib-apbuart",
  469. },
  470. };
  471. static void grlib_apbuart_configure(void)
  472. {
  473. static int enum_done;
  474. struct device_node *np, *rp;
  475. struct uart_port *port = NULL;
  476. const u32 *prop;
  477. int freq_khz;
  478. int v = 0, d = 0;
  479. unsigned int addr;
  480. int irq, line;
  481. struct amba_prom_registers *regs;
  482. if (enum_done)
  483. return;
  484. /* Get bus frequency */
  485. rp = of_find_node_by_path("/");
  486. rp = of_get_next_child(rp, NULL);
  487. prop = of_get_property(rp, "clock-frequency", NULL);
  488. freq_khz = *prop;
  489. line = 0;
  490. for_each_matching_node(np, apbuart_match) {
  491. int *vendor = (int *) of_get_property(np, "vendor", NULL);
  492. int *device = (int *) of_get_property(np, "device", NULL);
  493. int *irqs = (int *) of_get_property(np, "interrupts", NULL);
  494. regs = (struct amba_prom_registers *)
  495. of_get_property(np, "reg", NULL);
  496. if (vendor)
  497. v = *vendor;
  498. if (device)
  499. d = *device;
  500. if (!irqs || !regs)
  501. return;
  502. grlib_apbuart_nodes[line] = np;
  503. addr = regs->phys_addr;
  504. irq = *irqs;
  505. port = &grlib_apbuart_ports[line];
  506. port->mapbase = addr;
  507. port->membase = ioremap(addr, sizeof(struct grlib_apbuart_regs_map));
  508. port->irq = irq;
  509. port->iotype = UPIO_MEM;
  510. port->ops = &grlib_apbuart_ops;
  511. port->flags = UPF_BOOT_AUTOCONF;
  512. port->line = line;
  513. port->uartclk = freq_khz * 1000;
  514. port->fifosize = apbuart_scan_fifo_size((struct uart_port *) port, line);
  515. line++;
  516. /* We support maximum UART_NR uarts ... */
  517. if (line == UART_NR)
  518. break;
  519. }
  520. enum_done = 1;
  521. grlib_apbuart_driver.nr = grlib_apbuart_port_nr = line;
  522. }
  523. static int __init grlib_apbuart_init(void)
  524. {
  525. int ret;
  526. /* Find all APBUARTS in device the tree and initialize their ports */
  527. grlib_apbuart_configure();
  528. printk(KERN_INFO "Serial: GRLIB APBUART driver\n");
  529. ret = uart_register_driver(&grlib_apbuart_driver);
  530. if (ret) {
  531. printk(KERN_ERR "%s: uart_register_driver failed (%i)\n",
  532. __FILE__, ret);
  533. return ret;
  534. }
  535. ret = of_register_platform_driver(&grlib_apbuart_of_driver);
  536. if (ret) {
  537. printk(KERN_ERR
  538. "%s: of_register_platform_driver failed (%i)\n",
  539. __FILE__, ret);
  540. uart_unregister_driver(&grlib_apbuart_driver);
  541. return ret;
  542. }
  543. return ret;
  544. }
  545. static void __exit grlib_apbuart_exit(void)
  546. {
  547. int i;
  548. for (i = 0; i < grlib_apbuart_port_nr; i++)
  549. uart_remove_one_port(&grlib_apbuart_driver,
  550. &grlib_apbuart_ports[i]);
  551. uart_unregister_driver(&grlib_apbuart_driver);
  552. of_unregister_platform_driver(&grlib_apbuart_of_driver);
  553. }
  554. module_init(grlib_apbuart_init);
  555. module_exit(grlib_apbuart_exit);
  556. MODULE_AUTHOR("Aeroflex Gaisler AB");
  557. MODULE_DESCRIPTION("GRLIB APBUART serial driver");
  558. MODULE_VERSION("2.1");
  559. MODULE_LICENSE("GPL");