blob: a24259133e070258de7aa83236159d681fc4e276 [file] [log] [blame]
Brian Swetland9e73c842007-11-26 04:12:13 -08001/* 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>
Russell Kingfced80c2008-09-06 12:10:45 +010021#include <linux/io.h>
22#include <linux/delay.h>
Brian Swetland9e73c842007-11-26 04:12:13 -080023
Russell Kinga09e64f2008-08-05 16:14:15 +010024#include <mach/hardware.h>
Brian Swetland9e73c842007-11-26 04:12:13 -080025#include <asm/mach-types.h>
26#include <asm/mach/arch.h>
27#include <asm/mach/map.h>
28#include <asm/mach/flash.h>
29
Russell Kinga09e64f2008-08-05 16:14:15 +010030#include <mach/board.h>
31#include <mach/msm_iomap.h>
Brian Swetland9e73c842007-11-26 04:12:13 -080032
Brian Swetland9e73c842007-11-26 04:12:13 -080033#include <linux/mtd/nand.h>
34#include <linux/mtd/partitions.h>
35
36static struct resource smc91x_resources[] = {
37 [0] = {
38 .start = 0x9C004300,
39 .end = 0x9C004400,
40 .flags = IORESOURCE_MEM,
41 },
42 [1] = {
43 .start = MSM_GPIO_TO_INT(49),
44 .end = MSM_GPIO_TO_INT(49),
45 .flags = IORESOURCE_IRQ,
46 },
47};
48
49static struct platform_device smc91x_device = {
50 .name = "smc91x",
51 .id = 0,
52 .num_resources = ARRAY_SIZE(smc91x_resources),
53 .resource = smc91x_resources,
54};
55
56static void mddi0_panel_power(int on)
57{
58}
59
60static struct msm_mddi_platform_data msm_mddi0_pdata = {
61 .panel_power = mddi0_panel_power,
62 .has_vsync_irq = 0,
63};
64
65static struct platform_device msm_mddi0_device = {
66 .name = "msm_mddi",
67 .id = 0,
68 .dev = {
69 .platform_data = &msm_mddi0_pdata
70 },
71};
72
73static struct platform_device msm_serial0_device = {
74 .name = "msm_serial",
75 .id = 0,
76};
77
78static struct platform_device *devices[] __initdata = {
79 &msm_serial0_device,
80 &msm_mddi0_device,
81 &smc91x_device,
82};
83
84extern struct sys_timer msm_timer;
85
86static void __init halibut_init_irq(void)
87{
88 msm_init_irq();
89}
90
91static void __init halibut_init(void)
92{
93 platform_add_devices(devices, ARRAY_SIZE(devices));
94 msm_add_devices();
95}
96
97static void __init halibut_map_io(void)
98{
99 msm_map_common_io();
100}
101
102MACHINE_START(HALIBUT, "Halibut Board (QCT SURF7200A)")
103
104/* UART for LL DEBUG */
105 .phys_io = MSM_UART1_PHYS,
106 .io_pg_offst = ((MSM_UART1_BASE) >> 18) & 0xfffc,
107
108 .boot_params = 0x10000100,
109 .map_io = halibut_map_io,
110 .init_irq = halibut_init_irq,
111 .init_machine = halibut_init,
112 .timer = &msm_timer,
113MACHINE_END