board-halibut.c 2.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110
  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 <asm/setup.h>
  28. #include <mach/irqs.h>
  29. #include <mach/msm_iomap.h>
  30. #include <linux/mtd/nand.h>
  31. #include <linux/mtd/partitions.h>
  32. #include "devices.h"
  33. #include "common.h"
  34. static struct resource smc91x_resources[] = {
  35. [0] = {
  36. .start = 0x9C004300,
  37. .end = 0x9C004400,
  38. .flags = IORESOURCE_MEM,
  39. },
  40. [1] = {
  41. .start = MSM_GPIO_TO_INT(49),
  42. .end = MSM_GPIO_TO_INT(49),
  43. .flags = IORESOURCE_IRQ,
  44. },
  45. };
  46. static struct platform_device smc91x_device = {
  47. .name = "smc91x",
  48. .id = 0,
  49. .num_resources = ARRAY_SIZE(smc91x_resources),
  50. .resource = smc91x_resources,
  51. };
  52. static struct platform_device *devices[] __initdata = {
  53. &msm_clock_7x01a,
  54. &msm_device_gpio_7201,
  55. &msm_device_uart3,
  56. &msm_device_smd,
  57. &msm_device_nand,
  58. &msm_device_hsusb,
  59. &msm_device_i2c,
  60. &smc91x_device,
  61. };
  62. static void __init halibut_init_early(void)
  63. {
  64. arch_ioremap_caller = __msm_ioremap_caller;
  65. }
  66. static void __init halibut_init_irq(void)
  67. {
  68. msm_init_irq();
  69. }
  70. static void __init halibut_init(void)
  71. {
  72. platform_add_devices(devices, ARRAY_SIZE(devices));
  73. }
  74. static void __init halibut_fixup(struct tag *tags, char **cmdline,
  75. struct meminfo *mi)
  76. {
  77. }
  78. static void __init halibut_map_io(void)
  79. {
  80. msm_map_common_io();
  81. }
  82. static void __init halibut_init_late(void)
  83. {
  84. smd_debugfs_init();
  85. }
  86. MACHINE_START(HALIBUT, "Halibut Board (QCT SURF7200A)")
  87. .atag_offset = 0x100,
  88. .fixup = halibut_fixup,
  89. .map_io = halibut_map_io,
  90. .init_early = halibut_init_early,
  91. .init_irq = halibut_init_irq,
  92. .init_machine = halibut_init,
  93. .init_late = halibut_init_late,
  94. .init_time = msm7x01_timer_init,
  95. MACHINE_END