OMAP3: PM: Ensure MUSB block can idle when driver not loaded
[linux-ginger.git] / arch / arm / mach-msm / devices.c
blob31b6b30e98bf1099d6f65b5e5453faa9be82fc50
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>
21 #include "devices.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[] = {
29 .start = INT_UART1,
30 .end = INT_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[] = {
42 .start = INT_UART2,
43 .end = INT_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[] = {
55 .start = INT_UART3,
56 .end = INT_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 = {
67 .name = "msm_serial",
68 .id = 0,
69 .num_resources = ARRAY_SIZE(resources_uart1),
70 .resource = resources_uart1,
73 struct platform_device msm_device_uart2 = {
74 .name = "msm_serial",
75 .id = 1,
76 .num_resources = ARRAY_SIZE(resources_uart2),
77 .resource = resources_uart2,
80 struct platform_device msm_device_uart3 = {
81 .name = "msm_serial",
82 .id = 2,
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,
94 .start = INT_PWB_I2C,
95 .end = INT_PWB_I2C,
96 .flags = IORESOURCE_IRQ,
100 struct platform_device msm_device_i2c = {
101 .name = "msm_i2c",
102 .id = 0,
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,
114 .start = INT_USB_HS,
115 .end = INT_USB_HS,
116 .flags = IORESOURCE_IRQ,
120 struct platform_device msm_device_hsusb = {
121 .name = "msm_hsusb",
122 .id = -1,
123 .num_resources = ARRAY_SIZE(resources_hsusb),
124 .resource = resources_hsusb,
125 .dev = {
126 .coherent_dma_mask = 0xffffffff,
130 struct flash_platform_data msm_nand_data = {
131 .parts = NULL,
132 .nr_parts = 0,
135 static struct resource resources_nand[] = {
136 [0] = {
137 .start = 7,
138 .end = 7,
139 .flags = IORESOURCE_DMA,
143 struct platform_device msm_device_nand = {
144 .name = "msm_nand",
145 .id = -1,
146 .num_resources = ARRAY_SIZE(resources_nand),
147 .resource = resources_nand,
148 .dev = {
149 .platform_data = &msm_nand_data,
153 struct platform_device msm_device_smd = {
154 .name = "msm_smd",
155 .id = -1,
158 static struct resource resources_sdc1[] = {
160 .start = MSM_SDC1_PHYS,
161 .end = MSM_SDC1_PHYS + MSM_SDC1_SIZE - 1,
162 .flags = IORESOURCE_MEM,
165 .start = INT_SDC1_0,
166 .end = INT_SDC1_1,
167 .flags = IORESOURCE_IRQ,
170 .start = 8,
171 .end = 8,
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,
183 .start = INT_SDC2_0,
184 .end = INT_SDC2_1,
185 .flags = IORESOURCE_IRQ,
188 .start = 8,
189 .end = 8,
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,
201 .start = INT_SDC3_0,
202 .end = INT_SDC3_1,
203 .flags = IORESOURCE_IRQ,
206 .start = 8,
207 .end = 8,
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,
219 .start = INT_SDC4_0,
220 .end = INT_SDC4_1,
221 .flags = IORESOURCE_IRQ,
224 .start = 8,
225 .end = 8,
226 .flags = IORESOURCE_DMA,
230 struct platform_device msm_device_sdc1 = {
231 .name = "msm_sdcc",
232 .id = 1,
233 .num_resources = ARRAY_SIZE(resources_sdc1),
234 .resource = resources_sdc1,
235 .dev = {
236 .coherent_dma_mask = 0xffffffff,
240 struct platform_device msm_device_sdc2 = {
241 .name = "msm_sdcc",
242 .id = 2,
243 .num_resources = ARRAY_SIZE(resources_sdc2),
244 .resource = resources_sdc2,
245 .dev = {
246 .coherent_dma_mask = 0xffffffff,
250 struct platform_device msm_device_sdc3 = {
251 .name = "msm_sdcc",
252 .id = 3,
253 .num_resources = ARRAY_SIZE(resources_sdc3),
254 .resource = resources_sdc3,
255 .dev = {
256 .coherent_dma_mask = 0xffffffff,
260 struct platform_device msm_device_sdc4 = {
261 .name = "msm_sdcc",
262 .id = 4,
263 .num_resources = ARRAY_SIZE(resources_sdc4),
264 .resource = resources_sdc4,
265 .dev = {
266 .coherent_dma_mask = 0xffffffff,