Uwe Kleine-König | 253ff1f | 2010-06-15 11:31:02 +0200 | [diff] [blame] | 1 | /* |
| 2 | * Copyright (C) 2009-2010 Pengutronix |
| 3 | * Uwe Kleine-Koenig <u.kleine-koenig@pengutronix.de> |
| 4 | * |
| 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> |
Arnd Bergmann | 82906b1 | 2012-08-24 15:14:29 +0200 | [diff] [blame] | 12 | #include <linux/platform_data/dma-imx-sdma.h> |
Uwe Kleine-König | 253ff1f | 2010-06-15 11:31:02 +0200 | [diff] [blame] | 13 | |
Shawn Guo | b78d8e5 | 2011-06-06 00:07:55 +0800 | [diff] [blame] | 14 | extern struct device mxc_aips_bus; |
Shawn Guo | 3622360 | 2011-06-22 22:41:30 +0800 | [diff] [blame] | 15 | extern struct device mxc_ahb_bus; |
Shawn Guo | b78d8e5 | 2011-06-06 00:07:55 +0800 | [diff] [blame] | 16 | |
Uwe Kleine-König | 0e39241 | 2011-08-25 11:16:01 +0200 | [diff] [blame] | 17 | static inline struct platform_device *imx_add_platform_device_dmamask( |
Uwe Kleine-König | 6332c10 | 2010-11-02 11:56:54 +0100 | [diff] [blame] | 18 | const char *name, int id, |
Uwe Kleine-König | 253ff1f | 2010-06-15 11:31:02 +0200 | [diff] [blame] | 19 | const struct resource *res, unsigned int num_resources, |
Uwe Kleine-König | 0e39241 | 2011-08-25 11:16:01 +0200 | [diff] [blame] | 20 | const void *data, size_t size_data, u64 dmamask) |
| 21 | { |
| 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, |
| 30 | }; |
| 31 | return platform_device_register_full(&pdevinfo); |
| 32 | } |
Uwe Kleine-König | 6332c10 | 2010-11-02 11:56:54 +0100 | [diff] [blame] | 33 | |
| 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) |
| 38 | { |
| 39 | return imx_add_platform_device_dmamask( |
| 40 | name, id, res, num_resources, data, size_data, 0); |
| 41 | } |
Uwe Kleine-König | 66384ee | 2010-06-15 18:14:19 +0200 | [diff] [blame] | 42 | |
Uwe Kleine-König | 6bd96f3 | 2010-10-06 12:00:18 +0200 | [diff] [blame] | 43 | #include <linux/fec.h> |
| 44 | struct imx_fec_data { |
Shawn Guo | 0ca1e29 | 2011-07-01 18:11:22 +0800 | [diff] [blame] | 45 | const char *devid; |
Uwe Kleine-König | 6bd96f3 | 2010-10-06 12:00:18 +0200 | [diff] [blame] | 46 | resource_size_t iobase; |
| 47 | resource_size_t irq; |
| 48 | }; |
| 49 | struct platform_device *__init imx_add_fec( |
| 50 | const struct imx_fec_data *data, |
| 51 | const struct fec_platform_data *pdata); |
| 52 | |
Marc Kleine-Budde | 61c6850 | 2010-07-22 11:45:34 +0200 | [diff] [blame] | 53 | #include <linux/can/platform/flexcan.h> |
Uwe Kleine-König | fc40d01 | 2010-11-04 12:02:35 +0100 | [diff] [blame] | 54 | struct imx_flexcan_data { |
| 55 | int id; |
| 56 | resource_size_t iobase; |
| 57 | resource_size_t iosize; |
| 58 | resource_size_t irq; |
| 59 | }; |
| 60 | struct platform_device *__init imx_add_flexcan( |
| 61 | const struct imx_flexcan_data *data, |
Marc Kleine-Budde | 61c6850 | 2010-07-22 11:45:34 +0200 | [diff] [blame] | 62 | const struct flexcan_platform_data *pdata); |
Marc Kleine-Budde | 61c6850 | 2010-07-22 11:45:34 +0200 | [diff] [blame] | 63 | |
Uwe Kleine-König | bd455ed | 2010-11-09 17:52:14 +0100 | [diff] [blame] | 64 | #include <linux/fsl_devices.h> |
| 65 | struct imx_fsl_usb2_udc_data { |
Peter Chen | f0ea883 | 2013-01-17 18:03:15 +0800 | [diff] [blame] | 66 | const char *devid; |
Uwe Kleine-König | bd455ed | 2010-11-09 17:52:14 +0100 | [diff] [blame] | 67 | resource_size_t iobase; |
| 68 | resource_size_t irq; |
| 69 | }; |
| 70 | struct platform_device *__init imx_add_fsl_usb2_udc( |
| 71 | const struct imx_fsl_usb2_udc_data *data, |
| 72 | const struct fsl_usb2_platform_data *pdata); |
| 73 | |
Dinh Nguyen | 47c5382 | 2010-10-23 09:12:46 -0500 | [diff] [blame] | 74 | #include <linux/gpio_keys.h> |
| 75 | struct platform_device *__init imx_add_gpio_keys( |
| 76 | const struct gpio_keys_platform_data *pdata); |
| 77 | |
Arnd Bergmann | 82906b1 | 2012-08-24 15:14:29 +0200 | [diff] [blame] | 78 | #include <linux/platform_data/usb-mx2.h> |
Uwe Kleine-König | 9f871469 | 2010-11-10 10:11:23 +0100 | [diff] [blame] | 79 | struct imx_imx21_hcd_data { |
| 80 | resource_size_t iobase; |
| 81 | resource_size_t irq; |
| 82 | }; |
| 83 | struct platform_device *__init imx_add_imx21_hcd( |
| 84 | const struct imx_imx21_hcd_data *data, |
| 85 | const struct mx21_usbh_platform_data *pdata); |
| 86 | |
Javier Martin | 6d8c452 | 2012-07-26 05:45:32 -0300 | [diff] [blame] | 87 | struct imx_imx27_coda_data { |
| 88 | resource_size_t iobase; |
| 89 | resource_size_t iosize; |
| 90 | resource_size_t irq; |
| 91 | }; |
| 92 | struct platform_device *__init imx_add_imx27_coda( |
| 93 | const struct imx_imx27_coda_data *data); |
| 94 | |
Uwe Kleine-König | e0a1961 | 2010-11-04 10:09:10 +0100 | [diff] [blame] | 95 | struct imx_imx2_wdt_data { |
Fabio Estevam | 8c2efec | 2010-12-06 16:38:32 -0200 | [diff] [blame] | 96 | int id; |
Uwe Kleine-König | e0a1961 | 2010-11-04 10:09:10 +0100 | [diff] [blame] | 97 | resource_size_t iobase; |
Uwe Kleine-König | 0087150 | 2010-11-11 16:58:50 +0100 | [diff] [blame] | 98 | resource_size_t iosize; |
Uwe Kleine-König | e0a1961 | 2010-11-04 10:09:10 +0100 | [diff] [blame] | 99 | }; |
| 100 | struct platform_device *__init imx_add_imx2_wdt( |
| 101 | const struct imx_imx2_wdt_data *data); |
| 102 | |
Uwe Kleine-König | e7c74b3 | 2010-11-11 11:57:21 +0100 | [diff] [blame] | 103 | struct imx_imxdi_rtc_data { |
| 104 | resource_size_t iobase; |
| 105 | resource_size_t irq; |
| 106 | }; |
| 107 | struct platform_device *__init imx_add_imxdi_rtc( |
| 108 | const struct imx_imxdi_rtc_data *data); |
| 109 | |
Arnd Bergmann | 82906b1 | 2012-08-24 15:14:29 +0200 | [diff] [blame] | 110 | #include <linux/platform_data/video-imxfb.h> |
Uwe Kleine-König | ad851bf | 2010-11-04 17:07:48 +0100 | [diff] [blame] | 111 | struct imx_imx_fb_data { |
Shawn Guo | e69dc9a | 2012-09-16 19:59:53 +0800 | [diff] [blame] | 112 | const char *devid; |
Uwe Kleine-König | ad851bf | 2010-11-04 17:07:48 +0100 | [diff] [blame] | 113 | resource_size_t iobase; |
Uwe Kleine-König | 194ee8e | 2010-11-11 15:32:21 +0100 | [diff] [blame] | 114 | resource_size_t iosize; |
Uwe Kleine-König | ad851bf | 2010-11-04 17:07:48 +0100 | [diff] [blame] | 115 | resource_size_t irq; |
| 116 | }; |
| 117 | struct platform_device *__init imx_add_imx_fb( |
| 118 | const struct imx_imx_fb_data *data, |
| 119 | const struct imx_fb_platform_data *pdata); |
| 120 | |
Arnd Bergmann | 82906b1 | 2012-08-24 15:14:29 +0200 | [diff] [blame] | 121 | #include <linux/platform_data/i2c-imx.h> |
Uwe Kleine-König | 64de5ec | 2010-09-21 12:13:34 +0200 | [diff] [blame] | 122 | struct imx_imx_i2c_data { |
Shawn Guo | 5bdfba2 | 2012-09-14 15:19:00 +0800 | [diff] [blame] | 123 | const char *devid; |
Uwe Kleine-König | 64de5ec | 2010-09-21 12:13:34 +0200 | [diff] [blame] | 124 | int id; |
| 125 | resource_size_t iobase; |
| 126 | resource_size_t iosize; |
| 127 | resource_size_t irq; |
| 128 | }; |
| 129 | struct platform_device *__init imx_add_imx_i2c( |
| 130 | const struct imx_imx_i2c_data *data, |
Uwe Kleine-König | 99a754d | 2010-06-16 14:37:51 +0200 | [diff] [blame] | 131 | const struct imxi2c_platform_data *pdata); |
| 132 | |
Uwe Kleine-König | 3f88014 | 2010-11-10 09:58:56 +0100 | [diff] [blame] | 133 | #include <linux/input/matrix_keypad.h> |
| 134 | struct imx_imx_keypad_data { |
| 135 | resource_size_t iobase; |
Uwe Kleine-König | ab9cee4b | 2010-11-11 11:35:33 +0100 | [diff] [blame] | 136 | resource_size_t iosize; |
Uwe Kleine-König | 3f88014 | 2010-11-10 09:58:56 +0100 | [diff] [blame] | 137 | resource_size_t irq; |
| 138 | }; |
| 139 | struct platform_device *__init imx_add_imx_keypad( |
| 140 | const struct imx_imx_keypad_data *data, |
| 141 | const struct matrix_keymap_data *pdata); |
| 142 | |
Arnd Bergmann | 82906b1 | 2012-08-24 15:14:29 +0200 | [diff] [blame] | 143 | #include <linux/platform_data/asoc-imx-ssi.h> |
Uwe Kleine-König | 4697bb92 | 2010-08-25 17:37:45 +0200 | [diff] [blame] | 144 | struct imx_imx_ssi_data { |
| 145 | int id; |
| 146 | resource_size_t iobase; |
| 147 | resource_size_t iosize; |
| 148 | resource_size_t irq; |
| 149 | resource_size_t dmatx0; |
| 150 | resource_size_t dmarx0; |
| 151 | resource_size_t dmatx1; |
| 152 | resource_size_t dmarx1; |
| 153 | }; |
| 154 | struct platform_device *__init imx_add_imx_ssi( |
| 155 | const struct imx_imx_ssi_data *data, |
| 156 | const struct imx_ssi_platform_data *pdata); |
| 157 | |
Arnd Bergmann | 82906b1 | 2012-08-24 15:14:29 +0200 | [diff] [blame] | 158 | #include <linux/platform_data/serial-imx.h> |
Uwe Kleine-König | 5162de0 | 2010-08-10 22:57:24 +0200 | [diff] [blame] | 159 | struct imx_imx_uart_3irq_data { |
| 160 | int id; |
| 161 | resource_size_t iobase; |
| 162 | resource_size_t iosize; |
| 163 | resource_size_t irqrx; |
| 164 | resource_size_t irqtx; |
| 165 | resource_size_t irqrts; |
| 166 | }; |
| 167 | struct platform_device *__init imx_add_imx_uart_3irq( |
| 168 | const struct imx_imx_uart_3irq_data *data, |
Uwe Kleine-König | 2db6823 | 2010-06-22 14:49:20 +0200 | [diff] [blame] | 169 | const struct imxuart_platform_data *pdata); |
Uwe Kleine-König | 5162de0 | 2010-08-10 22:57:24 +0200 | [diff] [blame] | 170 | |
| 171 | struct imx_imx_uart_1irq_data { |
| 172 | int id; |
| 173 | resource_size_t iobase; |
| 174 | resource_size_t iosize; |
| 175 | resource_size_t irq; |
| 176 | }; |
| 177 | struct platform_device *__init imx_add_imx_uart_1irq( |
| 178 | const struct imx_imx_uart_1irq_data *data, |
Uwe Kleine-König | 2db6823 | 2010-06-22 14:49:20 +0200 | [diff] [blame] | 179 | const struct imxuart_platform_data *pdata); |
| 180 | |
Arnd Bergmann | 82906b1 | 2012-08-24 15:14:29 +0200 | [diff] [blame] | 181 | #include <linux/platform_data/usb-imx_udc.h> |
Uwe Kleine-König | e083000 | 2010-11-02 10:03:51 +0100 | [diff] [blame] | 182 | struct imx_imx_udc_data { |
| 183 | resource_size_t iobase; |
| 184 | resource_size_t iosize; |
| 185 | resource_size_t irq0; |
| 186 | resource_size_t irq1; |
| 187 | resource_size_t irq2; |
| 188 | resource_size_t irq3; |
| 189 | resource_size_t irq4; |
| 190 | resource_size_t irq5; |
| 191 | resource_size_t irq6; |
| 192 | }; |
| 193 | struct platform_device *__init imx_add_imx_udc( |
| 194 | const struct imx_imx_udc_data *data, |
| 195 | const struct imxusb_platform_data *pdata); |
| 196 | |
Arnd Bergmann | 82906b1 | 2012-08-24 15:14:29 +0200 | [diff] [blame] | 197 | #include <linux/platform_data/video-mx3fb.h> |
| 198 | #include <linux/platform_data/camera-mx3.h> |
Uwe Kleine-König | afa77ef | 2011-03-03 21:32:02 +0100 | [diff] [blame] | 199 | struct imx_ipu_core_data { |
| 200 | resource_size_t iobase; |
| 201 | resource_size_t synirq; |
| 202 | resource_size_t errirq; |
| 203 | }; |
| 204 | struct platform_device *__init imx_add_ipu_core( |
Shawn Guo | 88289c8 | 2012-06-13 14:07:31 +0800 | [diff] [blame] | 205 | const struct imx_ipu_core_data *data); |
Uwe Kleine-König | afa77ef | 2011-03-03 21:32:02 +0100 | [diff] [blame] | 206 | struct platform_device *__init imx_alloc_mx3_camera( |
| 207 | const struct imx_ipu_core_data *data, |
| 208 | const struct mx3_camera_pdata *pdata); |
| 209 | struct platform_device *__init imx_add_mx3_sdc_fb( |
| 210 | const struct imx_ipu_core_data *data, |
| 211 | struct mx3fb_platform_data *pdata); |
| 212 | |
Arnd Bergmann | 82906b1 | 2012-08-24 15:14:29 +0200 | [diff] [blame] | 213 | #include <linux/platform_data/camera-mx1.h> |
Uwe Kleine-König | 9bb39b3 | 2010-11-02 11:59:08 +0100 | [diff] [blame] | 214 | struct imx_mx1_camera_data { |
| 215 | resource_size_t iobase; |
| 216 | resource_size_t iosize; |
| 217 | resource_size_t irq; |
| 218 | }; |
| 219 | struct platform_device *__init imx_add_mx1_camera( |
| 220 | const struct imx_mx1_camera_data *data, |
| 221 | const struct mx1_camera_pdata *pdata); |
| 222 | |
Arnd Bergmann | 82906b1 | 2012-08-24 15:14:29 +0200 | [diff] [blame] | 223 | #include <linux/platform_data/camera-mx2.h> |
Uwe Kleine-König | b2997cb | 2010-11-02 17:50:55 +0100 | [diff] [blame] | 224 | struct imx_mx2_camera_data { |
Shawn Guo | 27b7648 | 2012-09-16 16:26:20 +0800 | [diff] [blame] | 225 | const char *devid; |
Uwe Kleine-König | b2997cb | 2010-11-02 17:50:55 +0100 | [diff] [blame] | 226 | resource_size_t iobasecsi; |
| 227 | resource_size_t iosizecsi; |
| 228 | resource_size_t irqcsi; |
| 229 | resource_size_t iobaseemmaprp; |
| 230 | resource_size_t iosizeemmaprp; |
| 231 | resource_size_t irqemmaprp; |
| 232 | }; |
| 233 | struct platform_device *__init imx_add_mx2_camera( |
| 234 | const struct imx_mx2_camera_data *data, |
| 235 | const struct mx2_camera_platform_data *pdata); |
Gaëtan Carlier | 3ab3a35 | 2012-09-05 13:06:15 +0200 | [diff] [blame] | 236 | |
| 237 | |
| 238 | struct imx_mx2_emma_data { |
| 239 | resource_size_t iobase; |
| 240 | resource_size_t iosize; |
| 241 | resource_size_t irq; |
| 242 | }; |
Javier Martin | 52f1a84 | 2012-01-13 06:31:57 -0300 | [diff] [blame] | 243 | struct platform_device *__init imx_add_mx2_emmaprp( |
Gaëtan Carlier | 3ab3a35 | 2012-09-05 13:06:15 +0200 | [diff] [blame] | 244 | const struct imx_mx2_emma_data *data); |
Uwe Kleine-König | b2997cb | 2010-11-02 17:50:55 +0100 | [diff] [blame] | 245 | |
Arnd Bergmann | 82906b1 | 2012-08-24 15:14:29 +0200 | [diff] [blame] | 246 | #include <linux/platform_data/usb-ehci-mxc.h> |
Uwe Kleine-König | 2eb42d5 | 2010-11-05 18:52:09 +0100 | [diff] [blame] | 247 | struct imx_mxc_ehci_data { |
| 248 | int id; |
| 249 | resource_size_t iobase; |
| 250 | resource_size_t irq; |
| 251 | }; |
| 252 | struct platform_device *__init imx_add_mxc_ehci( |
| 253 | const struct imx_mxc_ehci_data *data, |
| 254 | const struct mxc_usbh_platform_data *pdata); |
| 255 | |
Arnd Bergmann | 82906b1 | 2012-08-24 15:14:29 +0200 | [diff] [blame] | 256 | #include <linux/platform_data/mmc-mxcmmc.h> |
Uwe Kleine-König | 9d3d945 | 2010-11-05 17:26:09 +0100 | [diff] [blame] | 257 | struct imx_mxc_mmc_data { |
Shawn Guo | 7f917a8 | 2012-09-16 16:54:30 +0800 | [diff] [blame] | 258 | const char *devid; |
Uwe Kleine-König | 9d3d945 | 2010-11-05 17:26:09 +0100 | [diff] [blame] | 259 | int id; |
| 260 | resource_size_t iobase; |
Uwe Kleine-König | 6a697e3 | 2010-11-12 11:10:55 +0100 | [diff] [blame] | 261 | resource_size_t iosize; |
Uwe Kleine-König | 9d3d945 | 2010-11-05 17:26:09 +0100 | [diff] [blame] | 262 | resource_size_t irq; |
| 263 | resource_size_t dmareq; |
| 264 | }; |
| 265 | struct platform_device *__init imx_add_mxc_mmc( |
| 266 | const struct imx_mxc_mmc_data *data, |
| 267 | const struct imxmmc_platform_data *pdata); |
| 268 | |
Arnd Bergmann | 82906b1 | 2012-08-24 15:14:29 +0200 | [diff] [blame] | 269 | #include <linux/platform_data/mtd-mxc_nand.h> |
Uwe Kleine-König | 00b57bf | 2010-08-23 11:25:52 +0200 | [diff] [blame] | 270 | struct imx_mxc_nand_data { |
Shawn Guo | 4d62435 | 2012-09-15 13:34:09 +0800 | [diff] [blame] | 271 | const char *devid; |
Sascha Hauer | 63a7c6d | 2010-08-03 11:59:46 +0200 | [diff] [blame] | 272 | /* |
| 273 | * id is traditionally 0, but -1 is more appropriate. We use -1 for new |
| 274 | * machines but don't change existing devices as the nand device usually |
| 275 | * appears in the kernel command line to pass its partitioning. |
| 276 | */ |
| 277 | int id; |
Uwe Kleine-König | 00b57bf | 2010-08-23 11:25:52 +0200 | [diff] [blame] | 278 | resource_size_t iobase; |
| 279 | resource_size_t iosize; |
Sascha Hauer | 63a7c6d | 2010-08-03 11:59:46 +0200 | [diff] [blame] | 280 | resource_size_t axibase; |
Uwe Kleine-König | 00b57bf | 2010-08-23 11:25:52 +0200 | [diff] [blame] | 281 | resource_size_t irq; |
| 282 | }; |
| 283 | struct platform_device *__init imx_add_mxc_nand( |
| 284 | const struct imx_mxc_nand_data *data, |
| 285 | const struct mxc_nand_platform_data *pdata); |
Uwe Kleine-König | 0287073 | 2010-06-21 18:02:55 +0200 | [diff] [blame] | 286 | |
Arnaud Patard (Rtp) | a45adf1 | 2011-07-26 16:54:25 +0200 | [diff] [blame] | 287 | struct imx_pata_imx_data { |
| 288 | resource_size_t iobase; |
Fabio Estevam | 236c4e8 | 2011-08-23 17:18:06 -0300 | [diff] [blame] | 289 | resource_size_t iosize; |
Arnaud Patard (Rtp) | a45adf1 | 2011-07-26 16:54:25 +0200 | [diff] [blame] | 290 | resource_size_t irq; |
| 291 | }; |
| 292 | struct platform_device *__init imx_add_pata_imx( |
| 293 | const struct imx_pata_imx_data *data); |
| 294 | |
Uwe Kleine-König | bf182bc | 2010-11-05 15:01:16 +0100 | [diff] [blame] | 295 | struct imx_mxc_pwm_data { |
Uwe Kleine-König | 5f3d109 | 2010-11-10 22:15:45 +0100 | [diff] [blame] | 296 | int id; |
Uwe Kleine-König | bf182bc | 2010-11-05 15:01:16 +0100 | [diff] [blame] | 297 | resource_size_t iobase; |
Uwe Kleine-König | 5f3d109 | 2010-11-10 22:15:45 +0100 | [diff] [blame] | 298 | resource_size_t iosize; |
Uwe Kleine-König | bf182bc | 2010-11-05 15:01:16 +0100 | [diff] [blame] | 299 | resource_size_t irq; |
| 300 | }; |
| 301 | struct platform_device *__init imx_add_mxc_pwm( |
| 302 | const struct imx_mxc_pwm_data *data); |
| 303 | |
Uwe Kleine-König | 8342267 | 2011-03-01 11:04:34 +0100 | [diff] [blame] | 304 | /* mxc_rtc */ |
| 305 | struct imx_mxc_rtc_data { |
Shawn Guo | bb1d34a | 2012-09-15 14:26:14 +0800 | [diff] [blame] | 306 | const char *devid; |
Uwe Kleine-König | 8342267 | 2011-03-01 11:04:34 +0100 | [diff] [blame] | 307 | resource_size_t iobase; |
| 308 | resource_size_t irq; |
| 309 | }; |
| 310 | struct platform_device *__init imx_add_mxc_rtc( |
| 311 | const struct imx_mxc_rtc_data *data); |
| 312 | |
| 313 | /* mxc_w1 */ |
Uwe Kleine-König | ae71a56 | 2010-10-29 10:56:07 +0200 | [diff] [blame] | 314 | struct imx_mxc_w1_data { |
| 315 | resource_size_t iobase; |
| 316 | }; |
| 317 | struct platform_device *__init imx_add_mxc_w1( |
| 318 | const struct imx_mxc_w1_data *data); |
| 319 | |
Arnd Bergmann | 82906b1 | 2012-08-24 15:14:29 +0200 | [diff] [blame] | 320 | #include <linux/platform_data/mmc-esdhc-imx.h> |
Uwe Kleine-König | 124bf94 | 2010-11-19 21:03:33 +0100 | [diff] [blame] | 321 | struct imx_sdhci_esdhc_imx_data { |
Shawn Guo | 57ed331 | 2011-06-30 09:24:26 +0800 | [diff] [blame] | 322 | const char *devid; |
Uwe Kleine-König | 124bf94 | 2010-11-19 21:03:33 +0100 | [diff] [blame] | 323 | int id; |
| 324 | resource_size_t iobase; |
| 325 | resource_size_t irq; |
| 326 | }; |
| 327 | struct platform_device *__init imx_add_sdhci_esdhc_imx( |
| 328 | const struct imx_sdhci_esdhc_imx_data *data, |
| 329 | const struct esdhc_platform_data *pdata); |
| 330 | |
Arnd Bergmann | 82906b1 | 2012-08-24 15:14:29 +0200 | [diff] [blame] | 331 | #include <linux/platform_data/spi-imx.h> |
Uwe Kleine-König | 35bab05 | 2010-09-09 21:02:02 +0200 | [diff] [blame] | 332 | struct imx_spi_imx_data { |
Uwe Kleine-König | ab56050 | 2010-09-09 21:02:02 +0200 | [diff] [blame] | 333 | const char *devid; |
Uwe Kleine-König | 35bab05 | 2010-09-09 21:02:02 +0200 | [diff] [blame] | 334 | int id; |
| 335 | resource_size_t iobase; |
| 336 | resource_size_t iosize; |
| 337 | int irq; |
| 338 | }; |
| 339 | struct platform_device *__init imx_add_spi_imx( |
| 340 | const struct imx_spi_imx_data *data, |
Uwe Kleine-König | 0287073 | 2010-06-21 18:02:55 +0200 | [diff] [blame] | 341 | const struct spi_imx_master *pdata); |
Shawn Guo | 3622360 | 2011-06-22 22:41:30 +0800 | [diff] [blame] | 342 | |
Shawn Guo | e51d0f0 | 2012-09-15 21:11:28 +0800 | [diff] [blame] | 343 | struct platform_device *imx_add_imx_dma(char *name, resource_size_t iobase, |
Shawn Guo | 73930eb | 2012-09-15 15:57:00 +0800 | [diff] [blame] | 344 | int irq, int irq_err); |
Shawn Guo | 62550cd | 2011-07-13 21:33:17 +0800 | [diff] [blame] | 345 | struct platform_device *imx_add_imx_sdma(char *name, |
Shawn Guo | 3622360 | 2011-06-22 22:41:30 +0800 | [diff] [blame] | 346 | resource_size_t iobase, int irq, struct sdma_platform_data *pdata); |
Richard Zhu | 97915bd | 2011-09-28 15:41:53 +0800 | [diff] [blame] | 347 | |
| 348 | #include <linux/ahci_platform.h> |
| 349 | struct imx_ahci_imx_data { |
| 350 | const char *devid; |
| 351 | resource_size_t iobase; |
| 352 | resource_size_t irq; |
| 353 | }; |
| 354 | struct platform_device *__init imx_add_ahci_imx( |
| 355 | const struct imx_ahci_imx_data *data, |
| 356 | const struct ahci_platform_data *pdata); |