dev-uart.c 2.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101
  1. /* linux/arch/arm/plat-s3c24xx/dev-uart.c
  2. *
  3. * Copyright (c) 2004 Simtec Electronics
  4. * Ben Dooks <ben@simtec.co.uk>
  5. *
  6. * Base S3C24XX UART resource and platform device definitions
  7. *
  8. * This program is free software; you can redistribute it and/or modify
  9. * it under the terms of the GNU General Public License version 2 as
  10. * published by the Free Software Foundation.
  11. */
  12. #include <linux/kernel.h>
  13. #include <linux/types.h>
  14. #include <linux/interrupt.h>
  15. #include <linux/list.h>
  16. #include <linux/serial_core.h>
  17. #include <linux/platform_device.h>
  18. #include <asm/mach/arch.h>
  19. #include <asm/mach/map.h>
  20. #include <asm/mach/irq.h>
  21. #include <mach/hardware.h>
  22. #include <mach/map.h>
  23. #include <plat/devs.h>
  24. #include <plat/regs-serial.h>
  25. /* Serial port registrations */
  26. static struct resource s3c2410_uart0_resource[] = {
  27. [0] = {
  28. .start = S3C2410_PA_UART0,
  29. .end = S3C2410_PA_UART0 + 0x3fff,
  30. .flags = IORESOURCE_MEM,
  31. },
  32. [1] = {
  33. .start = IRQ_S3CUART_RX0,
  34. .end = IRQ_S3CUART_ERR0,
  35. .flags = IORESOURCE_IRQ,
  36. }
  37. };
  38. static struct resource s3c2410_uart1_resource[] = {
  39. [0] = {
  40. .start = S3C2410_PA_UART1,
  41. .end = S3C2410_PA_UART1 + 0x3fff,
  42. .flags = IORESOURCE_MEM,
  43. },
  44. [1] = {
  45. .start = IRQ_S3CUART_RX1,
  46. .end = IRQ_S3CUART_ERR1,
  47. .flags = IORESOURCE_IRQ,
  48. }
  49. };
  50. static struct resource s3c2410_uart2_resource[] = {
  51. [0] = {
  52. .start = S3C2410_PA_UART2,
  53. .end = S3C2410_PA_UART2 + 0x3fff,
  54. .flags = IORESOURCE_MEM,
  55. },
  56. [1] = {
  57. .start = IRQ_S3CUART_RX2,
  58. .end = IRQ_S3CUART_ERR2,
  59. .flags = IORESOURCE_IRQ,
  60. }
  61. };
  62. static struct resource s3c2410_uart3_resource[] = {
  63. [0] = {
  64. .start = S3C2443_PA_UART3,
  65. .end = S3C2443_PA_UART3 + 0x3fff,
  66. .flags = IORESOURCE_MEM,
  67. },
  68. [1] = {
  69. .start = IRQ_S3CUART_RX3,
  70. .end = IRQ_S3CUART_ERR3,
  71. .flags = IORESOURCE_IRQ,
  72. },
  73. };
  74. struct s3c24xx_uart_resources s3c2410_uart_resources[] __initdata = {
  75. [0] = {
  76. .resources = s3c2410_uart0_resource,
  77. .nr_resources = ARRAY_SIZE(s3c2410_uart0_resource),
  78. },
  79. [1] = {
  80. .resources = s3c2410_uart1_resource,
  81. .nr_resources = ARRAY_SIZE(s3c2410_uart1_resource),
  82. },
  83. [2] = {
  84. .resources = s3c2410_uart2_resource,
  85. .nr_resources = ARRAY_SIZE(s3c2410_uart2_resource),
  86. },
  87. [3] = {
  88. .resources = s3c2410_uart3_resource,
  89. .nr_resources = ARRAY_SIZE(s3c2410_uart3_resource),
  90. },
  91. };