board-msm7x30.c 3.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113
  1. /* Copyright (c) 2009-2010, 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/irq.h>
  19. #include <linux/gpio.h>
  20. #include <linux/platform_device.h>
  21. #include <linux/delay.h>
  22. #include <linux/io.h>
  23. #include <linux/smsc911x.h>
  24. #include <linux/usb/msm_hsusb.h>
  25. #include <asm/mach-types.h>
  26. #include <asm/mach/arch.h>
  27. #include <asm/setup.h>
  28. #include <mach/gpio.h>
  29. #include <mach/board.h>
  30. #include <mach/memory.h>
  31. #include <mach/msm_iomap.h>
  32. #include <mach/dma.h>
  33. #include <mach/vreg.h>
  34. #include "devices.h"
  35. #include "proc_comm.h"
  36. extern struct sys_timer msm_timer;
  37. static int hsusb_phy_init_seq[] = {
  38. 0x30, 0x32, /* Enable and set Pre-Emphasis Depth to 20% */
  39. 0x02, 0x36, /* Disable CDR Auto Reset feature */
  40. -1
  41. };
  42. static struct msm_otg_platform_data msm_otg_pdata = {
  43. .phy_init_seq = hsusb_phy_init_seq,
  44. .mode = USB_PERIPHERAL,
  45. .otg_control = OTG_PHY_CONTROL,
  46. };
  47. static struct platform_device *devices[] __initdata = {
  48. #if defined(CONFIG_SERIAL_MSM) || defined(CONFIG_MSM_SERIAL_DEBUGGER)
  49. &msm_device_uart2,
  50. #endif
  51. &msm_device_smd,
  52. &msm_device_otg,
  53. &msm_device_hsusb,
  54. &msm_device_hsusb_host,
  55. };
  56. static void __init msm7x30_init_irq(void)
  57. {
  58. msm_init_irq();
  59. }
  60. static void __init msm7x30_init(void)
  61. {
  62. msm_device_otg.dev.platform_data = &msm_otg_pdata;
  63. msm_device_hsusb.dev.parent = &msm_device_otg.dev;
  64. msm_device_hsusb_host.dev.parent = &msm_device_otg.dev;
  65. platform_add_devices(devices, ARRAY_SIZE(devices));
  66. }
  67. static void __init msm7x30_map_io(void)
  68. {
  69. msm_map_msm7x30_io();
  70. msm_clock_init(msm_clocks_7x30, msm_num_clocks_7x30);
  71. }
  72. MACHINE_START(MSM7X30_SURF, "QCT MSM7X30 SURF")
  73. #ifdef CONFIG_MSM_DEBUG_UART
  74. #endif
  75. .boot_params = PHYS_OFFSET + 0x100,
  76. .map_io = msm7x30_map_io,
  77. .init_irq = msm7x30_init_irq,
  78. .init_machine = msm7x30_init,
  79. .timer = &msm_timer,
  80. MACHINE_END
  81. MACHINE_START(MSM7X30_FFA, "QCT MSM7X30 FFA")
  82. #ifdef CONFIG_MSM_DEBUG_UART
  83. #endif
  84. .boot_params = PHYS_OFFSET + 0x100,
  85. .map_io = msm7x30_map_io,
  86. .init_irq = msm7x30_init_irq,
  87. .init_machine = msm7x30_init,
  88. .timer = &msm_timer,
  89. MACHINE_END
  90. MACHINE_START(MSM7X30_FLUID, "QCT MSM7X30 FLUID")
  91. #ifdef CONFIG_MSM_DEBUG_UART
  92. #endif
  93. .boot_params = PHYS_OFFSET + 0x100,
  94. .map_io = msm7x30_map_io,
  95. .init_irq = msm7x30_init_irq,
  96. .init_machine = msm7x30_init,
  97. .timer = &msm_timer,
  98. MACHINE_END