8250_fourport.c 1.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748
  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. #include "8250.h"
  13. #define SERIAL8250_FOURPORT(_base, _irq) \
  14. SERIAL8250_PORT_FLAGS(_base, _irq, UPF_FOURPORT)
  15. static struct plat_serial8250_port fourport_data[] = {
  16. SERIAL8250_FOURPORT(0x1a0, 9),
  17. SERIAL8250_FOURPORT(0x1a8, 9),
  18. SERIAL8250_FOURPORT(0x1b0, 9),
  19. SERIAL8250_FOURPORT(0x1b8, 9),
  20. SERIAL8250_FOURPORT(0x2a0, 5),
  21. SERIAL8250_FOURPORT(0x2a8, 5),
  22. SERIAL8250_FOURPORT(0x2b0, 5),
  23. SERIAL8250_FOURPORT(0x2b8, 5),
  24. { },
  25. };
  26. static struct platform_device fourport_device = {
  27. .name = "serial8250",
  28. .id = PLAT8250_DEV_FOURPORT,
  29. .dev = {
  30. .platform_data = fourport_data,
  31. },
  32. };
  33. static int __init fourport_init(void)
  34. {
  35. return platform_device_register(&fourport_device);
  36. }
  37. module_init(fourport_init);
  38. MODULE_AUTHOR("Russell King");
  39. MODULE_DESCRIPTION("8250 serial probe module for AST Fourport cards");
  40. MODULE_LICENSE("GPL");