board-halibut.c 2.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113
  1. /* linux/arch/arm/mach-msm/board-halibut.c
  2. *
  3. * Copyright (C) 2007 Google, Inc.
  4. * Author: Brian Swetland <swetland@google.com>
  5. *
  6. * This software is licensed under the terms of the GNU General Public
  7. * License version 2, as published by the Free Software Foundation, and
  8. * may be copied, distributed, and modified under those terms.
  9. *
  10. * This program is distributed in the hope that it will be useful,
  11. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  12. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  13. * GNU General Public License for more details.
  14. *
  15. */
  16. #include <linux/kernel.h>
  17. #include <linux/init.h>
  18. #include <linux/platform_device.h>
  19. #include <linux/input.h>
  20. #include <linux/io.h>
  21. #include <linux/delay.h>
  22. #include <mach/hardware.h>
  23. #include <asm/mach-types.h>
  24. #include <asm/mach/arch.h>
  25. #include <asm/mach/map.h>
  26. #include <asm/mach/flash.h>
  27. #include <mach/board.h>
  28. #include <mach/msm_iomap.h>
  29. #include <linux/mtd/nand.h>
  30. #include <linux/mtd/partitions.h>
  31. static struct resource smc91x_resources[] = {
  32. [0] = {
  33. .start = 0x9C004300,
  34. .end = 0x9C004400,
  35. .flags = IORESOURCE_MEM,
  36. },
  37. [1] = {
  38. .start = MSM_GPIO_TO_INT(49),
  39. .end = MSM_GPIO_TO_INT(49),
  40. .flags = IORESOURCE_IRQ,
  41. },
  42. };
  43. static struct platform_device smc91x_device = {
  44. .name = "smc91x",
  45. .id = 0,
  46. .num_resources = ARRAY_SIZE(smc91x_resources),
  47. .resource = smc91x_resources,
  48. };
  49. static void mddi0_panel_power(int on)
  50. {
  51. }
  52. static struct msm_mddi_platform_data msm_mddi0_pdata = {
  53. .panel_power = mddi0_panel_power,
  54. .has_vsync_irq = 0,
  55. };
  56. static struct platform_device msm_mddi0_device = {
  57. .name = "msm_mddi",
  58. .id = 0,
  59. .dev = {
  60. .platform_data = &msm_mddi0_pdata
  61. },
  62. };
  63. static struct platform_device msm_serial0_device = {
  64. .name = "msm_serial",
  65. .id = 0,
  66. };
  67. static struct platform_device *devices[] __initdata = {
  68. &msm_serial0_device,
  69. &msm_mddi0_device,
  70. &smc91x_device,
  71. };
  72. extern struct sys_timer msm_timer;
  73. static void __init halibut_init_irq(void)
  74. {
  75. msm_init_irq();
  76. }
  77. static void __init halibut_init(void)
  78. {
  79. platform_add_devices(devices, ARRAY_SIZE(devices));
  80. msm_add_devices();
  81. }
  82. static void __init halibut_map_io(void)
  83. {
  84. msm_map_common_io();
  85. }
  86. MACHINE_START(HALIBUT, "Halibut Board (QCT SURF7200A)")
  87. /* UART for LL DEBUG */
  88. .phys_io = MSM_UART1_PHYS,
  89. .io_pg_offst = ((MSM_UART1_BASE) >> 18) & 0xfffc,
  90. .boot_params = 0x10000100,
  91. .map_io = halibut_map_io,
  92. .init_irq = halibut_init_irq,
  93. .init_machine = halibut_init,
  94. .timer = &msm_timer,
  95. MACHINE_END