8250_fourport.c 1.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445
  1. // SPDX-License-Identifier: GPL-2.0
  2. /*
  3. * Copyright (C) 2005 Russell King.
  4. * Data taken from include/asm-i386/serial.h
  5. */
  6. #include <linux/module.h>
  7. #include <linux/init.h>
  8. #include <linux/serial_8250.h>
  9. #include "8250.h"
  10. #define SERIAL8250_FOURPORT(_base, _irq) \
  11. SERIAL8250_PORT_FLAGS(_base, _irq, UPF_FOURPORT)
  12. static struct plat_serial8250_port fourport_data[] = {
  13. SERIAL8250_FOURPORT(0x1a0, 9),
  14. SERIAL8250_FOURPORT(0x1a8, 9),
  15. SERIAL8250_FOURPORT(0x1b0, 9),
  16. SERIAL8250_FOURPORT(0x1b8, 9),
  17. SERIAL8250_FOURPORT(0x2a0, 5),
  18. SERIAL8250_FOURPORT(0x2a8, 5),
  19. SERIAL8250_FOURPORT(0x2b0, 5),
  20. SERIAL8250_FOURPORT(0x2b8, 5),
  21. { },
  22. };
  23. static struct platform_device fourport_device = {
  24. .name = "serial8250",
  25. .id = PLAT8250_DEV_FOURPORT,
  26. .dev = {
  27. .platform_data = fourport_data,
  28. },
  29. };
  30. static int __init fourport_init(void)
  31. {
  32. return platform_device_register(&fourport_device);
  33. }
  34. module_init(fourport_init);
  35. MODULE_AUTHOR("Russell King");
  36. MODULE_DESCRIPTION("8250 serial probe module for AST Fourport cards");
  37. MODULE_LICENSE("GPL");