diff options
Diffstat (limited to 'arch/arm/plat-mxc/include/mach/devices-common.h')
-rw-r--r-- | arch/arm/plat-mxc/include/mach/devices-common.h | 173 |
1 files changed, 158 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..3640eaf88c02 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 | ||
13 | struct platform_device *imx_add_platform_device(const char *name, int id, | 13 | struct 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 | |||
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) | ||
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> |
18 | struct imx_fec_data { | 28 | struct imx_fec_data { |
@@ -24,15 +34,62 @@ 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> |
27 | struct platform_device *__init imx_add_flexcan(int id, | 37 | struct 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 | }; | ||
43 | struct 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> | ||
48 | struct imx_fsl_usb2_udc_data { | ||
49 | resource_size_t iobase; | ||
50 | resource_size_t irq; | ||
51 | }; | ||
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); | ||
55 | |||
32 | #include <linux/gpio_keys.h> | 56 | #include <linux/gpio_keys.h> |
33 | struct platform_device *__init imx_add_gpio_keys( | 57 | struct 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> | ||
61 | struct imx_imx21_hcd_data { | ||
62 | resource_size_t iobase; | ||
63 | resource_size_t irq; | ||
64 | }; | ||
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); | ||
68 | |||
69 | struct imx_imx2_wdt_data { | ||
70 | resource_size_t iobase; | ||
71 | resource_size_t iosize; | ||
72 | }; | ||
73 | struct platform_device *__init imx_add_imx2_wdt( | ||
74 | const struct imx_imx2_wdt_data *data); | ||
75 | |||
76 | struct imx_imxdi_rtc_data { | ||
77 | resource_size_t iobase; | ||
78 | resource_size_t irq; | ||
79 | }; | ||
80 | struct platform_device *__init imx_add_imxdi_rtc( | ||
81 | const struct imx_imxdi_rtc_data *data); | ||
82 | |||
83 | #include <mach/imxfb.h> | ||
84 | struct imx_imx_fb_data { | ||
85 | resource_size_t iobase; | ||
86 | resource_size_t iosize; | ||
87 | resource_size_t irq; | ||
88 | }; | ||
89 | struct platform_device *__init imx_add_imx_fb( | ||
90 | const struct imx_imx_fb_data *data, | ||
91 | const struct imx_fb_platform_data *pdata); | ||
92 | |||
36 | #include <mach/i2c.h> | 93 | #include <mach/i2c.h> |
37 | struct imx_imx_i2c_data { | 94 | struct imx_imx_i2c_data { |
38 | int id; | 95 | int id; |
@@ -44,6 +101,16 @@ struct platform_device *__init imx_add_imx_i2c( | |||
44 | const struct imx_imx_i2c_data *data, | 101 | const struct imx_imx_i2c_data *data, |
45 | const struct imxi2c_platform_data *pdata); | 102 | const struct imxi2c_platform_data *pdata); |
46 | 103 | ||
104 | #include <linux/input/matrix_keypad.h> | ||
105 | struct imx_imx_keypad_data { | ||
106 | resource_size_t iobase; | ||
107 | resource_size_t iosize; | ||
108 | resource_size_t irq; | ||
109 | }; | ||
110 | struct platform_device *__init imx_add_imx_keypad( | ||
111 | const struct imx_imx_keypad_data *data, | ||
112 | const struct matrix_keymap_data *pdata); | ||
113 | |||
47 | #include <mach/ssi.h> | 114 | #include <mach/ssi.h> |
48 | struct imx_imx_ssi_data { | 115 | struct imx_imx_ssi_data { |
49 | int id; | 116 | int id; |
@@ -82,6 +149,67 @@ struct platform_device *__init imx_add_imx_uart_1irq( | |||
82 | const struct imx_imx_uart_1irq_data *data, | 149 | const struct imx_imx_uart_1irq_data *data, |
83 | const struct imxuart_platform_data *pdata); | 150 | const struct imxuart_platform_data *pdata); |
84 | 151 | ||
152 | #include <mach/usb.h> | ||
153 | struct imx_imx_udc_data { | ||
154 | resource_size_t iobase; | ||
155 | resource_size_t iosize; | ||
156 | resource_size_t irq0; | ||
157 | resource_size_t irq1; | ||
158 | resource_size_t irq2; | ||
159 | resource_size_t irq3; | ||
160 | resource_size_t irq4; | ||
161 | resource_size_t irq5; | ||
162 | resource_size_t irq6; | ||
163 | }; | ||
164 | struct platform_device *__init imx_add_imx_udc( | ||
165 | const struct imx_imx_udc_data *data, | ||
166 | const struct imxusb_platform_data *pdata); | ||
167 | |||
168 | #include <mach/mx1_camera.h> | ||
169 | struct imx_mx1_camera_data { | ||
170 | resource_size_t iobase; | ||
171 | resource_size_t iosize; | ||
172 | resource_size_t irq; | ||
173 | }; | ||
174 | struct platform_device *__init imx_add_mx1_camera( | ||
175 | const struct imx_mx1_camera_data *data, | ||
176 | const struct mx1_camera_pdata *pdata); | ||
177 | |||
178 | #include <mach/mx2_cam.h> | ||
179 | struct imx_mx2_camera_data { | ||
180 | resource_size_t iobasecsi; | ||
181 | resource_size_t iosizecsi; | ||
182 | resource_size_t irqcsi; | ||
183 | resource_size_t iobaseemmaprp; | ||
184 | resource_size_t iosizeemmaprp; | ||
185 | resource_size_t irqemmaprp; | ||
186 | }; | ||
187 | struct platform_device *__init imx_add_mx2_camera( | ||
188 | const struct imx_mx2_camera_data *data, | ||
189 | const struct mx2_camera_platform_data *pdata); | ||
190 | |||
191 | #include <mach/mxc_ehci.h> | ||
192 | struct imx_mxc_ehci_data { | ||
193 | int id; | ||
194 | resource_size_t iobase; | ||
195 | resource_size_t irq; | ||
196 | }; | ||
197 | struct platform_device *__init imx_add_mxc_ehci( | ||
198 | const struct imx_mxc_ehci_data *data, | ||
199 | const struct mxc_usbh_platform_data *pdata); | ||
200 | |||
201 | #include <mach/mmc.h> | ||
202 | struct imx_mxc_mmc_data { | ||
203 | int id; | ||
204 | resource_size_t iobase; | ||
205 | resource_size_t iosize; | ||
206 | resource_size_t irq; | ||
207 | resource_size_t dmareq; | ||
208 | }; | ||
209 | struct platform_device *__init imx_add_mxc_mmc( | ||
210 | const struct imx_mxc_mmc_data *data, | ||
211 | const struct imxmmc_platform_data *pdata); | ||
212 | |||
85 | #include <mach/mxc_nand.h> | 213 | #include <mach/mxc_nand.h> |
86 | struct imx_mxc_nand_data { | 214 | struct imx_mxc_nand_data { |
87 | /* | 215 | /* |
@@ -99,24 +227,39 @@ struct platform_device *__init imx_add_mxc_nand( | |||
99 | const struct imx_mxc_nand_data *data, | 227 | const struct imx_mxc_nand_data *data, |
100 | const struct mxc_nand_platform_data *pdata); | 228 | const struct mxc_nand_platform_data *pdata); |
101 | 229 | ||
102 | #include <mach/spi.h> | 230 | struct imx_mxc_pwm_data { |
103 | struct imx_spi_imx_data { | ||
104 | const char *devid; | ||
105 | int id; | 231 | int id; |
106 | resource_size_t iobase; | 232 | resource_size_t iobase; |
107 | resource_size_t iosize; | 233 | resource_size_t iosize; |
108 | int irq; | 234 | resource_size_t irq; |
109 | }; | 235 | }; |
110 | struct platform_device *__init imx_add_spi_imx( | 236 | struct platform_device *__init imx_add_mxc_pwm( |
111 | const struct imx_spi_imx_data *data, | 237 | const struct imx_mxc_pwm_data *data); |
112 | const struct spi_imx_master *pdata); | 238 | |
239 | struct imx_mxc_w1_data { | ||
240 | resource_size_t iobase; | ||
241 | }; | ||
242 | struct platform_device *__init imx_add_mxc_w1( | ||
243 | const struct imx_mxc_w1_data *data); | ||
113 | 244 | ||
114 | #include <mach/esdhc.h> | 245 | #include <mach/esdhc.h> |
115 | struct imx_esdhc_imx_data { | 246 | struct imx_sdhci_esdhc_imx_data { |
116 | int id; | 247 | int id; |
117 | resource_size_t iobase; | 248 | resource_size_t iobase; |
118 | resource_size_t irq; | 249 | resource_size_t irq; |
119 | }; | 250 | }; |
120 | struct platform_device *__init imx_add_esdhc( | 251 | struct platform_device *__init imx_add_sdhci_esdhc_imx( |
121 | const struct imx_esdhc_imx_data *data, | 252 | const struct imx_sdhci_esdhc_imx_data *data, |
122 | const struct esdhc_platform_data *pdata); | 253 | const struct esdhc_platform_data *pdata); |
254 | |||
255 | #include <mach/spi.h> | ||
256 | struct imx_spi_imx_data { | ||
257 | const char *devid; | ||
258 | int id; | ||
259 | resource_size_t iobase; | ||
260 | resource_size_t iosize; | ||
261 | int irq; | ||
262 | }; | ||
263 | struct platform_device *__init imx_add_spi_imx( | ||
264 | const struct imx_spi_imx_data *data, | ||
265 | const struct spi_imx_master *pdata); | ||