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>
12 #include <mach/sdma.h>
14 extern struct device mxc_aips_bus
;
15 extern struct device mxc_ahb_bus
;
17 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 static inline struct platform_device
*imx_add_platform_device(
23 const char *name
, int id
,
24 const struct resource
*res
, unsigned int num_resources
,
25 const void *data
, size_t size_data
)
27 return imx_add_platform_device_dmamask(
28 name
, id
, res
, num_resources
, data
, size_data
, 0);
31 #include <linux/fec.h>
34 resource_size_t iobase
;
37 struct platform_device
*__init
imx_add_fec(
38 const struct imx_fec_data
*data
,
39 const struct fec_platform_data
*pdata
);
41 #include <linux/can/platform/flexcan.h>
42 struct imx_flexcan_data
{
44 resource_size_t iobase
;
45 resource_size_t iosize
;
48 struct platform_device
*__init
imx_add_flexcan(
49 const struct imx_flexcan_data
*data
,
50 const struct flexcan_platform_data
*pdata
);
52 #include <linux/fsl_devices.h>
53 struct imx_fsl_usb2_udc_data
{
54 resource_size_t iobase
;
57 struct platform_device
*__init
imx_add_fsl_usb2_udc(
58 const struct imx_fsl_usb2_udc_data
*data
,
59 const struct fsl_usb2_platform_data
*pdata
);
61 #include <linux/gpio_keys.h>
62 struct platform_device
*__init
imx_add_gpio_keys(
63 const struct gpio_keys_platform_data
*pdata
);
65 #include <mach/mx21-usbhost.h>
66 struct imx_imx21_hcd_data
{
67 resource_size_t iobase
;
70 struct platform_device
*__init
imx_add_imx21_hcd(
71 const struct imx_imx21_hcd_data
*data
,
72 const struct mx21_usbh_platform_data
*pdata
);
74 struct imx_imx2_wdt_data
{
76 resource_size_t iobase
;
77 resource_size_t iosize
;
79 struct platform_device
*__init
imx_add_imx2_wdt(
80 const struct imx_imx2_wdt_data
*data
);
82 struct imx_imxdi_rtc_data
{
83 resource_size_t iobase
;
86 struct platform_device
*__init
imx_add_imxdi_rtc(
87 const struct imx_imxdi_rtc_data
*data
);
89 #include <mach/imxfb.h>
90 struct imx_imx_fb_data
{
91 resource_size_t iobase
;
92 resource_size_t iosize
;
95 struct platform_device
*__init
imx_add_imx_fb(
96 const struct imx_imx_fb_data
*data
,
97 const struct imx_fb_platform_data
*pdata
);
100 struct imx_imx_i2c_data
{
102 resource_size_t iobase
;
103 resource_size_t iosize
;
106 struct platform_device
*__init
imx_add_imx_i2c(
107 const struct imx_imx_i2c_data
*data
,
108 const struct imxi2c_platform_data
*pdata
);
110 #include <linux/input/matrix_keypad.h>
111 struct imx_imx_keypad_data
{
112 resource_size_t iobase
;
113 resource_size_t iosize
;
116 struct platform_device
*__init
imx_add_imx_keypad(
117 const struct imx_imx_keypad_data
*data
,
118 const struct matrix_keymap_data
*pdata
);
120 #include <mach/ssi.h>
121 struct imx_imx_ssi_data
{
123 resource_size_t iobase
;
124 resource_size_t iosize
;
126 resource_size_t dmatx0
;
127 resource_size_t dmarx0
;
128 resource_size_t dmatx1
;
129 resource_size_t dmarx1
;
131 struct platform_device
*__init
imx_add_imx_ssi(
132 const struct imx_imx_ssi_data
*data
,
133 const struct imx_ssi_platform_data
*pdata
);
135 #include <mach/imx-uart.h>
136 struct imx_imx_uart_3irq_data
{
138 resource_size_t iobase
;
139 resource_size_t iosize
;
140 resource_size_t irqrx
;
141 resource_size_t irqtx
;
142 resource_size_t irqrts
;
144 struct platform_device
*__init
imx_add_imx_uart_3irq(
145 const struct imx_imx_uart_3irq_data
*data
,
146 const struct imxuart_platform_data
*pdata
);
148 struct imx_imx_uart_1irq_data
{
150 resource_size_t iobase
;
151 resource_size_t iosize
;
154 struct platform_device
*__init
imx_add_imx_uart_1irq(
155 const struct imx_imx_uart_1irq_data
*data
,
156 const struct imxuart_platform_data
*pdata
);
158 #include <mach/usb.h>
159 struct imx_imx_udc_data
{
160 resource_size_t iobase
;
161 resource_size_t iosize
;
162 resource_size_t irq0
;
163 resource_size_t irq1
;
164 resource_size_t irq2
;
165 resource_size_t irq3
;
166 resource_size_t irq4
;
167 resource_size_t irq5
;
168 resource_size_t irq6
;
170 struct platform_device
*__init
imx_add_imx_udc(
171 const struct imx_imx_udc_data
*data
,
172 const struct imxusb_platform_data
*pdata
);
174 #include <mach/ipu.h>
175 #include <mach/mx3fb.h>
176 #include <mach/mx3_camera.h>
177 struct imx_ipu_core_data
{
178 resource_size_t iobase
;
179 resource_size_t synirq
;
180 resource_size_t errirq
;
182 struct platform_device
*__init
imx_add_ipu_core(
183 const struct imx_ipu_core_data
*data
,
184 const struct ipu_platform_data
*pdata
);
185 struct platform_device
*__init
imx_alloc_mx3_camera(
186 const struct imx_ipu_core_data
*data
,
187 const struct mx3_camera_pdata
*pdata
);
188 struct platform_device
*__init
imx_add_mx3_sdc_fb(
189 const struct imx_ipu_core_data
*data
,
190 struct mx3fb_platform_data
*pdata
);
192 #include <mach/mx1_camera.h>
193 struct imx_mx1_camera_data
{
194 resource_size_t iobase
;
195 resource_size_t iosize
;
198 struct platform_device
*__init
imx_add_mx1_camera(
199 const struct imx_mx1_camera_data
*data
,
200 const struct mx1_camera_pdata
*pdata
);
202 #include <mach/mx2_cam.h>
203 struct imx_mx2_camera_data
{
204 resource_size_t iobasecsi
;
205 resource_size_t iosizecsi
;
206 resource_size_t irqcsi
;
207 resource_size_t iobaseemmaprp
;
208 resource_size_t iosizeemmaprp
;
209 resource_size_t irqemmaprp
;
211 struct platform_device
*__init
imx_add_mx2_camera(
212 const struct imx_mx2_camera_data
*data
,
213 const struct mx2_camera_platform_data
*pdata
);
215 #include <mach/mxc_ehci.h>
216 struct imx_mxc_ehci_data
{
218 resource_size_t iobase
;
221 struct platform_device
*__init
imx_add_mxc_ehci(
222 const struct imx_mxc_ehci_data
*data
,
223 const struct mxc_usbh_platform_data
*pdata
);
225 #include <mach/mmc.h>
226 struct imx_mxc_mmc_data
{
228 resource_size_t iobase
;
229 resource_size_t iosize
;
231 resource_size_t dmareq
;
233 struct platform_device
*__init
imx_add_mxc_mmc(
234 const struct imx_mxc_mmc_data
*data
,
235 const struct imxmmc_platform_data
*pdata
);
237 #include <mach/mxc_nand.h>
238 struct imx_mxc_nand_data
{
240 * id is traditionally 0, but -1 is more appropriate. We use -1 for new
241 * machines but don't change existing devices as the nand device usually
242 * appears in the kernel command line to pass its partitioning.
245 resource_size_t iobase
;
246 resource_size_t iosize
;
247 resource_size_t axibase
;
250 struct platform_device
*__init
imx_add_mxc_nand(
251 const struct imx_mxc_nand_data
*data
,
252 const struct mxc_nand_platform_data
*pdata
);
254 struct imx_mxc_pwm_data
{
256 resource_size_t iobase
;
257 resource_size_t iosize
;
260 struct platform_device
*__init
imx_add_mxc_pwm(
261 const struct imx_mxc_pwm_data
*data
);
264 struct imx_mxc_rtc_data
{
265 resource_size_t iobase
;
268 struct platform_device
*__init
imx_add_mxc_rtc(
269 const struct imx_mxc_rtc_data
*data
);
272 struct imx_mxc_w1_data
{
273 resource_size_t iobase
;
275 struct platform_device
*__init
imx_add_mxc_w1(
276 const struct imx_mxc_w1_data
*data
);
278 #include <mach/esdhc.h>
279 struct imx_sdhci_esdhc_imx_data
{
282 resource_size_t iobase
;
285 struct platform_device
*__init
imx_add_sdhci_esdhc_imx(
286 const struct imx_sdhci_esdhc_imx_data
*data
,
287 const struct esdhc_platform_data
*pdata
);
289 #include <mach/spi.h>
290 struct imx_spi_imx_data
{
293 resource_size_t iobase
;
294 resource_size_t iosize
;
297 struct platform_device
*__init
imx_add_spi_imx(
298 const struct imx_spi_imx_data
*data
,
299 const struct spi_imx_master
*pdata
);
301 struct platform_device
*imx_add_imx_dma(void);
302 struct platform_device
*imx_add_imx_sdma(char *name
,
303 resource_size_t iobase
, int irq
, struct sdma_platform_data
*pdata
);