dev-uart.c 1.8 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071
  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] = DEFINE_RES_MEM(S3C_PA_UART0, SZ_256),
  29. [1] = DEFINE_RES_IRQ(IRQ_UART0),
  30. };
  31. static struct resource s3c64xx_uart1_resource[] = {
  32. [0] = DEFINE_RES_MEM(S3C_PA_UART1, SZ_256),
  33. [1] = DEFINE_RES_IRQ(IRQ_UART1),
  34. };
  35. static struct resource s3c6xx_uart2_resource[] = {
  36. [0] = DEFINE_RES_MEM(S3C_PA_UART2, SZ_256),
  37. [1] = DEFINE_RES_IRQ(IRQ_UART2),
  38. };
  39. static struct resource s3c64xx_uart3_resource[] = {
  40. [0] = DEFINE_RES_MEM(S3C_PA_UART3, SZ_256),
  41. [1] = DEFINE_RES_IRQ(IRQ_UART3),
  42. };
  43. struct s3c24xx_uart_resources s3c64xx_uart_resources[] __initdata = {
  44. [0] = {
  45. .resources = s3c64xx_uart0_resource,
  46. .nr_resources = ARRAY_SIZE(s3c64xx_uart0_resource),
  47. },
  48. [1] = {
  49. .resources = s3c64xx_uart1_resource,
  50. .nr_resources = ARRAY_SIZE(s3c64xx_uart1_resource),
  51. },
  52. [2] = {
  53. .resources = s3c6xx_uart2_resource,
  54. .nr_resources = ARRAY_SIZE(s3c6xx_uart2_resource),
  55. },
  56. [3] = {
  57. .resources = s3c64xx_uart3_resource,
  58. .nr_resources = ARRAY_SIZE(s3c64xx_uart3_resource),
  59. },
  60. };