8250_hub6.c 1.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758
  1. /*
  2. * linux/drivers/serial/8250_hub6.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 HUB6(card,port) \
  15. { \
  16. .iobase = 0x302, \
  17. .irq = 3, \
  18. .uartclk = 1843200, \
  19. .iotype = UPIO_HUB6, \
  20. .flags = UPF_BOOT_AUTOCONF, \
  21. .hub6 = (card) << 6 | (port) << 3 | 1, \
  22. }
  23. static struct plat_serial8250_port hub6_data[] = {
  24. HUB6(0,0),
  25. HUB6(0,1),
  26. HUB6(0,2),
  27. HUB6(0,3),
  28. HUB6(0,4),
  29. HUB6(0,5),
  30. HUB6(1,0),
  31. HUB6(1,1),
  32. HUB6(1,2),
  33. HUB6(1,3),
  34. HUB6(1,4),
  35. HUB6(1,5),
  36. { },
  37. };
  38. static struct platform_device hub6_device = {
  39. .name = "serial8250",
  40. .id = PLAT8250_DEV_HUB6,
  41. .dev = {
  42. .platform_data = hub6_data,
  43. },
  44. };
  45. static int __init hub6_init(void)
  46. {
  47. return platform_device_register(&hub6_device);
  48. }
  49. module_init(hub6_init);
  50. MODULE_AUTHOR("Russell King");
  51. MODULE_DESCRIPTION("8250 serial probe module for Hub6 cards");
  52. MODULE_LICENSE("GPL");