8250_exar_st16c554.c 1.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950
  1. /*
  2. * Written by Paul B Schroeder < pschroeder "at" uplogix "dot" com >
  3. * Based on 8250_boca.
  4. *
  5. * Copyright (C) 2005 Russell King.
  6. * Data taken from include/asm-i386/serial.h
  7. *
  8. * This program is free software; you can redistribute it and/or modify
  9. * it under the terms of the GNU General Public License version 2 as
  10. * published by the Free Software Foundation.
  11. */
  12. #include <linux/module.h>
  13. #include <linux/init.h>
  14. #include <linux/serial_8250.h>
  15. #define PORT(_base,_irq) \
  16. { \
  17. .iobase = _base, \
  18. .irq = _irq, \
  19. .uartclk = 1843200, \
  20. .iotype = UPIO_PORT, \
  21. .flags = UPF_BOOT_AUTOCONF, \
  22. }
  23. static struct plat_serial8250_port exar_data[] = {
  24. PORT(0x100, 5),
  25. PORT(0x108, 5),
  26. PORT(0x110, 5),
  27. PORT(0x118, 5),
  28. { },
  29. };
  30. static struct platform_device exar_device = {
  31. .name = "serial8250",
  32. .id = PLAT8250_DEV_EXAR_ST16C554,
  33. .dev = {
  34. .platform_data = exar_data,
  35. },
  36. };
  37. static int __init exar_init(void)
  38. {
  39. return platform_device_register(&exar_device);
  40. }
  41. module_init(exar_init);
  42. MODULE_AUTHOR("Paul B Schroeder");
  43. MODULE_DESCRIPTION("8250 serial probe module for Exar cards");
  44. MODULE_LICENSE("GPL");