8250_fourport.c 1.2 KB

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