dev-uart.c 1.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566
  1. // SPDX-License-Identifier: GPL-2.0
  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. #include <linux/kernel.h>
  10. #include <linux/types.h>
  11. #include <linux/interrupt.h>
  12. #include <linux/list.h>
  13. #include <linux/platform_device.h>
  14. #include <asm/mach/arch.h>
  15. #include <asm/mach/irq.h>
  16. #include <mach/hardware.h>
  17. #include <mach/map.h>
  18. #include <mach/irqs.h>
  19. #include <plat/devs.h>
  20. /* Serial port registrations */
  21. /* 64xx uarts are closer together */
  22. static struct resource s3c64xx_uart0_resource[] = {
  23. [0] = DEFINE_RES_MEM(S3C_PA_UART0, SZ_256),
  24. [1] = DEFINE_RES_IRQ(IRQ_UART0),
  25. };
  26. static struct resource s3c64xx_uart1_resource[] = {
  27. [0] = DEFINE_RES_MEM(S3C_PA_UART1, SZ_256),
  28. [1] = DEFINE_RES_IRQ(IRQ_UART1),
  29. };
  30. static struct resource s3c6xx_uart2_resource[] = {
  31. [0] = DEFINE_RES_MEM(S3C_PA_UART2, SZ_256),
  32. [1] = DEFINE_RES_IRQ(IRQ_UART2),
  33. };
  34. static struct resource s3c64xx_uart3_resource[] = {
  35. [0] = DEFINE_RES_MEM(S3C_PA_UART3, SZ_256),
  36. [1] = DEFINE_RES_IRQ(IRQ_UART3),
  37. };
  38. struct s3c24xx_uart_resources s3c64xx_uart_resources[] __initdata = {
  39. [0] = {
  40. .resources = s3c64xx_uart0_resource,
  41. .nr_resources = ARRAY_SIZE(s3c64xx_uart0_resource),
  42. },
  43. [1] = {
  44. .resources = s3c64xx_uart1_resource,
  45. .nr_resources = ARRAY_SIZE(s3c64xx_uart1_resource),
  46. },
  47. [2] = {
  48. .resources = s3c6xx_uart2_resource,
  49. .nr_resources = ARRAY_SIZE(s3c6xx_uart2_resource),
  50. },
  51. [3] = {
  52. .resources = s3c64xx_uart3_resource,
  53. .nr_resources = ARRAY_SIZE(s3c64xx_uart3_resource),
  54. },
  55. };