board-mahimahi.c 2.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687
  1. /* linux/arch/arm/mach-msm/board-mahimahi.c
  2. *
  3. * Copyright (C) 2009 Google, Inc.
  4. * Copyright (C) 2009 HTC Corporation.
  5. * Author: Dima Zavin <dima@android.com>
  6. *
  7. * This software is licensed under the terms of the GNU General Public
  8. * License version 2, as published by the Free Software Foundation, and
  9. * may be copied, distributed, and modified under those terms.
  10. *
  11. * This program is distributed in the hope that it will be useful,
  12. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  13. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  14. * GNU General Public License for more details.
  15. *
  16. */
  17. #include <linux/delay.h>
  18. #include <linux/gpio.h>
  19. #include <linux/init.h>
  20. #include <linux/input.h>
  21. #include <linux/io.h>
  22. #include <linux/kernel.h>
  23. #include <linux/platform_device.h>
  24. #include <asm/mach-types.h>
  25. #include <asm/mach/arch.h>
  26. #include <asm/mach/map.h>
  27. #include <asm/setup.h>
  28. #include <mach/board.h>
  29. #include <mach/hardware.h>
  30. #include <mach/system.h>
  31. #include "board-mahimahi.h"
  32. #include "devices.h"
  33. #include "proc_comm.h"
  34. static uint debug_uart;
  35. module_param_named(debug_uart, debug_uart, uint, 0);
  36. static struct platform_device *devices[] __initdata = {
  37. #if !defined(CONFIG_MSM_SERIAL_DEBUGGER)
  38. &msm_device_uart1,
  39. #endif
  40. &msm_device_uart_dm1,
  41. &msm_device_nand,
  42. };
  43. static void __init mahimahi_init(void)
  44. {
  45. platform_add_devices(devices, ARRAY_SIZE(devices));
  46. }
  47. static void __init mahimahi_fixup(struct machine_desc *desc, struct tag *tags,
  48. char **cmdline, struct meminfo *mi)
  49. {
  50. mi->nr_banks = 2;
  51. mi->bank[0].start = PHYS_OFFSET;
  52. mi->bank[0].node = PHYS_TO_NID(PHYS_OFFSET);
  53. mi->bank[0].size = (219*1024*1024);
  54. mi->bank[1].start = MSM_HIGHMEM_BASE;
  55. mi->bank[1].node = PHYS_TO_NID(MSM_HIGHMEM_BASE);
  56. mi->bank[1].size = MSM_HIGHMEM_SIZE;
  57. }
  58. static void __init mahimahi_map_io(void)
  59. {
  60. msm_map_common_io();
  61. msm_clock_init();
  62. }
  63. extern struct sys_timer msm_timer;
  64. MACHINE_START(MAHIMAHI, "mahimahi")
  65. #ifdef CONFIG_MSM_DEBUG_UART
  66. .phys_io = MSM_DEBUG_UART_PHYS,
  67. .io_pg_offst = ((MSM_DEBUG_UART_BASE) >> 18) & 0xfffc,
  68. #endif
  69. .boot_params = 0x20000100,
  70. .fixup = mahimahi_fixup,
  71. .map_io = mahimahi_map_io,
  72. .init_irq = msm_init_irq,
  73. .init_machine = mahimahi_init,
  74. .timer = &msm_timer,
  75. MACHINE_END