apbuart.c 16 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694
  1. // SPDX-License-Identifier: GPL-2.0
  2. /*
  3. * Driver for GRLIB serial ports (APBUART)
  4. *
  5. * Based on linux/drivers/serial/amba.c
  6. *
  7. * Copyright (C) 2000 Deep Blue Solutions Ltd.
  8. * Copyright (C) 2003 Konrad Eisele <eiselekd@web.de>
  9. * Copyright (C) 2006 Daniel Hellstrom <daniel@gaisler.com>, Aeroflex Gaisler AB
  10. * Copyright (C) 2008 Gilead Kutnick <kutnickg@zin-tech.com>
  11. * Copyright (C) 2009 Kristoffer Glembo <kristoffer@gaisler.com>, Aeroflex Gaisler AB
  12. */
  13. #if defined(CONFIG_SERIAL_GRLIB_GAISLER_APBUART_CONSOLE) && defined(CONFIG_MAGIC_SYSRQ)
  14. #define SUPPORT_SYSRQ
  15. #endif
  16. #include <linux/module.h>
  17. #include <linux/tty.h>
  18. #include <linux/tty_flip.h>
  19. #include <linux/ioport.h>
  20. #include <linux/init.h>
  21. #include <linux/serial.h>
  22. #include <linux/console.h>
  23. #include <linux/sysrq.h>
  24. #include <linux/kthread.h>
  25. #include <linux/device.h>
  26. #include <linux/of.h>
  27. #include <linux/of_device.h>
  28. #include <linux/of_platform.h>
  29. #include <linux/of_irq.h>
  30. #include <linux/platform_device.h>
  31. #include <linux/io.h>
  32. #include <linux/serial_core.h>
  33. #include <asm/irq.h>
  34. #include "apbuart.h"
  35. #define SERIAL_APBUART_MAJOR TTY_MAJOR
  36. #define SERIAL_APBUART_MINOR 64
  37. #define UART_DUMMY_RSR_RX 0x8000 /* for ignore all read */
  38. static void apbuart_tx_chars(struct uart_port *port);
  39. static void apbuart_stop_tx(struct uart_port *port)
  40. {
  41. unsigned int cr;
  42. cr = UART_GET_CTRL(port);
  43. cr &= ~UART_CTRL_TI;
  44. UART_PUT_CTRL(port, cr);
  45. }
  46. static void apbuart_start_tx(struct uart_port *port)
  47. {
  48. unsigned int cr;
  49. cr = UART_GET_CTRL(port);
  50. cr |= UART_CTRL_TI;
  51. UART_PUT_CTRL(port, cr);
  52. if (UART_GET_STATUS(port) & UART_STATUS_THE)
  53. apbuart_tx_chars(port);
  54. }
  55. static void apbuart_stop_rx(struct uart_port *port)
  56. {
  57. unsigned int cr;
  58. cr = UART_GET_CTRL(port);
  59. cr &= ~(UART_CTRL_RI);
  60. UART_PUT_CTRL(port, cr);
  61. }
  62. static void apbuart_rx_chars(struct uart_port *port)
  63. {
  64. unsigned int status, ch, rsr, flag;
  65. unsigned int max_chars = port->fifosize;
  66. status = UART_GET_STATUS(port);
  67. while (UART_RX_DATA(status) && (max_chars--)) {
  68. ch = UART_GET_CHAR(port);
  69. flag = TTY_NORMAL;
  70. port->icount.rx++;
  71. rsr = UART_GET_STATUS(port) | UART_DUMMY_RSR_RX;
  72. UART_PUT_STATUS(port, 0);
  73. if (rsr & UART_STATUS_ERR) {
  74. if (rsr & UART_STATUS_BR) {
  75. rsr &= ~(UART_STATUS_FE | UART_STATUS_PE);
  76. port->icount.brk++;
  77. if (uart_handle_break(port))
  78. goto ignore_char;
  79. } else if (rsr & UART_STATUS_PE) {
  80. port->icount.parity++;
  81. } else if (rsr & UART_STATUS_FE) {
  82. port->icount.frame++;
  83. }
  84. if (rsr & UART_STATUS_OE)
  85. port->icount.overrun++;
  86. rsr &= port->read_status_mask;
  87. if (rsr & UART_STATUS_PE)
  88. flag = TTY_PARITY;
  89. else if (rsr & UART_STATUS_FE)
  90. flag = TTY_FRAME;
  91. }
  92. if (uart_handle_sysrq_char(port, ch))
  93. goto ignore_char;
  94. uart_insert_char(port, rsr, UART_STATUS_OE, ch, flag);
  95. ignore_char:
  96. status = UART_GET_STATUS(port);
  97. }
  98. spin_unlock(&port->lock);
  99. tty_flip_buffer_push(&port->state->port);
  100. spin_lock(&port->lock);
  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 const 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. .break_ctl = apbuart_break_ctl,
  271. .startup = apbuart_startup,
  272. .shutdown = apbuart_shutdown,
  273. .set_termios = apbuart_set_termios,
  274. .type = apbuart_type,
  275. .release_port = apbuart_release_port,
  276. .request_port = apbuart_request_port,
  277. .config_port = apbuart_config_port,
  278. .verify_port = apbuart_verify_port,
  279. };
  280. static struct uart_port grlib_apbuart_ports[UART_NR];
  281. static struct device_node *grlib_apbuart_nodes[UART_NR];
  282. static int apbuart_scan_fifo_size(struct uart_port *port, int portnumber)
  283. {
  284. int ctrl, loop = 0;
  285. int status;
  286. int fifosize;
  287. unsigned long flags;
  288. ctrl = UART_GET_CTRL(port);
  289. /*
  290. * Enable the transceiver and wait for it to be ready to send data.
  291. * Clear interrupts so that this process will not be externally
  292. * interrupted in the middle (which can cause the transceiver to
  293. * drain prematurely).
  294. */
  295. local_irq_save(flags);
  296. UART_PUT_CTRL(port, ctrl | UART_CTRL_TE);
  297. while (!UART_TX_READY(UART_GET_STATUS(port)))
  298. loop++;
  299. /*
  300. * Disable the transceiver so data isn't actually sent during the
  301. * actual test.
  302. */
  303. UART_PUT_CTRL(port, ctrl & ~(UART_CTRL_TE));
  304. fifosize = 1;
  305. UART_PUT_CHAR(port, 0);
  306. /*
  307. * So long as transmitting a character increments the tranceivier FIFO
  308. * length the FIFO must be at least that big. These bytes will
  309. * automatically drain off of the FIFO.
  310. */
  311. status = UART_GET_STATUS(port);
  312. while (((status >> 20) & 0x3F) == fifosize) {
  313. fifosize++;
  314. UART_PUT_CHAR(port, 0);
  315. status = UART_GET_STATUS(port);
  316. }
  317. fifosize--;
  318. UART_PUT_CTRL(port, ctrl);
  319. local_irq_restore(flags);
  320. if (fifosize == 0)
  321. fifosize = 1;
  322. return fifosize;
  323. }
  324. static void apbuart_flush_fifo(struct uart_port *port)
  325. {
  326. int i;
  327. for (i = 0; i < port->fifosize; i++)
  328. UART_GET_CHAR(port);
  329. }
  330. /* ======================================================================== */
  331. /* Console driver, if enabled */
  332. /* ======================================================================== */
  333. #ifdef CONFIG_SERIAL_GRLIB_GAISLER_APBUART_CONSOLE
  334. static void apbuart_console_putchar(struct uart_port *port, int ch)
  335. {
  336. unsigned int status;
  337. do {
  338. status = UART_GET_STATUS(port);
  339. } while (!UART_TX_READY(status));
  340. UART_PUT_CHAR(port, ch);
  341. }
  342. static void
  343. apbuart_console_write(struct console *co, const char *s, unsigned int count)
  344. {
  345. struct uart_port *port = &grlib_apbuart_ports[co->index];
  346. unsigned int status, old_cr, new_cr;
  347. /* First save the CR then disable the interrupts */
  348. old_cr = UART_GET_CTRL(port);
  349. new_cr = old_cr & ~(UART_CTRL_RI | UART_CTRL_TI);
  350. UART_PUT_CTRL(port, new_cr);
  351. uart_console_write(port, s, count, apbuart_console_putchar);
  352. /*
  353. * Finally, wait for transmitter to become empty
  354. * and restore the TCR
  355. */
  356. do {
  357. status = UART_GET_STATUS(port);
  358. } while (!UART_TX_READY(status));
  359. UART_PUT_CTRL(port, old_cr);
  360. }
  361. static void __init
  362. apbuart_console_get_options(struct uart_port *port, int *baud,
  363. int *parity, int *bits)
  364. {
  365. if (UART_GET_CTRL(port) & (UART_CTRL_RE | UART_CTRL_TE)) {
  366. unsigned int quot, status;
  367. status = UART_GET_STATUS(port);
  368. *parity = 'n';
  369. if (status & UART_CTRL_PE) {
  370. if ((status & UART_CTRL_PS) == 0)
  371. *parity = 'e';
  372. else
  373. *parity = 'o';
  374. }
  375. *bits = 8;
  376. quot = UART_GET_SCAL(port) / 8;
  377. *baud = port->uartclk / (16 * (quot + 1));
  378. }
  379. }
  380. static int __init apbuart_console_setup(struct console *co, char *options)
  381. {
  382. struct uart_port *port;
  383. int baud = 38400;
  384. int bits = 8;
  385. int parity = 'n';
  386. int flow = 'n';
  387. pr_debug("apbuart_console_setup co=%p, co->index=%i, options=%s\n",
  388. co, co->index, options);
  389. /*
  390. * Check whether an invalid uart number has been specified, and
  391. * if so, search for the first available port that does have
  392. * console support.
  393. */
  394. if (co->index >= grlib_apbuart_port_nr)
  395. co->index = 0;
  396. port = &grlib_apbuart_ports[co->index];
  397. spin_lock_init(&port->lock);
  398. if (options)
  399. uart_parse_options(options, &baud, &parity, &bits, &flow);
  400. else
  401. apbuart_console_get_options(port, &baud, &parity, &bits);
  402. return uart_set_options(port, co, baud, parity, bits, flow);
  403. }
  404. static struct uart_driver grlib_apbuart_driver;
  405. static struct console grlib_apbuart_console = {
  406. .name = "ttyS",
  407. .write = apbuart_console_write,
  408. .device = uart_console_device,
  409. .setup = apbuart_console_setup,
  410. .flags = CON_PRINTBUFFER,
  411. .index = -1,
  412. .data = &grlib_apbuart_driver,
  413. };
  414. static int grlib_apbuart_configure(void);
  415. static int __init apbuart_console_init(void)
  416. {
  417. if (grlib_apbuart_configure())
  418. return -ENODEV;
  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 apbuart_probe(struct platform_device *op)
  440. {
  441. int i;
  442. struct uart_port *port = NULL;
  443. for (i = 0; i < grlib_apbuart_port_nr; i++) {
  444. if (op->dev.of_node == grlib_apbuart_nodes[i])
  445. break;
  446. }
  447. port = &grlib_apbuart_ports[i];
  448. port->dev = &op->dev;
  449. port->irq = op->archdata.irqs[0];
  450. uart_add_one_port(&grlib_apbuart_driver, (struct uart_port *) port);
  451. apbuart_flush_fifo((struct uart_port *) port);
  452. printk(KERN_INFO "grlib-apbuart at 0x%llx, irq %d\n",
  453. (unsigned long long) port->mapbase, port->irq);
  454. return 0;
  455. }
  456. static const struct of_device_id apbuart_match[] = {
  457. {
  458. .name = "GAISLER_APBUART",
  459. },
  460. {
  461. .name = "01_00c",
  462. },
  463. {},
  464. };
  465. MODULE_DEVICE_TABLE(of, apbuart_match);
  466. static struct platform_driver grlib_apbuart_of_driver = {
  467. .probe = apbuart_probe,
  468. .driver = {
  469. .name = "grlib-apbuart",
  470. .of_match_table = apbuart_match,
  471. },
  472. };
  473. static int __init grlib_apbuart_configure(void)
  474. {
  475. struct device_node *np;
  476. int line = 0;
  477. for_each_matching_node(np, apbuart_match) {
  478. const int *ampopts;
  479. const u32 *freq_hz;
  480. const struct amba_prom_registers *regs;
  481. struct uart_port *port;
  482. unsigned long addr;
  483. ampopts = of_get_property(np, "ampopts", NULL);
  484. if (ampopts && (*ampopts == 0))
  485. continue; /* Ignore if used by another OS instance */
  486. regs = of_get_property(np, "reg", NULL);
  487. /* Frequency of APB Bus is frequency of UART */
  488. freq_hz = of_get_property(np, "freq", NULL);
  489. if (!regs || !freq_hz || (*freq_hz == 0))
  490. continue;
  491. grlib_apbuart_nodes[line] = np;
  492. addr = regs->phys_addr;
  493. port = &grlib_apbuart_ports[line];
  494. port->mapbase = addr;
  495. port->membase = ioremap(addr, sizeof(struct grlib_apbuart_regs_map));
  496. port->irq = 0;
  497. port->iotype = UPIO_MEM;
  498. port->ops = &grlib_apbuart_ops;
  499. port->flags = UPF_BOOT_AUTOCONF;
  500. port->line = line;
  501. port->uartclk = *freq_hz;
  502. port->fifosize = apbuart_scan_fifo_size((struct uart_port *) port, line);
  503. line++;
  504. /* We support maximum UART_NR uarts ... */
  505. if (line == UART_NR)
  506. break;
  507. }
  508. grlib_apbuart_driver.nr = grlib_apbuart_port_nr = line;
  509. return line ? 0 : -ENODEV;
  510. }
  511. static int __init grlib_apbuart_init(void)
  512. {
  513. int ret;
  514. /* Find all APBUARTS in device the tree and initialize their ports */
  515. ret = grlib_apbuart_configure();
  516. if (ret)
  517. return ret;
  518. printk(KERN_INFO "Serial: GRLIB APBUART driver\n");
  519. ret = uart_register_driver(&grlib_apbuart_driver);
  520. if (ret) {
  521. printk(KERN_ERR "%s: uart_register_driver failed (%i)\n",
  522. __FILE__, ret);
  523. return ret;
  524. }
  525. ret = platform_driver_register(&grlib_apbuart_of_driver);
  526. if (ret) {
  527. printk(KERN_ERR
  528. "%s: platform_driver_register failed (%i)\n",
  529. __FILE__, ret);
  530. uart_unregister_driver(&grlib_apbuart_driver);
  531. return ret;
  532. }
  533. return ret;
  534. }
  535. static void __exit grlib_apbuart_exit(void)
  536. {
  537. int i;
  538. for (i = 0; i < grlib_apbuart_port_nr; i++)
  539. uart_remove_one_port(&grlib_apbuart_driver,
  540. &grlib_apbuart_ports[i]);
  541. uart_unregister_driver(&grlib_apbuart_driver);
  542. platform_driver_unregister(&grlib_apbuart_of_driver);
  543. }
  544. module_init(grlib_apbuart_init);
  545. module_exit(grlib_apbuart_exit);
  546. MODULE_AUTHOR("Aeroflex Gaisler AB");
  547. MODULE_DESCRIPTION("GRLIB APBUART serial driver");
  548. MODULE_VERSION("2.1");
  549. MODULE_LICENSE("GPL");