Merge tag 'for-4.1' of git://git.kernel.org/pub/scm/linux/kernel/git/kishon/linux...
[deliverable/linux.git] / arch / arm / mach-msm / board-halibut.c
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>
21 #include <linux/io.h>
22 #include <linux/delay.h>
23 #include <linux/smc91x.h>
24
25 #include <mach/hardware.h>
26 #include <asm/mach-types.h>
27 #include <asm/mach/arch.h>
28 #include <asm/mach/map.h>
29 #include <asm/mach/flash.h>
30 #include <asm/setup.h>
31
32 #include <mach/irqs.h>
33 #include <mach/msm_iomap.h>
34
35 #include <linux/mtd/nand.h>
36 #include <linux/mtd/partitions.h>
37
38 #include "devices.h"
39 #include "common.h"
40
41 static struct resource smc91x_resources[] = {
42 [0] = {
43 .start = 0x9C004300,
44 .end = 0x9C004400,
45 .flags = IORESOURCE_MEM,
46 },
47 [1] = {
48 .start = MSM_GPIO_TO_INT(49),
49 .end = MSM_GPIO_TO_INT(49),
50 .flags = IORESOURCE_IRQ | IORESOURCE_IRQ_HIGHLEVEL,
51 },
52 };
53
54 static struct smc91x_platdata smc91x_platdata = {
55 .flags = SMC91X_USE_16BIT | SMC91X_NOWAIT,
56 };
57
58 static struct platform_device smc91x_device = {
59 .name = "smc91x",
60 .id = 0,
61 .num_resources = ARRAY_SIZE(smc91x_resources),
62 .resource = smc91x_resources,
63 .dev.platform_data = &smc91x_platdata,
64 };
65
66 static struct platform_device *devices[] __initdata = {
67 &msm_clock_7x01a,
68 &msm_device_gpio_7201,
69 &msm_device_uart3,
70 &msm_device_smd,
71 &msm_device_nand,
72 &msm_device_hsusb,
73 &msm_device_i2c,
74 &smc91x_device,
75 };
76
77 static void __init halibut_init_early(void)
78 {
79 arch_ioremap_caller = __msm_ioremap_caller;
80 }
81
82 static void __init halibut_init_irq(void)
83 {
84 msm_init_irq();
85 }
86
87 static void __init halibut_init(void)
88 {
89 platform_add_devices(devices, ARRAY_SIZE(devices));
90 }
91
92 static void __init halibut_map_io(void)
93 {
94 msm_map_common_io();
95 }
96
97 static void __init halibut_init_late(void)
98 {
99 smd_debugfs_init();
100 }
101
102 MACHINE_START(HALIBUT, "Halibut Board (QCT SURF7200A)")
103 .atag_offset = 0x100,
104 .map_io = halibut_map_io,
105 .init_early = halibut_init_early,
106 .init_irq = halibut_init_irq,
107 .init_machine = halibut_init,
108 .init_late = halibut_init_late,
109 .init_time = msm7x01_timer_init,
110 MACHINE_END
This page took 0.043029 seconds and 5 git commands to generate.