board-halibut.c 2.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106
  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/board.h>
  30. #include <mach/msm_iomap.h>
  31. #include <linux/mtd/nand.h>
  32. #include <linux/mtd/partitions.h>
  33. #include "devices.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_device_uart3,
  54. &msm_device_smd,
  55. &msm_device_nand,
  56. &msm_device_hsusb,
  57. &msm_device_i2c,
  58. &smc91x_device,
  59. };
  60. extern struct sys_timer msm_timer;
  61. static void __init halibut_init_early(void)
  62. {
  63. arch_ioremap_caller = __msm_ioremap_caller;
  64. }
  65. static void __init halibut_init_irq(void)
  66. {
  67. msm_init_irq();
  68. }
  69. static void __init halibut_init(void)
  70. {
  71. platform_add_devices(devices, ARRAY_SIZE(devices));
  72. }
  73. static void __init halibut_fixup(struct tag *tags, char **cmdline,
  74. struct meminfo *mi)
  75. {
  76. }
  77. static void __init halibut_map_io(void)
  78. {
  79. msm_map_common_io();
  80. msm_clock_init(msm_clocks_7x01a, msm_num_clocks_7x01a);
  81. }
  82. MACHINE_START(HALIBUT, "Halibut Board (QCT SURF7200A)")
  83. .atag_offset = 0x100,
  84. .fixup = halibut_fixup,
  85. .map_io = halibut_map_io,
  86. .init_early = halibut_init_early,
  87. .init_irq = halibut_init_irq,
  88. .init_machine = halibut_init,
  89. .timer = &msm_timer,
  90. MACHINE_END