dev-uart.c 2.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103
  1. /* linux/arch/arm/plat-s3c64xx/dev-uart.c
  2. *
  3. * Copyright 2008 Openmoko, Inc.
  4. * Copyright 2008 Simtec Electronics
  5. * Ben Dooks <ben@simtec.co.uk>
  6. * http://armlinux.simtec.co.uk/
  7. *
  8. * Base S3C64XX UART resource and device definitions
  9. *
  10. * This program is free software; you can redistribute it and/or modify
  11. * it under the terms of the GNU General Public License version 2 as
  12. * published by the Free Software Foundation.
  13. *
  14. */
  15. #include <linux/kernel.h>
  16. #include <linux/types.h>
  17. #include <linux/interrupt.h>
  18. #include <linux/list.h>
  19. #include <linux/platform_device.h>
  20. #include <asm/mach/arch.h>
  21. #include <asm/mach/irq.h>
  22. #include <mach/hardware.h>
  23. #include <mach/map.h>
  24. #include <plat/devs.h>
  25. /* Serial port registrations */
  26. /* 64xx uarts are closer together */
  27. static struct resource s3c64xx_uart0_resource[] = {
  28. [0] = {
  29. .start = S3C_PA_UART0,
  30. .end = S3C_PA_UART0 + 0x100,
  31. .flags = IORESOURCE_MEM,
  32. },
  33. [1] = {
  34. .start = IRQ_UART0,
  35. .end = IRQ_UART0,
  36. .flags = IORESOURCE_IRQ,
  37. },
  38. };
  39. static struct resource s3c64xx_uart1_resource[] = {
  40. [0] = {
  41. .start = S3C_PA_UART1,
  42. .end = S3C_PA_UART1 + 0x100,
  43. .flags = IORESOURCE_MEM,
  44. },
  45. [1] = {
  46. .start = IRQ_UART1,
  47. .end = IRQ_UART1,
  48. .flags = IORESOURCE_IRQ,
  49. },
  50. };
  51. static struct resource s3c6xx_uart2_resource[] = {
  52. [0] = {
  53. .start = S3C_PA_UART2,
  54. .end = S3C_PA_UART2 + 0x100,
  55. .flags = IORESOURCE_MEM,
  56. },
  57. [1] = {
  58. .start = IRQ_UART2,
  59. .end = IRQ_UART2,
  60. .flags = IORESOURCE_IRQ,
  61. },
  62. };
  63. static struct resource s3c64xx_uart3_resource[] = {
  64. [0] = {
  65. .start = S3C_PA_UART3,
  66. .end = S3C_PA_UART3 + 0x100,
  67. .flags = IORESOURCE_MEM,
  68. },
  69. [1] = {
  70. .start = IRQ_UART3,
  71. .end = IRQ_UART3,
  72. .flags = IORESOURCE_IRQ,
  73. },
  74. };
  75. struct s3c24xx_uart_resources s3c64xx_uart_resources[] __initdata = {
  76. [0] = {
  77. .resources = s3c64xx_uart0_resource,
  78. .nr_resources = ARRAY_SIZE(s3c64xx_uart0_resource),
  79. },
  80. [1] = {
  81. .resources = s3c64xx_uart1_resource,
  82. .nr_resources = ARRAY_SIZE(s3c64xx_uart1_resource),
  83. },
  84. [2] = {
  85. .resources = s3c6xx_uart2_resource,
  86. .nr_resources = ARRAY_SIZE(s3c6xx_uart2_resource),
  87. },
  88. [3] = {
  89. .resources = s3c64xx_uart3_resource,
  90. .nr_resources = ARRAY_SIZE(s3c64xx_uart3_resource),
  91. },
  92. };