devices-msm8960.c 2.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485
  1. /* Copyright (c) 2011, Code Aurora Forum. All rights reserved.
  2. *
  3. * This program is free software; you can redistribute it and/or modify
  4. * it under the terms of the GNU General Public License version 2 and
  5. * only version 2 as published by the Free Software Foundation.
  6. *
  7. * This program is distributed in the hope that it will be useful,
  8. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  9. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  10. * GNU General Public License for more details.
  11. *
  12. * You should have received a copy of the GNU General Public License
  13. * along with this program; if not, write to the Free Software
  14. * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
  15. * 02110-1301, USA.
  16. */
  17. #include <linux/kernel.h>
  18. #include <linux/platform_device.h>
  19. #include <linux/dma-mapping.h>
  20. #include <mach/irqs-8960.h>
  21. #include <mach/board.h>
  22. #include "devices.h"
  23. #define MSM_GSBI2_PHYS 0x16100000
  24. #define MSM_UART2DM_PHYS (MSM_GSBI2_PHYS + 0x40000)
  25. #define MSM_GSBI5_PHYS 0x16400000
  26. #define MSM_UART5DM_PHYS (MSM_GSBI5_PHYS + 0x40000)
  27. static struct resource resources_uart_gsbi2[] = {
  28. {
  29. .start = GSBI2_UARTDM_IRQ,
  30. .end = GSBI2_UARTDM_IRQ,
  31. .flags = IORESOURCE_IRQ,
  32. },
  33. {
  34. .start = MSM_UART2DM_PHYS,
  35. .end = MSM_UART2DM_PHYS + PAGE_SIZE - 1,
  36. .name = "uart_resource",
  37. .flags = IORESOURCE_MEM,
  38. },
  39. {
  40. .start = MSM_GSBI2_PHYS,
  41. .end = MSM_GSBI2_PHYS + PAGE_SIZE - 1,
  42. .name = "gsbi_resource",
  43. .flags = IORESOURCE_MEM,
  44. },
  45. };
  46. struct platform_device msm8960_device_uart_gsbi2 = {
  47. .name = "msm_serial",
  48. .id = 0,
  49. .num_resources = ARRAY_SIZE(resources_uart_gsbi2),
  50. .resource = resources_uart_gsbi2,
  51. };
  52. static struct resource resources_uart_gsbi5[] = {
  53. {
  54. .start = GSBI5_UARTDM_IRQ,
  55. .end = GSBI5_UARTDM_IRQ,
  56. .flags = IORESOURCE_IRQ,
  57. },
  58. {
  59. .start = MSM_UART5DM_PHYS,
  60. .end = MSM_UART5DM_PHYS + PAGE_SIZE - 1,
  61. .name = "uart_resource",
  62. .flags = IORESOURCE_MEM,
  63. },
  64. {
  65. .start = MSM_GSBI5_PHYS,
  66. .end = MSM_GSBI5_PHYS + PAGE_SIZE - 1,
  67. .name = "gsbi_resource",
  68. .flags = IORESOURCE_MEM,
  69. },
  70. };
  71. struct platform_device msm8960_device_uart_gsbi5 = {
  72. .name = "msm_serial",
  73. .id = 0,
  74. .num_resources = ARRAY_SIZE(resources_uart_gsbi5),
  75. .resource = resources_uart_gsbi5,
  76. };