blob: e61967dde9a1fea73b5181550a1ffe10ebe79bb9 [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 King9ce8bb52009-01-27 22:44:12 +000030#include <mach/irqs.h>
Russell Kinga09e64f2008-08-05 16:14:15 +010031#include <mach/board.h>
32#include <mach/msm_iomap.h>
Brian Swetland9e73c842007-11-26 04:12:13 -080033
Brian Swetland9e73c842007-11-26 04:12:13 -080034#include <linux/mtd/nand.h>
35#include <linux/mtd/partitions.h>
36
Brian Swetlandbcc0f6a2008-09-10 14:00:53 -070037#include "devices.h"
38
Brian Swetland9e73c842007-11-26 04:12:13 -080039static struct resource smc91x_resources[] = {
40 [0] = {
41 .start = 0x9C004300,
42 .end = 0x9C004400,
43 .flags = IORESOURCE_MEM,
44 },
45 [1] = {
46 .start = MSM_GPIO_TO_INT(49),
47 .end = MSM_GPIO_TO_INT(49),
48 .flags = IORESOURCE_IRQ,
49 },
50};
51
52static struct platform_device smc91x_device = {
53 .name = "smc91x",
54 .id = 0,
55 .num_resources = ARRAY_SIZE(smc91x_resources),
56 .resource = smc91x_resources,
57};
58
Brian Swetland9e73c842007-11-26 04:12:13 -080059static struct platform_device *devices[] __initdata = {
Brian Swetlandbcc0f6a2008-09-10 14:00:53 -070060 &msm_device_uart3,
61 &msm_device_smd,
62 &msm_device_nand,
63 &msm_device_hsusb,
64 &msm_device_i2c,
Brian Swetland9e73c842007-11-26 04:12:13 -080065 &smc91x_device,
66};
67
68extern struct sys_timer msm_timer;
69
70static void __init halibut_init_irq(void)
71{
72 msm_init_irq();
73}
74
75static void __init halibut_init(void)
76{
77 platform_add_devices(devices, ARRAY_SIZE(devices));
Brian Swetland9e73c842007-11-26 04:12:13 -080078}
79
80static void __init halibut_map_io(void)
81{
82 msm_map_common_io();
Brian Swetland600f7cf2008-09-09 11:04:14 -070083 msm_clock_init();
Brian Swetland9e73c842007-11-26 04:12:13 -080084}
85
86MACHINE_START(HALIBUT, "Halibut Board (QCT SURF7200A)")
Brian Swetland9e73c842007-11-26 04:12:13 -080087 .boot_params = 0x10000100,
88 .map_io = halibut_map_io,
89 .init_irq = halibut_init_irq,
90 .init_machine = halibut_init,
91 .timer = &msm_timer,
92MACHINE_END