8250_fourport.c 1.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152
  1. /*
  2. * Copyright (C) 2005 Russell King.
  3. * Data taken from include/asm-i386/serial.h
  4. *
  5. * This program is free software; you can redistribute it and/or modify
  6. * it under the terms of the GNU General Public License version 2 as
  7. * published by the Free Software Foundation.
  8. */
  9. #include <linux/module.h>
  10. #include <linux/init.h>
  11. #include <linux/serial_8250.h>
  12. #define PORT(_base,_irq) \
  13. { \
  14. .iobase = _base, \
  15. .irq = _irq, \
  16. .uartclk = 1843200, \
  17. .iotype = UPIO_PORT, \
  18. .flags = UPF_BOOT_AUTOCONF | UPF_FOURPORT, \
  19. }
  20. static struct plat_serial8250_port fourport_data[] = {
  21. PORT(0x1a0, 9),
  22. PORT(0x1a8, 9),
  23. PORT(0x1b0, 9),
  24. PORT(0x1b8, 9),
  25. PORT(0x2a0, 5),
  26. PORT(0x2a8, 5),
  27. PORT(0x2b0, 5),
  28. PORT(0x2b8, 5),
  29. { },
  30. };
  31. static struct platform_device fourport_device = {
  32. .name = "serial8250",
  33. .id = PLAT8250_DEV_FOURPORT,
  34. .dev = {
  35. .platform_data = fourport_data,
  36. },
  37. };
  38. static int __init fourport_init(void)
  39. {
  40. return platform_device_register(&fourport_device);
  41. }
  42. module_init(fourport_init);
  43. MODULE_AUTHOR("Russell King");
  44. MODULE_DESCRIPTION("8250 serial probe module for AST Fourport cards");
  45. MODULE_LICENSE("GPL");