x86: use _ASM_EXTABLE macro in arch/x86/lib/usercopy_32.c
[wrt350n-kernel.git] / arch / arm / mach-msm / common.c
blob3f5d3362f887da2de2f3bab432a9cdec0a967f19
1 /* linux/arch/arm/mach-msm/common.c
3 * Common setup code for MSM7K Boards
5 * Copyright (C) 2007 Google, Inc.
6 * Author: Brian Swetland <swetland@google.com>
8 * This software is licensed under the terms of the GNU General Public
9 * License version 2, as published by the Free Software Foundation, and
10 * may be copied, distributed, and modified under those terms.
12 * This program is distributed in the hope that it will be useful,
13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 * GNU General Public License for more details.
19 #include <linux/kernel.h>
20 #include <linux/init.h>
21 #include <linux/platform_device.h>
23 #include <asm/mach/flash.h>
24 #include <asm/io.h>
26 #include <asm/setup.h>
28 #include <linux/mtd/nand.h>
29 #include <linux/mtd/partitions.h>
31 #include <asm/arch/msm_iomap.h>
33 #include <asm/arch/board.h>
35 struct flash_platform_data msm_nand_data = {
36 .parts = 0,
37 .nr_parts = 0,
40 static struct resource msm_nand_resources[] = {
41 [0] = {
42 .start = 7,
43 .end = 7,
44 .flags = IORESOURCE_DMA,
48 static struct platform_device msm_nand_device = {
49 .name = "msm_nand",
50 .id = -1,
51 .num_resources = ARRAY_SIZE(msm_nand_resources),
52 .resource = msm_nand_resources,
53 .dev = {
54 .platform_data = &msm_nand_data,
58 static struct platform_device msm_smd_device = {
59 .name = "msm_smd",
60 .id = -1,
63 static struct resource msm_i2c_resources[] = {
65 .start = MSM_I2C_BASE,
66 .end = MSM_I2C_BASE + MSM_I2C_SIZE - 1,
67 .flags = IORESOURCE_MEM,
70 .start = INT_PWB_I2C,
71 .end = INT_PWB_I2C,
72 .flags = IORESOURCE_IRQ,
76 static struct platform_device msm_i2c_device = {
77 .name = "msm_i2c",
78 .id = 0,
79 .num_resources = ARRAY_SIZE(msm_i2c_resources),
80 .resource = msm_i2c_resources,
83 static struct resource usb_resources[] = {
85 .start = MSM_HSUSB_PHYS,
86 .end = MSM_HSUSB_PHYS + MSM_HSUSB_SIZE,
87 .flags = IORESOURCE_MEM,
90 .start = INT_USB_HS,
91 .end = INT_USB_HS,
92 .flags = IORESOURCE_IRQ,
96 static struct platform_device msm_hsusb_device = {
97 .name = "msm_hsusb",
98 .id = -1,
99 .num_resources = ARRAY_SIZE(usb_resources),
100 .resource = usb_resources,
101 .dev = {
102 .coherent_dma_mask = 0xffffffff,
106 static struct platform_device *devices[] __initdata = {
107 &msm_nand_device,
108 &msm_smd_device,
109 &msm_i2c_device,
110 &msm_hsusb_device,
113 void __init msm_add_devices(void)
115 platform_add_devices(devices, ARRAY_SIZE(devices));