board-halibut.c 2.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192
  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/irqs.h>
  28. #include <mach/board.h>
  29. #include <mach/msm_iomap.h>
  30. #include <linux/mtd/nand.h>
  31. #include <linux/mtd/partitions.h>
  32. #include "devices.h"
  33. static struct resource smc91x_resources[] = {
  34. [0] = {
  35. .start = 0x9C004300,
  36. .end = 0x9C004400,
  37. .flags = IORESOURCE_MEM,
  38. },
  39. [1] = {
  40. .start = MSM_GPIO_TO_INT(49),
  41. .end = MSM_GPIO_TO_INT(49),
  42. .flags = IORESOURCE_IRQ,
  43. },
  44. };
  45. static struct platform_device smc91x_device = {
  46. .name = "smc91x",
  47. .id = 0,
  48. .num_resources = ARRAY_SIZE(smc91x_resources),
  49. .resource = smc91x_resources,
  50. };
  51. static struct platform_device *devices[] __initdata = {
  52. &msm_device_uart3,
  53. &msm_device_smd,
  54. &msm_device_nand,
  55. &msm_device_hsusb,
  56. &msm_device_i2c,
  57. &smc91x_device,
  58. };
  59. extern struct sys_timer msm_timer;
  60. static void __init halibut_init_irq(void)
  61. {
  62. msm_init_irq();
  63. }
  64. static void __init halibut_init(void)
  65. {
  66. platform_add_devices(devices, ARRAY_SIZE(devices));
  67. }
  68. static void __init halibut_map_io(void)
  69. {
  70. msm_map_common_io();
  71. msm_clock_init();
  72. }
  73. MACHINE_START(HALIBUT, "Halibut Board (QCT SURF7200A)")
  74. .boot_params = 0x10000100,
  75. .map_io = halibut_map_io,
  76. .init_irq = halibut_init_irq,
  77. .init_machine = halibut_init,
  78. .timer = &msm_timer,
  79. MACHINE_END