apbuart.c 16 KB

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