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>
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 = {
40 static struct resource msm_nand_resources[] = {
44 .flags = IORESOURCE_DMA,
48 static struct platform_device msm_nand_device = {
51 .num_resources = ARRAY_SIZE(msm_nand_resources),
52 .resource = msm_nand_resources,
54 .platform_data = &msm_nand_data,
58 static struct platform_device msm_smd_device = {
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,
72 .flags = IORESOURCE_IRQ,
76 static struct platform_device msm_i2c_device = {
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,
92 .flags = IORESOURCE_IRQ,
96 static struct platform_device msm_hsusb_device = {
99 .num_resources = ARRAY_SIZE(usb_resources),
100 .resource = usb_resources,
102 .coherent_dma_mask = 0xffffffff,
106 static struct platform_device *devices[] __initdata = {
113 void __init msm_add_devices(void)
115 platform_add_devices(devices, ARRAY_SIZE(devices));