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