]>
Commit | Line | Data |
---|---|---|
1b802ff7 DW |
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> | |
25 | ||
26 | #include <asm/mach-types.h> | |
27 | #include <asm/mach/arch.h> | |
28 | #include <asm/mach/map.h> | |
29 | #include <asm/setup.h> | |
30 | ||
1b802ff7 | 31 | #include <mach/hardware.h> |
1b802ff7 DW |
32 | |
33 | #include "board-mahimahi.h" | |
34 | #include "devices.h" | |
35 | #include "proc_comm.h" | |
ebea60be | 36 | #include "common.h" |
1b802ff7 DW |
37 | |
38 | static uint debug_uart; | |
39 | ||
40 | module_param_named(debug_uart, debug_uart, uint, 0); | |
41 | ||
42 | static struct platform_device *devices[] __initdata = { | |
43 | #if !defined(CONFIG_MSM_SERIAL_DEBUGGER) | |
44 | &msm_device_uart1, | |
45 | #endif | |
46 | &msm_device_uart_dm1, | |
47 | &msm_device_nand, | |
48 | }; | |
49 | ||
50 | static void __init mahimahi_init(void) | |
51 | { | |
52 | platform_add_devices(devices, ARRAY_SIZE(devices)); | |
53 | } | |
54 | ||
0744a3ee RK |
55 | static void __init mahimahi_fixup(struct tag *tags, char **cmdline, |
56 | struct meminfo *mi) | |
1b802ff7 DW |
57 | { |
58 | mi->nr_banks = 2; | |
59 | mi->bank[0].start = PHYS_OFFSET; | |
60 | mi->bank[0].node = PHYS_TO_NID(PHYS_OFFSET); | |
61 | mi->bank[0].size = (219*1024*1024); | |
62 | mi->bank[1].start = MSM_HIGHMEM_BASE; | |
63 | mi->bank[1].node = PHYS_TO_NID(MSM_HIGHMEM_BASE); | |
64 | mi->bank[1].size = MSM_HIGHMEM_SIZE; | |
65 | } | |
66 | ||
67 | static void __init mahimahi_map_io(void) | |
68 | { | |
69 | msm_map_common_io(); | |
70 | msm_clock_init(); | |
71 | } | |
72 | ||
c633c531 SG |
73 | static void __init mahimahi_init_late(void) |
74 | { | |
75 | smd_debugfs_init(); | |
76 | } | |
77 | ||
6bb27d73 | 78 | void msm_timer_init(void); |
1b802ff7 DW |
79 | |
80 | MACHINE_START(MAHIMAHI, "mahimahi") | |
f631dd41 | 81 | .atag_offset = 0x100, |
1b802ff7 DW |
82 | .fixup = mahimahi_fixup, |
83 | .map_io = mahimahi_map_io, | |
84 | .init_irq = msm_init_irq, | |
85 | .init_machine = mahimahi_init, | |
c633c531 | 86 | .init_late = mahimahi_init_late, |
6bb27d73 | 87 | .init_time = msm_timer_init, |
1b802ff7 | 88 | MACHINE_END |