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.
9 #include <linux/kernel.h>
10 #include <linux/platform_device.h>
11 #include <linux/init.h>
13 struct platform_device *imx_add_platform_device_dmamask(
14 const char *name, int id,
15 const struct resource *res, unsigned int num_resources,
16 const void *data, size_t size_data, u64 dmamask);
18 static inline struct platform_device *imx_add_platform_device(
19 const char *name, int id,
20 const struct resource *res, unsigned int num_resources,
21 const void *data, size_t size_data)
23 return imx_add_platform_device_dmamask(
24 name, id, res, num_resources, data, size_data, 0);
27 #include <linux/fec.h>
29 resource_size_t iobase;
32 struct platform_device *__init imx_add_fec(
33 const struct imx_fec_data *data,
34 const struct fec_platform_data *pdata);
36 #include <linux/can/platform/flexcan.h>
37 struct imx_flexcan_data {
39 resource_size_t iobase;
40 resource_size_t iosize;
43 struct platform_device *__init imx_add_flexcan(
44 const struct imx_flexcan_data *data,
45 const struct flexcan_platform_data *pdata);
47 #include <linux/fsl_devices.h>
48 struct imx_fsl_usb2_udc_data {
49 resource_size_t iobase;
52 struct platform_device *__init imx_add_fsl_usb2_udc(
53 const struct imx_fsl_usb2_udc_data *data,
54 const struct fsl_usb2_platform_data *pdata);
56 #include <linux/gpio_keys.h>
57 struct platform_device *__init imx_add_gpio_keys(
58 const struct gpio_keys_platform_data *pdata);
60 #include <mach/mx21-usbhost.h>
61 struct imx_imx21_hcd_data {
62 resource_size_t iobase;
65 struct platform_device *__init imx_add_imx21_hcd(
66 const struct imx_imx21_hcd_data *data,
67 const struct mx21_usbh_platform_data *pdata);
69 struct imx_imx2_wdt_data {
71 resource_size_t iobase;
72 resource_size_t iosize;
74 struct platform_device *__init imx_add_imx2_wdt(
75 const struct imx_imx2_wdt_data *data);
77 struct imx_imxdi_rtc_data {
78 resource_size_t iobase;
81 struct platform_device *__init imx_add_imxdi_rtc(
82 const struct imx_imxdi_rtc_data *data);
84 #include <mach/imxfb.h>
85 struct imx_imx_fb_data {
86 resource_size_t iobase;
87 resource_size_t iosize;
90 struct platform_device *__init imx_add_imx_fb(
91 const struct imx_imx_fb_data *data,
92 const struct imx_fb_platform_data *pdata);
95 struct imx_imx_i2c_data {
97 resource_size_t iobase;
98 resource_size_t iosize;
101 struct platform_device *__init imx_add_imx_i2c(
102 const struct imx_imx_i2c_data *data,
103 const struct imxi2c_platform_data *pdata);
105 #include <linux/input/matrix_keypad.h>
106 struct imx_imx_keypad_data {
107 resource_size_t iobase;
108 resource_size_t iosize;
111 struct platform_device *__init imx_add_imx_keypad(
112 const struct imx_imx_keypad_data *data,
113 const struct matrix_keymap_data *pdata);
115 #include <mach/ssi.h>
116 struct imx_imx_ssi_data {
118 resource_size_t iobase;
119 resource_size_t iosize;
121 resource_size_t dmatx0;
122 resource_size_t dmarx0;
123 resource_size_t dmatx1;
124 resource_size_t dmarx1;
126 struct platform_device *__init imx_add_imx_ssi(
127 const struct imx_imx_ssi_data *data,
128 const struct imx_ssi_platform_data *pdata);
130 #include <mach/imx-uart.h>
131 struct imx_imx_uart_3irq_data {
133 resource_size_t iobase;
134 resource_size_t iosize;
135 resource_size_t irqrx;
136 resource_size_t irqtx;
137 resource_size_t irqrts;
139 struct platform_device *__init imx_add_imx_uart_3irq(
140 const struct imx_imx_uart_3irq_data *data,
141 const struct imxuart_platform_data *pdata);
143 struct imx_imx_uart_1irq_data {
145 resource_size_t iobase;
146 resource_size_t iosize;
149 struct platform_device *__init imx_add_imx_uart_1irq(
150 const struct imx_imx_uart_1irq_data *data,
151 const struct imxuart_platform_data *pdata);
153 #include <mach/usb.h>
154 struct imx_imx_udc_data {
155 resource_size_t iobase;
156 resource_size_t iosize;
157 resource_size_t irq0;
158 resource_size_t irq1;
159 resource_size_t irq2;
160 resource_size_t irq3;
161 resource_size_t irq4;
162 resource_size_t irq5;
163 resource_size_t irq6;
165 struct platform_device *__init imx_add_imx_udc(
166 const struct imx_imx_udc_data *data,
167 const struct imxusb_platform_data *pdata);
169 #include <mach/mx1_camera.h>
170 struct imx_mx1_camera_data {
171 resource_size_t iobase;
172 resource_size_t iosize;
175 struct platform_device *__init imx_add_mx1_camera(
176 const struct imx_mx1_camera_data *data,
177 const struct mx1_camera_pdata *pdata);
179 #include <mach/mx2_cam.h>
180 struct imx_mx2_camera_data {
181 resource_size_t iobasecsi;
182 resource_size_t iosizecsi;
183 resource_size_t irqcsi;
184 resource_size_t iobaseemmaprp;
185 resource_size_t iosizeemmaprp;
186 resource_size_t irqemmaprp;
188 struct platform_device *__init imx_add_mx2_camera(
189 const struct imx_mx2_camera_data *data,
190 const struct mx2_camera_platform_data *pdata);
192 #include <mach/mxc_ehci.h>
193 struct imx_mxc_ehci_data {
195 resource_size_t iobase;
198 struct platform_device *__init imx_add_mxc_ehci(
199 const struct imx_mxc_ehci_data *data,
200 const struct mxc_usbh_platform_data *pdata);
202 #include <mach/mmc.h>
203 struct imx_mxc_mmc_data {
205 resource_size_t iobase;
206 resource_size_t iosize;
208 resource_size_t dmareq;
210 struct platform_device *__init imx_add_mxc_mmc(
211 const struct imx_mxc_mmc_data *data,
212 const struct imxmmc_platform_data *pdata);
214 #include <mach/mxc_nand.h>
215 struct imx_mxc_nand_data {
217 * id is traditionally 0, but -1 is more appropriate. We use -1 for new
218 * machines but don't change existing devices as the nand device usually
219 * appears in the kernel command line to pass its partitioning.
222 resource_size_t iobase;
223 resource_size_t iosize;
224 resource_size_t axibase;
227 struct platform_device *__init imx_add_mxc_nand(
228 const struct imx_mxc_nand_data *data,
229 const struct mxc_nand_platform_data *pdata);
231 struct imx_mxc_pwm_data {
233 resource_size_t iobase;
234 resource_size_t iosize;
237 struct platform_device *__init imx_add_mxc_pwm(
238 const struct imx_mxc_pwm_data *data);
240 struct imx_mxc_w1_data {
241 resource_size_t iobase;
243 struct platform_device *__init imx_add_mxc_w1(
244 const struct imx_mxc_w1_data *data);
246 #include <mach/esdhc.h>
247 struct imx_sdhci_esdhc_imx_data {
249 resource_size_t iobase;
252 struct platform_device *__init imx_add_sdhci_esdhc_imx(
253 const struct imx_sdhci_esdhc_imx_data *data,
254 const struct esdhc_platform_data *pdata);
256 #include <mach/spi.h>
257 struct imx_spi_imx_data {
260 resource_size_t iobase;
261 resource_size_t iosize;
264 struct platform_device *__init imx_add_spi_imx(
265 const struct imx_spi_imx_data *data,
266 const struct spi_imx_master *pdata);