dev-uart.c 1.8 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273
  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 <mach/irqs.h>
  25. #include <plat/devs.h>
  26. /* Serial port registrations */
  27. /* 64xx uarts are closer together */
  28. static struct resource s3c64xx_uart0_resource[] = {
  29. [0] = DEFINE_RES_MEM(S3C_PA_UART0, SZ_256),
  30. [1] = DEFINE_RES_IRQ(IRQ_UART0),
  31. };
  32. static struct resource s3c64xx_uart1_resource[] = {
  33. [0] = DEFINE_RES_MEM(S3C_PA_UART1, SZ_256),
  34. [1] = DEFINE_RES_IRQ(IRQ_UART1),
  35. };
  36. static struct resource s3c6xx_uart2_resource[] = {
  37. [0] = DEFINE_RES_MEM(S3C_PA_UART2, SZ_256),
  38. [1] = DEFINE_RES_IRQ(IRQ_UART2),
  39. };
  40. static struct resource s3c64xx_uart3_resource[] = {
  41. [0] = DEFINE_RES_MEM(S3C_PA_UART3, SZ_256),
  42. [1] = DEFINE_RES_IRQ(IRQ_UART3),
  43. };
  44. struct s3c24xx_uart_resources s3c64xx_uart_resources[] __initdata = {
  45. [0] = {
  46. .resources = s3c64xx_uart0_resource,
  47. .nr_resources = ARRAY_SIZE(s3c64xx_uart0_resource),
  48. },
  49. [1] = {
  50. .resources = s3c64xx_uart1_resource,
  51. .nr_resources = ARRAY_SIZE(s3c64xx_uart1_resource),
  52. },
  53. [2] = {
  54. .resources = s3c6xx_uart2_resource,
  55. .nr_resources = ARRAY_SIZE(s3c6xx_uart2_resource),
  56. },
  57. [3] = {
  58. .resources = s3c64xx_uart3_resource,
  59. .nr_resources = ARRAY_SIZE(s3c64xx_uart3_resource),
  60. },
  61. };