aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/plat-mxc/include/mach/devices-common.h
diff options
context:
space:
mode:
Diffstat (limited to 'arch/arm/plat-mxc/include/mach/devices-common.h')
-rw-r--r--arch/arm/plat-mxc/include/mach/devices-common.h174
1 files changed, 159 insertions, 15 deletions
diff --git a/arch/arm/plat-mxc/include/mach/devices-common.h b/arch/arm/plat-mxc/include/mach/devices-common.h
index 8c6896fd1e5f..8658c9caa650 100644
--- a/arch/arm/plat-mxc/include/mach/devices-common.h
+++ b/arch/arm/plat-mxc/include/mach/devices-common.h
@@ -10,9 +10,19 @@
10#include <linux/platform_device.h> 10#include <linux/platform_device.h>
11#include <linux/init.h> 11#include <linux/init.h>
12 12
13struct platform_device *imx_add_platform_device(const char *name, int id, 13struct platform_device *imx_add_platform_device_dmamask(
14 const char *name, int id,
14 const struct resource *res, unsigned int num_resources, 15 const struct resource *res, unsigned int num_resources,
15 const void *data, size_t size_data); 16 const void *data, size_t size_data, u64 dmamask);
17
18static 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)
22{
23 return imx_add_platform_device_dmamask(
24 name, id, res, num_resources, data, size_data, 0);
25}
16 26
17#include <linux/fec.h> 27#include <linux/fec.h>
18struct imx_fec_data { 28struct imx_fec_data {
@@ -24,15 +34,63 @@ struct platform_device *__init imx_add_fec(
24 const struct fec_platform_data *pdata); 34 const struct fec_platform_data *pdata);
25 35
26#include <linux/can/platform/flexcan.h> 36#include <linux/can/platform/flexcan.h>
27struct platform_device *__init imx_add_flexcan(int id, 37struct imx_flexcan_data {
28 resource_size_t iobase, resource_size_t iosize, 38 int id;
29 resource_size_t irq, 39 resource_size_t iobase;
40 resource_size_t iosize;
41 resource_size_t irq;
42};
43struct platform_device *__init imx_add_flexcan(
44 const struct imx_flexcan_data *data,
30 const struct flexcan_platform_data *pdata); 45 const struct flexcan_platform_data *pdata);
31 46
47#include <linux/fsl_devices.h>
48struct imx_fsl_usb2_udc_data {
49 resource_size_t iobase;
50 resource_size_t irq;
51};
52struct 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);
55
32#include <linux/gpio_keys.h> 56#include <linux/gpio_keys.h>
33struct platform_device *__init imx_add_gpio_keys( 57struct platform_device *__init imx_add_gpio_keys(
34 const struct gpio_keys_platform_data *pdata); 58 const struct gpio_keys_platform_data *pdata);
35 59
60#include <mach/mx21-usbhost.h>
61struct imx_imx21_hcd_data {
62 resource_size_t iobase;
63 resource_size_t irq;
64};
65struct platform_device *__init imx_add_imx21_hcd(
66 const struct imx_imx21_hcd_data *data,
67 const struct mx21_usbh_platform_data *pdata);
68
69struct imx_imx2_wdt_data {
70 int id;
71 resource_size_t iobase;
72 resource_size_t iosize;
73};
74struct platform_device *__init imx_add_imx2_wdt(
75 const struct imx_imx2_wdt_data *data);
76
77struct imx_imxdi_rtc_data {
78 resource_size_t iobase;
79 resource_size_t irq;
80};
81struct platform_device *__init imx_add_imxdi_rtc(
82 const struct imx_imxdi_rtc_data *data);
83
84#include <mach/imxfb.h>
85struct imx_imx_fb_data {
86 resource_size_t iobase;
87 resource_size_t iosize;
88 resource_size_t irq;
89};
90struct platform_device *__init imx_add_imx_fb(
91 const struct imx_imx_fb_data *data,
92 const struct imx_fb_platform_data *pdata);
93
36#include <mach/i2c.h> 94#include <mach/i2c.h>
37struct imx_imx_i2c_data { 95struct imx_imx_i2c_data {
38 int id; 96 int id;
@@ -44,6 +102,16 @@ struct platform_device *__init imx_add_imx_i2c(
44 const struct imx_imx_i2c_data *data, 102 const struct imx_imx_i2c_data *data,
45 const struct imxi2c_platform_data *pdata); 103 const struct imxi2c_platform_data *pdata);
46 104
105#include <linux/input/matrix_keypad.h>
106struct imx_imx_keypad_data {
107 resource_size_t iobase;
108 resource_size_t iosize;
109 resource_size_t irq;
110};
111struct platform_device *__init imx_add_imx_keypad(
112 const struct imx_imx_keypad_data *data,
113 const struct matrix_keymap_data *pdata);
114
47#include <mach/ssi.h> 115#include <mach/ssi.h>
48struct imx_imx_ssi_data { 116struct imx_imx_ssi_data {
49 int id; 117 int id;
@@ -82,6 +150,67 @@ struct platform_device *__init imx_add_imx_uart_1irq(
82 const struct imx_imx_uart_1irq_data *data, 150 const struct imx_imx_uart_1irq_data *data,
83 const struct imxuart_platform_data *pdata); 151 const struct imxuart_platform_data *pdata);
84 152
153#include <mach/usb.h>
154struct 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;
164};
165struct platform_device *__init imx_add_imx_udc(
166 const struct imx_imx_udc_data *data,
167 const struct imxusb_platform_data *pdata);
168
169#include <mach/mx1_camera.h>
170struct imx_mx1_camera_data {
171 resource_size_t iobase;
172 resource_size_t iosize;
173 resource_size_t irq;
174};
175struct platform_device *__init imx_add_mx1_camera(
176 const struct imx_mx1_camera_data *data,
177 const struct mx1_camera_pdata *pdata);
178
179#include <mach/mx2_cam.h>
180struct 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;
187};
188struct platform_device *__init imx_add_mx2_camera(
189 const struct imx_mx2_camera_data *data,
190 const struct mx2_camera_platform_data *pdata);
191
192#include <mach/mxc_ehci.h>
193struct imx_mxc_ehci_data {
194 int id;
195 resource_size_t iobase;
196 resource_size_t irq;
197};
198struct platform_device *__init imx_add_mxc_ehci(
199 const struct imx_mxc_ehci_data *data,
200 const struct mxc_usbh_platform_data *pdata);
201
202#include <mach/mmc.h>
203struct imx_mxc_mmc_data {
204 int id;
205 resource_size_t iobase;
206 resource_size_t iosize;
207 resource_size_t irq;
208 resource_size_t dmareq;
209};
210struct platform_device *__init imx_add_mxc_mmc(
211 const struct imx_mxc_mmc_data *data,
212 const struct imxmmc_platform_data *pdata);
213
85#include <mach/mxc_nand.h> 214#include <mach/mxc_nand.h>
86struct imx_mxc_nand_data { 215struct imx_mxc_nand_data {
87 /* 216 /*
@@ -99,24 +228,39 @@ struct platform_device *__init imx_add_mxc_nand(
99 const struct imx_mxc_nand_data *data, 228 const struct imx_mxc_nand_data *data,
100 const struct mxc_nand_platform_data *pdata); 229 const struct mxc_nand_platform_data *pdata);
101 230
102#include <mach/spi.h> 231struct imx_mxc_pwm_data {
103struct imx_spi_imx_data {
104 const char *devid;
105 int id; 232 int id;
106 resource_size_t iobase; 233 resource_size_t iobase;
107 resource_size_t iosize; 234 resource_size_t iosize;
108 int irq; 235 resource_size_t irq;
109}; 236};
110struct platform_device *__init imx_add_spi_imx( 237struct platform_device *__init imx_add_mxc_pwm(
111 const struct imx_spi_imx_data *data, 238 const struct imx_mxc_pwm_data *data);
112 const struct spi_imx_master *pdata); 239
240struct imx_mxc_w1_data {
241 resource_size_t iobase;
242};
243struct platform_device *__init imx_add_mxc_w1(
244 const struct imx_mxc_w1_data *data);
113 245
114#include <mach/esdhc.h> 246#include <mach/esdhc.h>
115struct imx_esdhc_imx_data { 247struct imx_sdhci_esdhc_imx_data {
116 int id; 248 int id;
117 resource_size_t iobase; 249 resource_size_t iobase;
118 resource_size_t irq; 250 resource_size_t irq;
119}; 251};
120struct platform_device *__init imx_add_esdhc( 252struct platform_device *__init imx_add_sdhci_esdhc_imx(
121 const struct imx_esdhc_imx_data *data, 253 const struct imx_sdhci_esdhc_imx_data *data,
122 const struct esdhc_platform_data *pdata); 254 const struct esdhc_platform_data *pdata);
255
256#include <mach/spi.h>
257struct imx_spi_imx_data {
258 const char *devid;
259 int id;
260 resource_size_t iobase;
261 resource_size_t iosize;
262 int irq;
263};
264struct platform_device *__init imx_add_spi_imx(
265 const struct imx_spi_imx_data *data,
266 const struct spi_imx_master *pdata);