s5p-dev-uart.c 2.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889
  1. /*
  2. * Copyright (c) 2009,2012 Samsung Electronics Co., Ltd.
  3. * http://www.samsung.com/
  4. *
  5. * Base S5P 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 <plat/devs.h>
  22. /* Serial port registrations */
  23. static struct resource s5p_uart0_resource[] = {
  24. [0] = DEFINE_RES_MEM(S5P_PA_UART0, S5P_SZ_UART),
  25. [1] = DEFINE_RES_IRQ(IRQ_UART0),
  26. };
  27. static struct resource s5p_uart1_resource[] = {
  28. [0] = DEFINE_RES_MEM(S5P_PA_UART1, S5P_SZ_UART),
  29. [1] = DEFINE_RES_IRQ(IRQ_UART1),
  30. };
  31. static struct resource s5p_uart2_resource[] = {
  32. [0] = DEFINE_RES_MEM(S5P_PA_UART2, S5P_SZ_UART),
  33. [1] = DEFINE_RES_IRQ(IRQ_UART2),
  34. };
  35. static struct resource s5p_uart3_resource[] = {
  36. #if CONFIG_SERIAL_SAMSUNG_UARTS > 3
  37. [0] = DEFINE_RES_MEM(S5P_PA_UART3, S5P_SZ_UART),
  38. [1] = DEFINE_RES_IRQ(IRQ_UART3),
  39. #endif
  40. };
  41. static struct resource s5p_uart4_resource[] = {
  42. #if CONFIG_SERIAL_SAMSUNG_UARTS > 4
  43. [0] = DEFINE_RES_MEM(S5P_PA_UART4, S5P_SZ_UART),
  44. [1] = DEFINE_RES_IRQ(IRQ_UART4),
  45. #endif
  46. };
  47. static struct resource s5p_uart5_resource[] = {
  48. #if CONFIG_SERIAL_SAMSUNG_UARTS > 5
  49. [0] = DEFINE_RES_MEM(S5P_PA_UART5, S5P_SZ_UART),
  50. [1] = DEFINE_RES_IRQ(IRQ_UART5),
  51. #endif
  52. };
  53. struct s3c24xx_uart_resources s5p_uart_resources[] __initdata = {
  54. [0] = {
  55. .resources = s5p_uart0_resource,
  56. .nr_resources = ARRAY_SIZE(s5p_uart0_resource),
  57. },
  58. [1] = {
  59. .resources = s5p_uart1_resource,
  60. .nr_resources = ARRAY_SIZE(s5p_uart1_resource),
  61. },
  62. [2] = {
  63. .resources = s5p_uart2_resource,
  64. .nr_resources = ARRAY_SIZE(s5p_uart2_resource),
  65. },
  66. [3] = {
  67. .resources = s5p_uart3_resource,
  68. .nr_resources = ARRAY_SIZE(s5p_uart3_resource),
  69. },
  70. [4] = {
  71. .resources = s5p_uart4_resource,
  72. .nr_resources = ARRAY_SIZE(s5p_uart4_resource),
  73. },
  74. [5] = {
  75. .resources = s5p_uart5_resource,
  76. .nr_resources = ARRAY_SIZE(s5p_uart5_resource),
  77. },
  78. };