]> bbs.cooldavid.org Git - net-next-2.6.git/blame - arch/arm/mach-msm/board-halibut.c
Merge branches 'irq-core-for-linus' and 'core-locking-for-linus' of git://git.kernel...
[net-next-2.6.git] / arch / arm / mach-msm / board-halibut.c
CommitLineData
9e73c84c
BS
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
17#include <linux/kernel.h>
18#include <linux/init.h>
19#include <linux/platform_device.h>
20#include <linux/input.h>
fced80c7
RK
21#include <linux/io.h>
22#include <linux/delay.h>
9e73c84c 23
a09e64fb 24#include <mach/hardware.h>
9e73c84c
BS
25#include <asm/mach-types.h>
26#include <asm/mach/arch.h>
27#include <asm/mach/map.h>
28#include <asm/mach/flash.h>
6bd631e1 29#include <asm/setup.h>
9e73c84c 30
9ce8bb55 31#include <mach/irqs.h>
a09e64fb
RK
32#include <mach/board.h>
33#include <mach/msm_iomap.h>
9e73c84c 34
9e73c84c
BS
35#include <linux/mtd/nand.h>
36#include <linux/mtd/partitions.h>
37
bcc0f6af
BS
38#include "devices.h"
39
9e73c84c
BS
40static struct resource smc91x_resources[] = {
41 [0] = {
42 .start = 0x9C004300,
43 .end = 0x9C004400,
44 .flags = IORESOURCE_MEM,
45 },
46 [1] = {
47 .start = MSM_GPIO_TO_INT(49),
48 .end = MSM_GPIO_TO_INT(49),
49 .flags = IORESOURCE_IRQ,
50 },
51};
52
53static struct platform_device smc91x_device = {
54 .name = "smc91x",
55 .id = 0,
56 .num_resources = ARRAY_SIZE(smc91x_resources),
57 .resource = smc91x_resources,
58};
59
9e73c84c 60static struct platform_device *devices[] __initdata = {
bcc0f6af
BS
61 &msm_device_uart3,
62 &msm_device_smd,
63 &msm_device_nand,
64 &msm_device_hsusb,
65 &msm_device_i2c,
9e73c84c
BS
66 &smc91x_device,
67};
68
69extern struct sys_timer msm_timer;
70
71static void __init halibut_init_irq(void)
72{
73 msm_init_irq();
74}
75
76static void __init halibut_init(void)
77{
78 platform_add_devices(devices, ARRAY_SIZE(devices));
9e73c84c
BS
79}
80
6bd631e1
AH
81static void __init halibut_fixup(struct machine_desc *desc, struct tag *tags,
82 char **cmdline, struct meminfo *mi)
83{
84 mi->nr_banks=1;
85 mi->bank[0].start = PHYS_OFFSET;
6bd631e1
AH
86 mi->bank[0].size = (101*1024*1024);
87}
88
9e73c84c
BS
89static void __init halibut_map_io(void)
90{
91 msm_map_common_io();
5e96da5d 92 msm_clock_init(msm_clocks_7x01a, msm_num_clocks_7x01a);
9e73c84c
BS
93}
94
95MACHINE_START(HALIBUT, "Halibut Board (QCT SURF7200A)")
36cf1b55 96#ifdef CONFIG_MSM_DEBUG_UART
36cf1b55 97#endif
9e73c84c 98 .boot_params = 0x10000100,
6bd631e1 99 .fixup = halibut_fixup,
9e73c84c
BS
100 .map_io = halibut_map_io,
101 .init_irq = halibut_init_irq,
102 .init_machine = halibut_init,
103 .timer = &msm_timer,
104MACHINE_END