Linux Kernel  3.7.1
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
board-halibut.c
Go to the documentation of this file.
1 /* linux/arch/arm/mach-msm/board-halibut.c
2  *
3  * Copyright (C) 2007 Google, Inc.
4  * Author: Brian Swetland <[email protected]>
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 
24 #include <mach/hardware.h>
25 #include <asm/mach-types.h>
26 #include <asm/mach/arch.h>
27 #include <asm/mach/map.h>
28 #include <asm/mach/flash.h>
29 #include <asm/setup.h>
30 
31 #include <mach/irqs.h>
32 #include <mach/board.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,
51  },
52 };
53 
54 static struct platform_device smc91x_device = {
55  .name = "smc91x",
56  .id = 0,
57  .num_resources = ARRAY_SIZE(smc91x_resources),
58  .resource = smc91x_resources,
59 };
60 
61 static struct platform_device *devices[] __initdata = {
67  &smc91x_device,
68 };
69 
70 static void __init halibut_init_early(void)
71 {
73 }
74 
75 static void __init halibut_init_irq(void)
76 {
77  msm_init_irq();
78 }
79 
80 static void __init halibut_init(void)
81 {
82  platform_add_devices(devices, ARRAY_SIZE(devices));
83 }
84 
85 static void __init halibut_fixup(struct tag *tags, char **cmdline,
86  struct meminfo *mi)
87 {
88 }
89 
90 static void __init halibut_map_io(void)
91 {
94 }
95 
96 static void __init halibut_init_late(void)
97 {
98  smd_debugfs_init();
99 }
100 
101 MACHINE_START(HALIBUT, "Halibut Board (QCT SURF7200A)")
102  .atag_offset = 0x100,
103  .fixup = halibut_fixup,
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  .timer = &msm7x01_timer,