8250_accent.c 1.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445
  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, \
  19. }
  20. static struct plat_serial8250_port accent_data[] = {
  21. PORT(0x330, 4),
  22. PORT(0x338, 4),
  23. { },
  24. };
  25. static struct platform_device accent_device = {
  26. .name = "serial8250",
  27. .id = PLAT8250_DEV_ACCENT,
  28. .dev = {
  29. .platform_data = accent_data,
  30. },
  31. };
  32. static int __init accent_init(void)
  33. {
  34. return platform_device_register(&accent_device);
  35. }
  36. module_init(accent_init);
  37. MODULE_AUTHOR("Russell King");
  38. MODULE_DESCRIPTION("8250 serial probe module for Accent Async cards");
  39. MODULE_LICENSE("GPL");