1 /* linux/arch/arm/mach-msm/devices.c
3 * Copyright (C) 2008 Google, Inc.
5 * This software is licensed under the terms of the GNU General Public
6 * License version 2, as published by the Free Software Foundation, and
7 * may be copied, distributed, and modified under those terms.
9 * This program is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 * GNU General Public License for more details.
16 #include <linux/kernel.h>
17 #include <linux/platform_device.h>
19 #include <mach/msm_iomap.h>
22 #include <asm/mach/flash.h>
23 #include <linux/mtd/nand.h>
24 #include <linux/mtd/partitions.h>
26 static struct resource resources_uart1[] = {
30 .flags = IORESOURCE_IRQ,
33 .start = MSM_UART1_PHYS,
34 .end = MSM_UART1_PHYS + MSM_UART1_SIZE - 1,
35 .flags = IORESOURCE_MEM,
39 static struct resource resources_uart2[] = {
43 .flags = IORESOURCE_IRQ,
46 .start = MSM_UART2_PHYS,
47 .end = MSM_UART2_PHYS + MSM_UART2_SIZE - 1,
48 .flags = IORESOURCE_MEM,
52 static struct resource resources_uart3[] = {
56 .flags = IORESOURCE_IRQ,
59 .start = MSM_UART3_PHYS,
60 .end = MSM_UART3_PHYS + MSM_UART3_SIZE - 1,
61 .flags = IORESOURCE_MEM,
65 struct platform_device msm_device_uart1 = {
68 .num_resources = ARRAY_SIZE(resources_uart1),
69 .resource = resources_uart1,
72 struct platform_device msm_device_uart2 = {
75 .num_resources = ARRAY_SIZE(resources_uart2),
76 .resource = resources_uart2,
79 struct platform_device msm_device_uart3 = {
82 .num_resources = ARRAY_SIZE(resources_uart3),
83 .resource = resources_uart3,
86 static struct resource resources_i2c[] = {
88 .start = MSM_I2C_PHYS,
89 .end = MSM_I2C_PHYS + MSM_I2C_SIZE - 1,
90 .flags = IORESOURCE_MEM,
95 .flags = IORESOURCE_IRQ,
99 struct platform_device msm_device_i2c = {
102 .num_resources = ARRAY_SIZE(resources_i2c),
103 .resource = resources_i2c,
106 static struct resource resources_hsusb[] = {
108 .start = MSM_HSUSB_PHYS,
109 .end = MSM_HSUSB_PHYS + MSM_HSUSB_SIZE,
110 .flags = IORESOURCE_MEM,
115 .flags = IORESOURCE_IRQ,
119 struct platform_device msm_device_hsusb = {
122 .num_resources = ARRAY_SIZE(resources_hsusb),
123 .resource = resources_hsusb,
125 .coherent_dma_mask = 0xffffffff,
129 struct flash_platform_data msm_nand_data = {
134 static struct resource resources_nand[] = {
138 .flags = IORESOURCE_DMA,
142 struct platform_device msm_device_nand = {
145 .num_resources = ARRAY_SIZE(resources_nand),
146 .resource = resources_nand,
148 .platform_data = &msm_nand_data,
152 struct platform_device msm_device_smd = {
157 static struct resource resources_sdc1[] = {
159 .start = MSM_SDC1_PHYS,
160 .end = MSM_SDC1_PHYS + MSM_SDC1_SIZE - 1,
161 .flags = IORESOURCE_MEM,
166 .flags = IORESOURCE_IRQ,
171 .flags = IORESOURCE_DMA,
175 static struct resource resources_sdc2[] = {
177 .start = MSM_SDC2_PHYS,
178 .end = MSM_SDC2_PHYS + MSM_SDC2_SIZE - 1,
179 .flags = IORESOURCE_MEM,
184 .flags = IORESOURCE_IRQ,
189 .flags = IORESOURCE_DMA,
193 static struct resource resources_sdc3[] = {
195 .start = MSM_SDC3_PHYS,
196 .end = MSM_SDC3_PHYS + MSM_SDC3_SIZE - 1,
197 .flags = IORESOURCE_MEM,
202 .flags = IORESOURCE_IRQ,
207 .flags = IORESOURCE_DMA,
211 static struct resource resources_sdc4[] = {
213 .start = MSM_SDC4_PHYS,
214 .end = MSM_SDC4_PHYS + MSM_SDC4_SIZE - 1,
215 .flags = IORESOURCE_MEM,
220 .flags = IORESOURCE_IRQ,
225 .flags = IORESOURCE_DMA,
229 struct platform_device msm_device_sdc1 = {
232 .num_resources = ARRAY_SIZE(resources_sdc1),
233 .resource = resources_sdc1,
235 .coherent_dma_mask = 0xffffffff,
239 struct platform_device msm_device_sdc2 = {
242 .num_resources = ARRAY_SIZE(resources_sdc2),
243 .resource = resources_sdc2,
245 .coherent_dma_mask = 0xffffffff,
249 struct platform_device msm_device_sdc3 = {
252 .num_resources = ARRAY_SIZE(resources_sdc3),
253 .resource = resources_sdc3,
255 .coherent_dma_mask = 0xffffffff,
259 struct platform_device msm_device_sdc4 = {
262 .num_resources = ARRAY_SIZE(resources_sdc4),
263 .resource = resources_sdc4,
265 .coherent_dma_mask = 0xffffffff,