ocelot-platform.c 1.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546
  1. /*
  2. * This file is subject to the terms and conditions of the GNU General Public
  3. * License. See the file "COPYING" in the main directory of this archive
  4. * for more details.
  5. *
  6. * Copyright (C) 2007 Ralf Baechle (ralf@linux-mips.org)
  7. *
  8. * A NS16552 DUART with a 20MHz crystal.
  9. *
  10. */
  11. #include <linux/module.h>
  12. #include <linux/init.h>
  13. #include <linux/serial_8250.h>
  14. #define OCELOT_UART_FLAGS (UPF_BOOT_AUTOCONF | UPF_SKIP_TEST | UPF_IOREMAP)
  15. static struct plat_serial8250_port uart8250_data[] = {
  16. {
  17. .mapbase = 0xe0001020,
  18. .irq = 4,
  19. .uartclk = 20000000,
  20. .iotype = UPIO_MEM,
  21. .flags = OCELOT_UART_FLAGS,
  22. .regshift = 2,
  23. },
  24. { },
  25. };
  26. static struct platform_device uart8250_device = {
  27. .name = "serial8250",
  28. .id = PLAT8250_DEV_PLATFORM,
  29. .dev = {
  30. .platform_data = uart8250_data,
  31. },
  32. };
  33. static int __init uart8250_init(void)
  34. {
  35. return platform_device_register(&uart8250_device);
  36. }
  37. module_init(uart8250_init);
  38. MODULE_AUTHOR("Ralf Baechle <ralf@linux-mips.org>");
  39. MODULE_LICENSE("GPL");
  40. MODULE_DESCRIPTION("8250 UART probe driver for the Momenco Ocelot");