dev-uart.c 1.5 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455
  1. /*
  2. * Copyright (c) 2012 Samsung Electronics Co., Ltd.
  3. * http://www.samsung.com
  4. *
  5. * Base EXYNOS UART resource and device definitions
  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/kernel.h>
  12. #include <linux/types.h>
  13. #include <linux/interrupt.h>
  14. #include <linux/list.h>
  15. #include <linux/ioport.h>
  16. #include <linux/platform_device.h>
  17. #include <asm/mach/arch.h>
  18. #include <asm/mach/irq.h>
  19. #include <mach/hardware.h>
  20. #include <mach/map.h>
  21. #include <mach/irqs.h>
  22. #include <plat/devs.h>
  23. #define EXYNOS_UART_RESOURCE(_series, _nr) \
  24. static struct resource exynos##_series##_uart##_nr##_resource[] = { \
  25. [0] = DEFINE_RES_MEM(EXYNOS##_series##_PA_UART##_nr, EXYNOS##_series##_SZ_UART), \
  26. [1] = DEFINE_RES_IRQ(EXYNOS##_series##_IRQ_UART##_nr), \
  27. };
  28. EXYNOS_UART_RESOURCE(4, 0)
  29. EXYNOS_UART_RESOURCE(4, 1)
  30. EXYNOS_UART_RESOURCE(4, 2)
  31. EXYNOS_UART_RESOURCE(4, 3)
  32. struct s3c24xx_uart_resources exynos4_uart_resources[] __initdata = {
  33. [0] = {
  34. .resources = exynos4_uart0_resource,
  35. .nr_resources = ARRAY_SIZE(exynos4_uart0_resource),
  36. },
  37. [1] = {
  38. .resources = exynos4_uart1_resource,
  39. .nr_resources = ARRAY_SIZE(exynos4_uart1_resource),
  40. },
  41. [2] = {
  42. .resources = exynos4_uart2_resource,
  43. .nr_resources = ARRAY_SIZE(exynos4_uart2_resource),
  44. },
  45. [3] = {
  46. .resources = exynos4_uart3_resource,
  47. .nr_resources = ARRAY_SIZE(exynos4_uart3_resource),
  48. },
  49. };