board-mahimahi.c 2.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788
  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 "board-mahimahi.h"
  31. #include "devices.h"
  32. #include "proc_comm.h"
  33. static uint debug_uart;
  34. module_param_named(debug_uart, debug_uart, uint, 0);
  35. static struct platform_device *devices[] __initdata = {
  36. #if !defined(CONFIG_MSM_SERIAL_DEBUGGER)
  37. &msm_device_uart1,
  38. #endif
  39. &msm_device_uart_dm1,
  40. &msm_device_nand,
  41. };
  42. static void __init mahimahi_init(void)
  43. {
  44. platform_add_devices(devices, ARRAY_SIZE(devices));
  45. }
  46. static void __init mahimahi_fixup(struct tag *tags, char **cmdline,
  47. struct meminfo *mi)
  48. {
  49. mi->nr_banks = 2;
  50. mi->bank[0].start = PHYS_OFFSET;
  51. mi->bank[0].node = PHYS_TO_NID(PHYS_OFFSET);
  52. mi->bank[0].size = (219*1024*1024);
  53. mi->bank[1].start = MSM_HIGHMEM_BASE;
  54. mi->bank[1].node = PHYS_TO_NID(MSM_HIGHMEM_BASE);
  55. mi->bank[1].size = MSM_HIGHMEM_SIZE;
  56. }
  57. static void __init mahimahi_map_io(void)
  58. {
  59. msm_map_common_io();
  60. msm_clock_init();
  61. }
  62. static void __init mahimahi_init_late(void)
  63. {
  64. smd_debugfs_init();
  65. }
  66. void msm_timer_init(void);
  67. MACHINE_START(MAHIMAHI, "mahimahi")
  68. .atag_offset = 0x100,
  69. .fixup = mahimahi_fixup,
  70. .map_io = mahimahi_map_io,
  71. .init_irq = msm_init_irq,
  72. .init_machine = mahimahi_init,
  73. .init_late = mahimahi_init_late,
  74. .init_time = msm_timer_init,
  75. MACHINE_END