devices-qsd8x50.c 4.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169
  1. /*
  2. * Copyright (C) 2008 Google, Inc.
  3. * Copyright (c) 2008-2010, Code Aurora Forum. All rights reserved.
  4. *
  5. * This software is licensed under the terms of the GNU General Public
  6. * License version 2, as published by the Free Software Foundation, and
  7. * may be copied, distributed, and modified under those terms.
  8. *
  9. * This program is distributed in the hope that it will be useful,
  10. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  11. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  12. * GNU General Public License for more details.
  13. *
  14. */
  15. #include <linux/kernel.h>
  16. #include <linux/platform_device.h>
  17. #include <linux/dma-mapping.h>
  18. #include <mach/irqs.h>
  19. #include <mach/msm_iomap.h>
  20. #include <mach/dma.h>
  21. #include <mach/board.h>
  22. #include "devices.h"
  23. #include <asm/mach/flash.h>
  24. #include <mach/mmc.h>
  25. #include "clock-pcom.h"
  26. static struct resource resources_uart3[] = {
  27. {
  28. .start = INT_UART3,
  29. .end = INT_UART3,
  30. .flags = IORESOURCE_IRQ,
  31. },
  32. {
  33. .start = MSM_UART3_PHYS,
  34. .end = MSM_UART3_PHYS + MSM_UART3_SIZE - 1,
  35. .flags = IORESOURCE_MEM,
  36. },
  37. };
  38. struct platform_device msm_device_uart3 = {
  39. .name = "msm_serial",
  40. .id = 2,
  41. .num_resources = ARRAY_SIZE(resources_uart3),
  42. .resource = resources_uart3,
  43. };
  44. struct platform_device msm_device_smd = {
  45. .name = "msm_smd",
  46. .id = -1,
  47. };
  48. static struct resource resources_otg[] = {
  49. {
  50. .start = MSM_HSUSB_PHYS,
  51. .end = MSM_HSUSB_PHYS + MSM_HSUSB_SIZE,
  52. .flags = IORESOURCE_MEM,
  53. },
  54. {
  55. .start = INT_USB_HS,
  56. .end = INT_USB_HS,
  57. .flags = IORESOURCE_IRQ,
  58. },
  59. };
  60. struct platform_device msm_device_otg = {
  61. .name = "msm_otg",
  62. .id = -1,
  63. .num_resources = ARRAY_SIZE(resources_otg),
  64. .resource = resources_otg,
  65. .dev = {
  66. .coherent_dma_mask = 0xffffffff,
  67. },
  68. };
  69. static struct resource resources_hsusb[] = {
  70. {
  71. .start = MSM_HSUSB_PHYS,
  72. .end = MSM_HSUSB_PHYS + MSM_HSUSB_SIZE,
  73. .flags = IORESOURCE_MEM,
  74. },
  75. {
  76. .start = INT_USB_HS,
  77. .end = INT_USB_HS,
  78. .flags = IORESOURCE_IRQ,
  79. },
  80. };
  81. struct platform_device msm_device_hsusb = {
  82. .name = "msm_hsusb",
  83. .id = -1,
  84. .num_resources = ARRAY_SIZE(resources_hsusb),
  85. .resource = resources_hsusb,
  86. .dev = {
  87. .coherent_dma_mask = 0xffffffff,
  88. },
  89. };
  90. static u64 dma_mask = 0xffffffffULL;
  91. static struct resource resources_hsusb_host[] = {
  92. {
  93. .start = MSM_HSUSB_PHYS,
  94. .end = MSM_HSUSB_PHYS + MSM_HSUSB_SIZE,
  95. .flags = IORESOURCE_MEM,
  96. },
  97. {
  98. .start = INT_USB_HS,
  99. .end = INT_USB_HS,
  100. .flags = IORESOURCE_IRQ,
  101. },
  102. };
  103. struct platform_device msm_device_hsusb_host = {
  104. .name = "msm_hsusb_host",
  105. .id = -1,
  106. .num_resources = ARRAY_SIZE(resources_hsusb_host),
  107. .resource = resources_hsusb_host,
  108. .dev = {
  109. .dma_mask = &dma_mask,
  110. .coherent_dma_mask = 0xffffffffULL,
  111. },
  112. };
  113. struct clk msm_clocks_8x50[] = {
  114. CLK_PCOM("adm_clk", ADM_CLK, NULL, 0),
  115. CLK_PCOM("ebi1_clk", EBI1_CLK, NULL, CLK_MIN),
  116. CLK_PCOM("ebi2_clk", EBI2_CLK, NULL, 0),
  117. CLK_PCOM("ecodec_clk", ECODEC_CLK, NULL, 0),
  118. CLK_PCOM("emdh_clk", EMDH_CLK, NULL, OFF | CLK_MINMAX),
  119. CLK_PCOM("gp_clk", GP_CLK, NULL, 0),
  120. CLK_PCOM("grp_clk", GRP_3D_CLK, NULL, 0),
  121. CLK_PCOM("icodec_rx_clk", ICODEC_RX_CLK, NULL, 0),
  122. CLK_PCOM("icodec_tx_clk", ICODEC_TX_CLK, NULL, 0),
  123. CLK_PCOM("imem_clk", IMEM_CLK, NULL, OFF),
  124. CLK_PCOM("mdc_clk", MDC_CLK, NULL, 0),
  125. CLK_PCOM("mddi_clk", PMDH_CLK, NULL, OFF | CLK_MINMAX),
  126. CLK_PCOM("mdp_clk", MDP_CLK, NULL, OFF),
  127. CLK_PCOM("mdp_lcdc_pclk_clk", MDP_LCDC_PCLK_CLK, NULL, 0),
  128. CLK_PCOM("mdp_lcdc_pad_pclk_clk", MDP_LCDC_PAD_PCLK_CLK, NULL, 0),
  129. CLK_PCOM("mdp_vsync_clk", MDP_VSYNC_CLK, NULL, 0),
  130. CLK_PCOM("pbus_clk", PBUS_CLK, NULL, CLK_MIN),
  131. CLK_PCOM("pcm_clk", PCM_CLK, NULL, 0),
  132. CLK_PCOM("sdac_clk", SDAC_CLK, NULL, OFF),
  133. CLK_PCOM("spi_clk", SPI_CLK, NULL, 0),
  134. CLK_PCOM("tsif_clk", TSIF_CLK, NULL, 0),
  135. CLK_PCOM("tsif_ref_clk", TSIF_REF_CLK, NULL, 0),
  136. CLK_PCOM("tv_dac_clk", TV_DAC_CLK, NULL, 0),
  137. CLK_PCOM("tv_enc_clk", TV_ENC_CLK, NULL, 0),
  138. CLK_PCOM("uart_clk", UART3_CLK, &msm_device_uart3.dev, OFF),
  139. CLK_PCOM("usb_hs_clk", USB_HS_CLK, NULL, OFF),
  140. CLK_PCOM("usb_hs_pclk", USB_HS_P_CLK, NULL, OFF),
  141. CLK_PCOM("usb_otg_clk", USB_OTG_CLK, NULL, 0),
  142. CLK_PCOM("vdc_clk", VDC_CLK, NULL, OFF | CLK_MIN),
  143. CLK_PCOM("vfe_clk", VFE_CLK, NULL, OFF),
  144. CLK_PCOM("vfe_mdc_clk", VFE_MDC_CLK, NULL, OFF),
  145. CLK_PCOM("vfe_axi_clk", VFE_AXI_CLK, NULL, OFF),
  146. CLK_PCOM("usb_hs2_clk", USB_HS2_CLK, NULL, OFF),
  147. CLK_PCOM("usb_hs2_pclk", USB_HS2_P_CLK, NULL, OFF),
  148. CLK_PCOM("usb_hs3_clk", USB_HS3_CLK, NULL, OFF),
  149. CLK_PCOM("usb_hs3_pclk", USB_HS3_P_CLK, NULL, OFF),
  150. CLK_PCOM("usb_phy_clk", USB_PHY_CLK, NULL, 0),
  151. };
  152. unsigned msm_num_clocks_8x50 = ARRAY_SIZE(msm_clocks_8x50);