x86/efi: Enforce CONFIG_RELOCATABLE for EFI boot stub
[linux/fpc-iii.git] / arch / arm / mach-imx / devices / devices-common.h
blobc13b76b9f6b38b995422279d05f4f4eaa5eb31ec
1 /*
2 * Copyright (C) 2009-2010 Pengutronix
3 * Uwe Kleine-Koenig <u.kleine-koenig@pengutronix.de>
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 #include <linux/platform_data/dma-imx-sdma.h>
14 extern struct device mxc_aips_bus;
15 extern struct device mxc_ahb_bus;
17 static inline struct platform_device *imx_add_platform_device_dmamask(
18 const char *name, int id,
19 const struct resource *res, unsigned int num_resources,
20 const void *data, size_t size_data, u64 dmamask)
22 struct platform_device_info pdevinfo = {
23 .name = name,
24 .id = id,
25 .res = res,
26 .num_res = num_resources,
27 .data = data,
28 .size_data = size_data,
29 .dma_mask = dmamask,
31 return platform_device_register_full(&pdevinfo);
34 static inline struct platform_device *imx_add_platform_device(
35 const char *name, int id,
36 const struct resource *res, unsigned int num_resources,
37 const void *data, size_t size_data)
39 return imx_add_platform_device_dmamask(
40 name, id, res, num_resources, data, size_data, 0);
43 #include <linux/fec.h>
44 struct imx_fec_data {
45 const char *devid;
46 resource_size_t iobase;
47 resource_size_t irq;
49 struct platform_device *__init imx_add_fec(
50 const struct imx_fec_data *data,
51 const struct fec_platform_data *pdata);
53 struct imx_flexcan_data {
54 int id;
55 resource_size_t iobase;
56 resource_size_t iosize;
57 resource_size_t irq;
59 struct platform_device *__init imx_add_flexcan(
60 const struct imx_flexcan_data *data);
62 #include <linux/fsl_devices.h>
63 struct imx_fsl_usb2_udc_data {
64 const char *devid;
65 resource_size_t iobase;
66 resource_size_t irq;
68 struct platform_device *__init imx_add_fsl_usb2_udc(
69 const struct imx_fsl_usb2_udc_data *data,
70 const struct fsl_usb2_platform_data *pdata);
72 #include <linux/gpio_keys.h>
73 struct platform_device *__init imx_add_gpio_keys(
74 const struct gpio_keys_platform_data *pdata);
76 #include <linux/platform_data/usb-mx2.h>
77 struct imx_imx21_hcd_data {
78 resource_size_t iobase;
79 resource_size_t irq;
81 struct platform_device *__init imx_add_imx21_hcd(
82 const struct imx_imx21_hcd_data *data,
83 const struct mx21_usbh_platform_data *pdata);
85 struct imx_imx27_coda_data {
86 resource_size_t iobase;
87 resource_size_t iosize;
88 resource_size_t irq;
90 struct platform_device *__init imx_add_imx27_coda(
91 const struct imx_imx27_coda_data *data);
93 struct imx_imx2_wdt_data {
94 int id;
95 resource_size_t iobase;
96 resource_size_t iosize;
98 struct platform_device *__init imx_add_imx2_wdt(
99 const struct imx_imx2_wdt_data *data);
101 struct imx_imxdi_rtc_data {
102 resource_size_t iobase;
103 resource_size_t irq;
105 struct platform_device *__init imx_add_imxdi_rtc(
106 const struct imx_imxdi_rtc_data *data);
108 #include <linux/platform_data/video-imxfb.h>
109 struct imx_imx_fb_data {
110 const char *devid;
111 resource_size_t iobase;
112 resource_size_t iosize;
113 resource_size_t irq;
115 struct platform_device *__init imx_add_imx_fb(
116 const struct imx_imx_fb_data *data,
117 const struct imx_fb_platform_data *pdata);
119 #include <linux/platform_data/i2c-imx.h>
120 struct imx_imx_i2c_data {
121 const char *devid;
122 int id;
123 resource_size_t iobase;
124 resource_size_t iosize;
125 resource_size_t irq;
127 struct platform_device *__init imx_add_imx_i2c(
128 const struct imx_imx_i2c_data *data,
129 const struct imxi2c_platform_data *pdata);
131 #include <linux/input/matrix_keypad.h>
132 struct imx_imx_keypad_data {
133 resource_size_t iobase;
134 resource_size_t iosize;
135 resource_size_t irq;
137 struct platform_device *__init imx_add_imx_keypad(
138 const struct imx_imx_keypad_data *data,
139 const struct matrix_keymap_data *pdata);
141 #include <linux/platform_data/asoc-imx-ssi.h>
142 struct imx_imx_ssi_data {
143 int id;
144 resource_size_t iobase;
145 resource_size_t iosize;
146 resource_size_t irq;
147 resource_size_t dmatx0;
148 resource_size_t dmarx0;
149 resource_size_t dmatx1;
150 resource_size_t dmarx1;
152 struct platform_device *__init imx_add_imx_ssi(
153 const struct imx_imx_ssi_data *data,
154 const struct imx_ssi_platform_data *pdata);
156 #include <linux/platform_data/serial-imx.h>
157 struct imx_imx_uart_3irq_data {
158 int id;
159 resource_size_t iobase;
160 resource_size_t iosize;
161 resource_size_t irqrx;
162 resource_size_t irqtx;
163 resource_size_t irqrts;
165 struct platform_device *__init imx_add_imx_uart_3irq(
166 const struct imx_imx_uart_3irq_data *data,
167 const struct imxuart_platform_data *pdata);
169 struct imx_imx_uart_1irq_data {
170 int id;
171 resource_size_t iobase;
172 resource_size_t iosize;
173 resource_size_t irq;
175 struct platform_device *__init imx_add_imx_uart_1irq(
176 const struct imx_imx_uart_1irq_data *data,
177 const struct imxuart_platform_data *pdata);
179 #include <linux/platform_data/usb-imx_udc.h>
180 struct imx_imx_udc_data {
181 resource_size_t iobase;
182 resource_size_t iosize;
183 resource_size_t irq0;
184 resource_size_t irq1;
185 resource_size_t irq2;
186 resource_size_t irq3;
187 resource_size_t irq4;
188 resource_size_t irq5;
189 resource_size_t irq6;
191 struct platform_device *__init imx_add_imx_udc(
192 const struct imx_imx_udc_data *data,
193 const struct imxusb_platform_data *pdata);
195 #include <linux/platform_data/video-mx3fb.h>
196 #include <linux/platform_data/camera-mx3.h>
197 struct imx_ipu_core_data {
198 resource_size_t iobase;
199 resource_size_t synirq;
200 resource_size_t errirq;
202 struct platform_device *__init imx_add_ipu_core(
203 const struct imx_ipu_core_data *data);
204 struct platform_device *__init imx_alloc_mx3_camera(
205 const struct imx_ipu_core_data *data,
206 const struct mx3_camera_pdata *pdata);
207 struct platform_device *__init imx_add_mx3_sdc_fb(
208 const struct imx_ipu_core_data *data,
209 struct mx3fb_platform_data *pdata);
211 #include <linux/platform_data/camera-mx1.h>
212 struct imx_mx1_camera_data {
213 resource_size_t iobase;
214 resource_size_t iosize;
215 resource_size_t irq;
217 struct platform_device *__init imx_add_mx1_camera(
218 const struct imx_mx1_camera_data *data,
219 const struct mx1_camera_pdata *pdata);
221 #include <linux/platform_data/camera-mx2.h>
222 struct imx_mx2_camera_data {
223 const char *devid;
224 resource_size_t iobasecsi;
225 resource_size_t iosizecsi;
226 resource_size_t irqcsi;
227 resource_size_t iobaseemmaprp;
228 resource_size_t iosizeemmaprp;
229 resource_size_t irqemmaprp;
231 struct platform_device *__init imx_add_mx2_camera(
232 const struct imx_mx2_camera_data *data,
233 const struct mx2_camera_platform_data *pdata);
236 struct imx_mx2_emma_data {
237 resource_size_t iobase;
238 resource_size_t iosize;
239 resource_size_t irq;
241 struct platform_device *__init imx_add_mx2_emmaprp(
242 const struct imx_mx2_emma_data *data);
244 #include <linux/platform_data/usb-ehci-mxc.h>
245 struct imx_mxc_ehci_data {
246 int id;
247 resource_size_t iobase;
248 resource_size_t irq;
250 struct platform_device *__init imx_add_mxc_ehci(
251 const struct imx_mxc_ehci_data *data,
252 const struct mxc_usbh_platform_data *pdata);
254 #include <linux/platform_data/mmc-mxcmmc.h>
255 struct imx_mxc_mmc_data {
256 const char *devid;
257 int id;
258 resource_size_t iobase;
259 resource_size_t iosize;
260 resource_size_t irq;
261 resource_size_t dmareq;
263 struct platform_device *__init imx_add_mxc_mmc(
264 const struct imx_mxc_mmc_data *data,
265 const struct imxmmc_platform_data *pdata);
267 #include <linux/platform_data/mtd-mxc_nand.h>
268 struct imx_mxc_nand_data {
269 const char *devid;
271 * id is traditionally 0, but -1 is more appropriate. We use -1 for new
272 * machines but don't change existing devices as the nand device usually
273 * appears in the kernel command line to pass its partitioning.
275 int id;
276 resource_size_t iobase;
277 resource_size_t iosize;
278 resource_size_t axibase;
279 resource_size_t irq;
281 struct platform_device *__init imx_add_mxc_nand(
282 const struct imx_mxc_nand_data *data,
283 const struct mxc_nand_platform_data *pdata);
285 struct imx_pata_imx_data {
286 resource_size_t iobase;
287 resource_size_t iosize;
288 resource_size_t irq;
290 struct platform_device *__init imx_add_pata_imx(
291 const struct imx_pata_imx_data *data);
293 struct imx_mxc_pwm_data {
294 int id;
295 resource_size_t iobase;
296 resource_size_t iosize;
297 resource_size_t irq;
299 struct platform_device *__init imx_add_mxc_pwm(
300 const struct imx_mxc_pwm_data *data);
302 /* mxc_rtc */
303 struct imx_mxc_rtc_data {
304 const char *devid;
305 resource_size_t iobase;
306 resource_size_t irq;
308 struct platform_device *__init imx_add_mxc_rtc(
309 const struct imx_mxc_rtc_data *data);
311 /* mxc_w1 */
312 struct imx_mxc_w1_data {
313 resource_size_t iobase;
315 struct platform_device *__init imx_add_mxc_w1(
316 const struct imx_mxc_w1_data *data);
318 #include <linux/platform_data/mmc-esdhc-imx.h>
319 struct imx_sdhci_esdhc_imx_data {
320 const char *devid;
321 int id;
322 resource_size_t iobase;
323 resource_size_t irq;
325 struct platform_device *__init imx_add_sdhci_esdhc_imx(
326 const struct imx_sdhci_esdhc_imx_data *data,
327 const struct esdhc_platform_data *pdata);
329 #include <linux/platform_data/spi-imx.h>
330 struct imx_spi_imx_data {
331 const char *devid;
332 int id;
333 resource_size_t iobase;
334 resource_size_t iosize;
335 int irq;
337 struct platform_device *__init imx_add_spi_imx(
338 const struct imx_spi_imx_data *data,
339 const struct spi_imx_master *pdata);
341 struct platform_device *imx_add_imx_dma(char *name, resource_size_t iobase,
342 int irq, int irq_err);
343 struct platform_device *imx_add_imx_sdma(char *name,
344 resource_size_t iobase, int irq, struct sdma_platform_data *pdata);