8250_boca.c 1.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960
  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 boca_data[] = {
  21. PORT(0x100, 12),
  22. PORT(0x108, 12),
  23. PORT(0x110, 12),
  24. PORT(0x118, 12),
  25. PORT(0x120, 12),
  26. PORT(0x128, 12),
  27. PORT(0x130, 12),
  28. PORT(0x138, 12),
  29. PORT(0x140, 12),
  30. PORT(0x148, 12),
  31. PORT(0x150, 12),
  32. PORT(0x158, 12),
  33. PORT(0x160, 12),
  34. PORT(0x168, 12),
  35. PORT(0x170, 12),
  36. PORT(0x178, 12),
  37. { },
  38. };
  39. static struct platform_device boca_device = {
  40. .name = "serial8250",
  41. .id = PLAT8250_DEV_BOCA,
  42. .dev = {
  43. .platform_data = boca_data,
  44. },
  45. };
  46. static int __init boca_init(void)
  47. {
  48. return platform_device_register(&boca_device);
  49. }
  50. module_init(boca_init);
  51. MODULE_AUTHOR("Russell King");
  52. MODULE_DESCRIPTION("8250 serial probe module for Boca cards");
  53. MODULE_LICENSE("GPL");