Daniel Walker | 1b802ff | 2010-03-04 15:13:47 -0800 | [diff] [blame] | 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 | |
| 18 | #include <linux/delay.h> |
| 19 | #include <linux/gpio.h> |
| 20 | #include <linux/init.h> |
| 21 | #include <linux/input.h> |
| 22 | #include <linux/io.h> |
| 23 | #include <linux/kernel.h> |
| 24 | #include <linux/platform_device.h> |
Laura Abbott | 1c2f87c | 2014-04-13 22:54:58 +0100 | [diff] [blame] | 25 | #include <linux/memblock.h> |
Daniel Walker | 1b802ff | 2010-03-04 15:13:47 -0800 | [diff] [blame] | 26 | |
| 27 | #include <asm/mach-types.h> |
| 28 | #include <asm/mach/arch.h> |
| 29 | #include <asm/mach/map.h> |
| 30 | #include <asm/setup.h> |
| 31 | |
Daniel Walker | 1b802ff | 2010-03-04 15:13:47 -0800 | [diff] [blame] | 32 | #include <mach/hardware.h> |
Daniel Walker | 1b802ff | 2010-03-04 15:13:47 -0800 | [diff] [blame] | 33 | |
| 34 | #include "board-mahimahi.h" |
| 35 | #include "devices.h" |
| 36 | #include "proc_comm.h" |
Stephen Boyd | ebea60b | 2013-07-24 13:54:31 -0700 | [diff] [blame] | 37 | #include "common.h" |
Daniel Walker | 1b802ff | 2010-03-04 15:13:47 -0800 | [diff] [blame] | 38 | |
| 39 | static uint debug_uart; |
| 40 | |
| 41 | module_param_named(debug_uart, debug_uart, uint, 0); |
| 42 | |
| 43 | static struct platform_device *devices[] __initdata = { |
| 44 | #if !defined(CONFIG_MSM_SERIAL_DEBUGGER) |
| 45 | &msm_device_uart1, |
| 46 | #endif |
| 47 | &msm_device_uart_dm1, |
| 48 | &msm_device_nand, |
| 49 | }; |
| 50 | |
| 51 | static void __init mahimahi_init(void) |
| 52 | { |
| 53 | platform_add_devices(devices, ARRAY_SIZE(devices)); |
| 54 | } |
| 55 | |
Laura Abbott | 1c2f87c | 2014-04-13 22:54:58 +0100 | [diff] [blame] | 56 | static void __init mahimahi_fixup(struct tag *tags, char **cmdline) |
Daniel Walker | 1b802ff | 2010-03-04 15:13:47 -0800 | [diff] [blame] | 57 | { |
Laura Abbott | 1c2f87c | 2014-04-13 22:54:58 +0100 | [diff] [blame] | 58 | memblock_add(PHYS_OFFSET, 219*SZ_1M); |
| 59 | memblock_add(MSM_HIGHMEM_BASE, MSM_HIGHMEM_SIZE); |
Daniel Walker | 1b802ff | 2010-03-04 15:13:47 -0800 | [diff] [blame] | 60 | } |
| 61 | |
| 62 | static void __init mahimahi_map_io(void) |
| 63 | { |
| 64 | msm_map_common_io(); |
| 65 | msm_clock_init(); |
| 66 | } |
| 67 | |
Shawn Guo | c633c53 | 2012-05-02 15:53:20 +0800 | [diff] [blame] | 68 | static void __init mahimahi_init_late(void) |
| 69 | { |
| 70 | smd_debugfs_init(); |
| 71 | } |
| 72 | |
Stephen Warren | 6bb27d7 | 2012-11-08 12:40:59 -0700 | [diff] [blame] | 73 | void msm_timer_init(void); |
Daniel Walker | 1b802ff | 2010-03-04 15:13:47 -0800 | [diff] [blame] | 74 | |
| 75 | MACHINE_START(MAHIMAHI, "mahimahi") |
Nicolas Pitre | f631dd4 | 2011-07-05 22:38:14 -0400 | [diff] [blame] | 76 | .atag_offset = 0x100, |
Daniel Walker | 1b802ff | 2010-03-04 15:13:47 -0800 | [diff] [blame] | 77 | .fixup = mahimahi_fixup, |
| 78 | .map_io = mahimahi_map_io, |
| 79 | .init_irq = msm_init_irq, |
| 80 | .init_machine = mahimahi_init, |
Shawn Guo | c633c53 | 2012-05-02 15:53:20 +0800 | [diff] [blame] | 81 | .init_late = mahimahi_init_late, |
Stephen Warren | 6bb27d7 | 2012-11-08 12:40:59 -0700 | [diff] [blame] | 82 | .init_time = msm_timer_init, |
Daniel Walker | 1b802ff | 2010-03-04 15:13:47 -0800 | [diff] [blame] | 83 | MACHINE_END |