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/irqs.h>
20 #include <mach/msm_iomap.h>
23 #include <asm/mach/flash.h>
24 #include <linux/mtd/nand.h>
25 #include <linux/mtd/partitions.h>
27 static struct resource resources_uart1
[] = {
31 .flags
= IORESOURCE_IRQ
,
34 .start
= MSM_UART1_PHYS
,
35 .end
= MSM_UART1_PHYS
+ MSM_UART1_SIZE
- 1,
36 .flags
= IORESOURCE_MEM
,
40 static struct resource resources_uart2
[] = {
44 .flags
= IORESOURCE_IRQ
,
47 .start
= MSM_UART2_PHYS
,
48 .end
= MSM_UART2_PHYS
+ MSM_UART2_SIZE
- 1,
49 .flags
= IORESOURCE_MEM
,
53 static struct resource resources_uart3
[] = {
57 .flags
= IORESOURCE_IRQ
,
60 .start
= MSM_UART3_PHYS
,
61 .end
= MSM_UART3_PHYS
+ MSM_UART3_SIZE
- 1,
62 .flags
= IORESOURCE_MEM
,
66 struct platform_device msm_device_uart1
= {
69 .num_resources
= ARRAY_SIZE(resources_uart1
),
70 .resource
= resources_uart1
,
73 struct platform_device msm_device_uart2
= {
76 .num_resources
= ARRAY_SIZE(resources_uart2
),
77 .resource
= resources_uart2
,
80 struct platform_device msm_device_uart3
= {
83 .num_resources
= ARRAY_SIZE(resources_uart3
),
84 .resource
= resources_uart3
,
87 static struct resource resources_i2c
[] = {
89 .start
= MSM_I2C_PHYS
,
90 .end
= MSM_I2C_PHYS
+ MSM_I2C_SIZE
- 1,
91 .flags
= IORESOURCE_MEM
,
96 .flags
= IORESOURCE_IRQ
,
100 struct platform_device msm_device_i2c
= {
103 .num_resources
= ARRAY_SIZE(resources_i2c
),
104 .resource
= resources_i2c
,
107 static struct resource resources_hsusb
[] = {
109 .start
= MSM_HSUSB_PHYS
,
110 .end
= MSM_HSUSB_PHYS
+ MSM_HSUSB_SIZE
,
111 .flags
= IORESOURCE_MEM
,
116 .flags
= IORESOURCE_IRQ
,
120 struct platform_device msm_device_hsusb
= {
123 .num_resources
= ARRAY_SIZE(resources_hsusb
),
124 .resource
= resources_hsusb
,
126 .coherent_dma_mask
= 0xffffffff,
130 struct flash_platform_data msm_nand_data
= {
135 static struct resource resources_nand
[] = {
139 .flags
= IORESOURCE_DMA
,
143 struct platform_device msm_device_nand
= {
146 .num_resources
= ARRAY_SIZE(resources_nand
),
147 .resource
= resources_nand
,
149 .platform_data
= &msm_nand_data
,
153 struct platform_device msm_device_smd
= {
158 static struct resource resources_sdc1
[] = {
160 .start
= MSM_SDC1_PHYS
,
161 .end
= MSM_SDC1_PHYS
+ MSM_SDC1_SIZE
- 1,
162 .flags
= IORESOURCE_MEM
,
167 .flags
= IORESOURCE_IRQ
,
172 .flags
= IORESOURCE_DMA
,
176 static struct resource resources_sdc2
[] = {
178 .start
= MSM_SDC2_PHYS
,
179 .end
= MSM_SDC2_PHYS
+ MSM_SDC2_SIZE
- 1,
180 .flags
= IORESOURCE_MEM
,
185 .flags
= IORESOURCE_IRQ
,
190 .flags
= IORESOURCE_DMA
,
194 static struct resource resources_sdc3
[] = {
196 .start
= MSM_SDC3_PHYS
,
197 .end
= MSM_SDC3_PHYS
+ MSM_SDC3_SIZE
- 1,
198 .flags
= IORESOURCE_MEM
,
203 .flags
= IORESOURCE_IRQ
,
208 .flags
= IORESOURCE_DMA
,
212 static struct resource resources_sdc4
[] = {
214 .start
= MSM_SDC4_PHYS
,
215 .end
= MSM_SDC4_PHYS
+ MSM_SDC4_SIZE
- 1,
216 .flags
= IORESOURCE_MEM
,
221 .flags
= IORESOURCE_IRQ
,
226 .flags
= IORESOURCE_DMA
,
230 struct platform_device msm_device_sdc1
= {
233 .num_resources
= ARRAY_SIZE(resources_sdc1
),
234 .resource
= resources_sdc1
,
236 .coherent_dma_mask
= 0xffffffff,
240 struct platform_device msm_device_sdc2
= {
243 .num_resources
= ARRAY_SIZE(resources_sdc2
),
244 .resource
= resources_sdc2
,
246 .coherent_dma_mask
= 0xffffffff,
250 struct platform_device msm_device_sdc3
= {
253 .num_resources
= ARRAY_SIZE(resources_sdc3
),
254 .resource
= resources_sdc3
,
256 .coherent_dma_mask
= 0xffffffff,
260 struct platform_device msm_device_sdc4
= {
263 .num_resources
= ARRAY_SIZE(resources_sdc4
),
264 .resource
= resources_sdc4
,
266 .coherent_dma_mask
= 0xffffffff,