]>
Commit | Line | Data |
---|---|---|
253ff1fa UKK |
1 | /* |
2 | * Copyright (C) 2009-2010 Pengutronix | |
3 | * Uwe Kleine-Koenig <u.kleine-koenig@pengutronix.de> | |
4 | * | |
5 | * This program is free software; you can redistribute it and/or modify it under | |
6 | * the terms of the GNU General Public License version 2 as published by the | |
7 | * Free Software Foundation. | |
8 | */ | |
9 | #include <linux/kernel.h> | |
10 | #include <linux/platform_device.h> | |
11 | #include <linux/init.h> | |
12 | ||
b78d8e59 SG |
13 | extern struct device mxc_aips_bus; |
14 | ||
6332c107 UKK |
15 | struct platform_device *imx_add_platform_device_dmamask( |
16 | const char *name, int id, | |
253ff1fa | 17 | const struct resource *res, unsigned int num_resources, |
6332c107 UKK |
18 | const void *data, size_t size_data, u64 dmamask); |
19 | ||
20 | static inline struct platform_device *imx_add_platform_device( | |
21 | const char *name, int id, | |
22 | const struct resource *res, unsigned int num_resources, | |
23 | const void *data, size_t size_data) | |
24 | { | |
25 | return imx_add_platform_device_dmamask( | |
26 | name, id, res, num_resources, data, size_data, 0); | |
27 | } | |
66384eed | 28 | |
6bd96f3c UKK |
29 | #include <linux/fec.h> |
30 | struct imx_fec_data { | |
31 | resource_size_t iobase; | |
32 | resource_size_t irq; | |
33 | }; | |
34 | struct platform_device *__init imx_add_fec( | |
35 | const struct imx_fec_data *data, | |
36 | const struct fec_platform_data *pdata); | |
37 | ||
61c68502 | 38 | #include <linux/can/platform/flexcan.h> |
fc40d019 UKK |
39 | struct imx_flexcan_data { |
40 | int id; | |
41 | resource_size_t iobase; | |
42 | resource_size_t iosize; | |
43 | resource_size_t irq; | |
44 | }; | |
45 | struct platform_device *__init imx_add_flexcan( | |
46 | const struct imx_flexcan_data *data, | |
61c68502 | 47 | const struct flexcan_platform_data *pdata); |
61c68502 | 48 | |
bd455ed3 UKK |
49 | #include <linux/fsl_devices.h> |
50 | struct imx_fsl_usb2_udc_data { | |
51 | resource_size_t iobase; | |
52 | resource_size_t irq; | |
53 | }; | |
54 | struct platform_device *__init imx_add_fsl_usb2_udc( | |
55 | const struct imx_fsl_usb2_udc_data *data, | |
56 | const struct fsl_usb2_platform_data *pdata); | |
57 | ||
47c53822 DN |
58 | #include <linux/gpio_keys.h> |
59 | struct platform_device *__init imx_add_gpio_keys( | |
60 | const struct gpio_keys_platform_data *pdata); | |
61 | ||
9f871469 UKK |
62 | #include <mach/mx21-usbhost.h> |
63 | struct imx_imx21_hcd_data { | |
64 | resource_size_t iobase; | |
65 | resource_size_t irq; | |
66 | }; | |
67 | struct platform_device *__init imx_add_imx21_hcd( | |
68 | const struct imx_imx21_hcd_data *data, | |
69 | const struct mx21_usbh_platform_data *pdata); | |
70 | ||
e0a1961d | 71 | struct imx_imx2_wdt_data { |
8c2efec3 | 72 | int id; |
e0a1961d | 73 | resource_size_t iobase; |
00871505 | 74 | resource_size_t iosize; |
e0a1961d UKK |
75 | }; |
76 | struct platform_device *__init imx_add_imx2_wdt( | |
77 | const struct imx_imx2_wdt_data *data); | |
78 | ||
e7c74b34 UKK |
79 | struct imx_imxdi_rtc_data { |
80 | resource_size_t iobase; | |
81 | resource_size_t irq; | |
82 | }; | |
83 | struct platform_device *__init imx_add_imxdi_rtc( | |
84 | const struct imx_imxdi_rtc_data *data); | |
85 | ||
ad851bff UKK |
86 | #include <mach/imxfb.h> |
87 | struct imx_imx_fb_data { | |
88 | resource_size_t iobase; | |
194ee8e8 | 89 | resource_size_t iosize; |
ad851bff UKK |
90 | resource_size_t irq; |
91 | }; | |
92 | struct platform_device *__init imx_add_imx_fb( | |
93 | const struct imx_imx_fb_data *data, | |
94 | const struct imx_fb_platform_data *pdata); | |
95 | ||
99a754d8 | 96 | #include <mach/i2c.h> |
64de5ec1 UKK |
97 | struct imx_imx_i2c_data { |
98 | int id; | |
99 | resource_size_t iobase; | |
100 | resource_size_t iosize; | |
101 | resource_size_t irq; | |
102 | }; | |
103 | struct platform_device *__init imx_add_imx_i2c( | |
104 | const struct imx_imx_i2c_data *data, | |
99a754d8 UKK |
105 | const struct imxi2c_platform_data *pdata); |
106 | ||
3f880141 UKK |
107 | #include <linux/input/matrix_keypad.h> |
108 | struct imx_imx_keypad_data { | |
109 | resource_size_t iobase; | |
ab9cee4b | 110 | resource_size_t iosize; |
3f880141 UKK |
111 | resource_size_t irq; |
112 | }; | |
113 | struct platform_device *__init imx_add_imx_keypad( | |
114 | const struct imx_imx_keypad_data *data, | |
115 | const struct matrix_keymap_data *pdata); | |
116 | ||
4697bb92 UKK |
117 | #include <mach/ssi.h> |
118 | struct imx_imx_ssi_data { | |
119 | int id; | |
120 | resource_size_t iobase; | |
121 | resource_size_t iosize; | |
122 | resource_size_t irq; | |
123 | resource_size_t dmatx0; | |
124 | resource_size_t dmarx0; | |
125 | resource_size_t dmatx1; | |
126 | resource_size_t dmarx1; | |
127 | }; | |
128 | struct platform_device *__init imx_add_imx_ssi( | |
129 | const struct imx_imx_ssi_data *data, | |
130 | const struct imx_ssi_platform_data *pdata); | |
131 | ||
2db68237 | 132 | #include <mach/imx-uart.h> |
5162de08 UKK |
133 | struct imx_imx_uart_3irq_data { |
134 | int id; | |
135 | resource_size_t iobase; | |
136 | resource_size_t iosize; | |
137 | resource_size_t irqrx; | |
138 | resource_size_t irqtx; | |
139 | resource_size_t irqrts; | |
140 | }; | |
141 | struct platform_device *__init imx_add_imx_uart_3irq( | |
142 | const struct imx_imx_uart_3irq_data *data, | |
2db68237 | 143 | const struct imxuart_platform_data *pdata); |
5162de08 UKK |
144 | |
145 | struct imx_imx_uart_1irq_data { | |
146 | int id; | |
147 | resource_size_t iobase; | |
148 | resource_size_t iosize; | |
149 | resource_size_t irq; | |
150 | }; | |
151 | struct platform_device *__init imx_add_imx_uart_1irq( | |
152 | const struct imx_imx_uart_1irq_data *data, | |
2db68237 UKK |
153 | const struct imxuart_platform_data *pdata); |
154 | ||
e0830004 UKK |
155 | #include <mach/usb.h> |
156 | struct imx_imx_udc_data { | |
157 | resource_size_t iobase; | |
158 | resource_size_t iosize; | |
159 | resource_size_t irq0; | |
160 | resource_size_t irq1; | |
161 | resource_size_t irq2; | |
162 | resource_size_t irq3; | |
163 | resource_size_t irq4; | |
164 | resource_size_t irq5; | |
165 | resource_size_t irq6; | |
166 | }; | |
167 | struct platform_device *__init imx_add_imx_udc( | |
168 | const struct imx_imx_udc_data *data, | |
169 | const struct imxusb_platform_data *pdata); | |
170 | ||
afa77ef3 UKK |
171 | #include <mach/ipu.h> |
172 | #include <mach/mx3fb.h> | |
173 | #include <mach/mx3_camera.h> | |
174 | struct imx_ipu_core_data { | |
175 | resource_size_t iobase; | |
176 | resource_size_t synirq; | |
177 | resource_size_t errirq; | |
178 | }; | |
179 | struct platform_device *__init imx_add_ipu_core( | |
180 | const struct imx_ipu_core_data *data, | |
181 | const struct ipu_platform_data *pdata); | |
182 | struct platform_device *__init imx_alloc_mx3_camera( | |
183 | const struct imx_ipu_core_data *data, | |
184 | const struct mx3_camera_pdata *pdata); | |
185 | struct platform_device *__init imx_add_mx3_sdc_fb( | |
186 | const struct imx_ipu_core_data *data, | |
187 | struct mx3fb_platform_data *pdata); | |
188 | ||
9bb39b3f UKK |
189 | #include <mach/mx1_camera.h> |
190 | struct imx_mx1_camera_data { | |
191 | resource_size_t iobase; | |
192 | resource_size_t iosize; | |
193 | resource_size_t irq; | |
194 | }; | |
195 | struct platform_device *__init imx_add_mx1_camera( | |
196 | const struct imx_mx1_camera_data *data, | |
197 | const struct mx1_camera_pdata *pdata); | |
198 | ||
b2997cb1 UKK |
199 | #include <mach/mx2_cam.h> |
200 | struct imx_mx2_camera_data { | |
201 | resource_size_t iobasecsi; | |
202 | resource_size_t iosizecsi; | |
203 | resource_size_t irqcsi; | |
204 | resource_size_t iobaseemmaprp; | |
205 | resource_size_t iosizeemmaprp; | |
206 | resource_size_t irqemmaprp; | |
207 | }; | |
208 | struct platform_device *__init imx_add_mx2_camera( | |
209 | const struct imx_mx2_camera_data *data, | |
210 | const struct mx2_camera_platform_data *pdata); | |
211 | ||
2eb42d5c UKK |
212 | #include <mach/mxc_ehci.h> |
213 | struct imx_mxc_ehci_data { | |
214 | int id; | |
215 | resource_size_t iobase; | |
216 | resource_size_t irq; | |
217 | }; | |
218 | struct platform_device *__init imx_add_mxc_ehci( | |
219 | const struct imx_mxc_ehci_data *data, | |
220 | const struct mxc_usbh_platform_data *pdata); | |
221 | ||
9d3d945a UKK |
222 | #include <mach/mmc.h> |
223 | struct imx_mxc_mmc_data { | |
224 | int id; | |
225 | resource_size_t iobase; | |
6a697e3d | 226 | resource_size_t iosize; |
9d3d945a UKK |
227 | resource_size_t irq; |
228 | resource_size_t dmareq; | |
229 | }; | |
230 | struct platform_device *__init imx_add_mxc_mmc( | |
231 | const struct imx_mxc_mmc_data *data, | |
232 | const struct imxmmc_platform_data *pdata); | |
233 | ||
66384eed | 234 | #include <mach/mxc_nand.h> |
00b57bf9 | 235 | struct imx_mxc_nand_data { |
63a7c6d7 SH |
236 | /* |
237 | * id is traditionally 0, but -1 is more appropriate. We use -1 for new | |
238 | * machines but don't change existing devices as the nand device usually | |
239 | * appears in the kernel command line to pass its partitioning. | |
240 | */ | |
241 | int id; | |
00b57bf9 UKK |
242 | resource_size_t iobase; |
243 | resource_size_t iosize; | |
63a7c6d7 | 244 | resource_size_t axibase; |
00b57bf9 UKK |
245 | resource_size_t irq; |
246 | }; | |
247 | struct platform_device *__init imx_add_mxc_nand( | |
248 | const struct imx_mxc_nand_data *data, | |
249 | const struct mxc_nand_platform_data *pdata); | |
02870737 | 250 | |
bf182bcc | 251 | struct imx_mxc_pwm_data { |
5f3d1092 | 252 | int id; |
bf182bcc | 253 | resource_size_t iobase; |
5f3d1092 | 254 | resource_size_t iosize; |
bf182bcc UKK |
255 | resource_size_t irq; |
256 | }; | |
257 | struct platform_device *__init imx_add_mxc_pwm( | |
258 | const struct imx_mxc_pwm_data *data); | |
259 | ||
83422671 UKK |
260 | /* mxc_rtc */ |
261 | struct imx_mxc_rtc_data { | |
262 | resource_size_t iobase; | |
263 | resource_size_t irq; | |
264 | }; | |
265 | struct platform_device *__init imx_add_mxc_rtc( | |
266 | const struct imx_mxc_rtc_data *data); | |
267 | ||
268 | /* mxc_w1 */ | |
ae71a562 UKK |
269 | struct imx_mxc_w1_data { |
270 | resource_size_t iobase; | |
271 | }; | |
272 | struct platform_device *__init imx_add_mxc_w1( | |
273 | const struct imx_mxc_w1_data *data); | |
274 | ||
124bf94a UKK |
275 | #include <mach/esdhc.h> |
276 | struct imx_sdhci_esdhc_imx_data { | |
277 | int id; | |
278 | resource_size_t iobase; | |
279 | resource_size_t irq; | |
280 | }; | |
281 | struct platform_device *__init imx_add_sdhci_esdhc_imx( | |
282 | const struct imx_sdhci_esdhc_imx_data *data, | |
283 | const struct esdhc_platform_data *pdata); | |
284 | ||
02870737 | 285 | #include <mach/spi.h> |
35bab058 | 286 | struct imx_spi_imx_data { |
ab560503 | 287 | const char *devid; |
35bab058 UKK |
288 | int id; |
289 | resource_size_t iobase; | |
290 | resource_size_t iosize; | |
291 | int irq; | |
292 | }; | |
293 | struct platform_device *__init imx_add_spi_imx( | |
294 | const struct imx_spi_imx_data *data, | |
02870737 | 295 | const struct spi_imx_master *pdata); |