1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
|
/*
* Copyright (C) 2009-2010 Pengutronix
* Uwe Kleine-Koenig <u.kleine-koenig@pengutronix.de>
*
* Copyright 2012 Freescale Semiconductor, Inc.
*
* This program is free software; you can redistribute it and/or modify it under
* the terms of the GNU General Public License version 2 as published by the
* Free Software Foundation.
*/
#include <linux/kernel.h>
#include <linux/platform_device.h>
#include <linux/init.h>
#include <linux/dma-mapping.h>
struct platform_device *imx_add_platform_device_dmamask(
const char *name, int id,
const struct resource *res, unsigned int num_resources,
const void *data, size_t size_data, u64 dmamask);
static inline struct platform_device *imx_add_platform_device(
const char *name, int id,
const struct resource *res, unsigned int num_resources,
const void *data, size_t size_data)
{
return imx_add_platform_device_dmamask(
name, id, res, num_resources, data, size_data, 0);
}
struct imx_dma_data {
resource_size_t iobase;
};
struct platform_device *__init imx_add_dma(const struct imx_dma_data *data);
#include <linux/fec.h>
struct imx_fec_data {
resource_size_t iobase;
resource_size_t irq;
};
struct platform_device *__init imx_add_fec(
#ifdef CONFIG_SOC_MVFA5
const int id,
#endif
const struct imx_fec_data *data,
const struct fec_platform_data *pdata);
#include <linux/can/platform/flexcan.h>
struct imx_flexcan_data {
const char *devid;
int id;
resource_size_t iobase;
resource_size_t iosize;
resource_size_t irq;
};
struct platform_device *__init imx_add_flexcan(
const struct imx_flexcan_data *data,
const struct flexcan_platform_data *pdata);
#include <linux/fsl_devices.h>
struct platform_device *__init imx_add_mlb(
const struct mxc_mlb_platform_data *pdata);
struct imx_fsl_usb2_udc_data {
resource_size_t iobase;
resource_size_t irq;
};
struct platform_device *__init imx_add_fsl_usb2_udc(
const struct imx_fsl_usb2_udc_data *data,
const struct fsl_usb2_platform_data *pdata);
#include <linux/gpio_keys.h>
struct platform_device *__init imx_add_gpio_keys(
const struct gpio_keys_platform_data *pdata);
#include <mach/mx21-usbhost.h>
struct imx_imx21_hcd_data {
resource_size_t iobase;
resource_size_t irq;
};
struct platform_device *__init imx_add_imx21_hcd(
const struct imx_imx21_hcd_data *data,
const struct mx21_usbh_platform_data *pdata);
struct imx_imx2_wdt_data {
int id;
resource_size_t iobase;
resource_size_t iosize;
};
struct platform_device *__init imx_add_imx2_wdt(
const struct imx_imx2_wdt_data *data);
struct imx_imxdi_rtc_data {
resource_size_t iobase;
resource_size_t irq;
};
struct platform_device *__init imx_add_imxdi_rtc(
const struct imx_imxdi_rtc_data *data);
struct imx_srtc_data {
resource_size_t iobase;
resource_size_t irq;
};
struct platform_device *__init imx_add_srtc(
const struct imx_srtc_data *data);
struct imx_snvs_rtc_data {
resource_size_t iobase;
resource_size_t irq;
};
struct platform_device *__init imx_add_snvs_rtc(
const struct imx_snvs_rtc_data *data);
#include <mach/imxfb.h>
struct imx_imx_fb_data {
resource_size_t iobase;
resource_size_t iosize;
resource_size_t irq;
};
struct platform_device *__init imx_add_imx_fb(
const struct imx_imx_fb_data *data,
const struct imx_fb_platform_data *pdata);
#include <mach/i2c.h>
struct imx_imx_i2c_data {
int id;
resource_size_t iobase;
resource_size_t iosize;
resource_size_t irq;
};
struct platform_device *__init imx_add_imx_i2c(
const struct imx_imx_i2c_data *data,
const struct imxi2c_platform_data *pdata);
#include <linux/input/matrix_keypad.h>
struct imx_imx_keypad_data {
resource_size_t iobase;
resource_size_t iosize;
resource_size_t irq;
};
struct platform_device *__init imx_add_imx_keypad(
const struct imx_imx_keypad_data *data,
const struct matrix_keymap_data *pdata);
#include <mach/ssi.h>
struct imx_imx_ssi_data {
int id;
resource_size_t iobase;
resource_size_t iosize;
resource_size_t irq;
resource_size_t dmatx0;
resource_size_t dmarx0;
resource_size_t dmatx1;
resource_size_t dmarx1;
};
struct platform_device *__init imx_add_imx_ssi(
const struct imx_imx_ssi_data *data,
const struct imx_ssi_platform_data *pdata);
#include <mach/esai.h>
struct imx_imx_esai_data {
int id;
resource_size_t iobase;
resource_size_t iosize;
resource_size_t irq;
resource_size_t dmatx;
resource_size_t dmarx;
};
struct platform_device *__init imx_add_imx_esai(
const struct imx_imx_esai_data *data,
const struct imx_esai_platform_data *pdata);
#include <mach/sai.h>
struct mvf_sai_data {
int id;
resource_size_t iobase;
resource_size_t iosize;
resource_size_t irq;
resource_size_t dmatx0;
resource_size_t dmarx0;
resource_size_t dmatx1;
resource_size_t dmarx1;
};
struct platform_device *__init mvf_add_sai(
int id,
const struct mvf_sai_data *data,
const struct mvf_sai_platform_data *pdata);
#include <mach/imx-uart.h>
struct imx_imx_uart_3irq_data {
int id;
resource_size_t iobase;
resource_size_t iosize;
resource_size_t irqrx;
resource_size_t irqtx;
resource_size_t irqrts;
};
struct platform_device *__init imx_add_imx_uart_3irq(
const struct imx_imx_uart_3irq_data *data,
const struct imxuart_platform_data *pdata);
struct imx_imx_uart_1irq_data {
int id;
resource_size_t iobase;
resource_size_t iosize;
resource_size_t irq;
};
struct platform_device *__init imx_add_imx_uart_1irq(
const struct imx_imx_uart_1irq_data *data,
const struct imxuart_platform_data *pdata);
#include <mach/usb.h>
struct imx_imx_udc_data {
resource_size_t iobase;
resource_size_t iosize;
resource_size_t irq0;
resource_size_t irq1;
resource_size_t irq2;
resource_size_t irq3;
resource_size_t irq4;
resource_size_t irq5;
resource_size_t irq6;
};
struct platform_device *__init imx_add_imx_udc(
const struct imx_imx_udc_data *data,
const struct imxusb_platform_data *pdata);
#if 0
#include <mach/ipu.h>
#include <mach/mx3fb.h>
#include <mach/mx3_camera.h>
struct imx_ipu_core_data {
resource_size_t iobase;
resource_size_t synirq;
resource_size_t errirq;
};
struct platform_device *__init imx_add_ipu_core(
const struct imx_ipu_core_data *data,
const struct ipu_platform_data *pdata);
struct platform_device *__init imx_alloc_mx3_camera(
const struct imx_ipu_core_data *data,
const struct mx3_camera_pdata *pdata);
struct platform_device *__init imx_add_mx3_sdc_fb(
const struct imx_ipu_core_data *data,
struct mx3fb_platform_data *pdata);
#endif
#include <mach/mx1_camera.h>
struct imx_mx1_camera_data {
resource_size_t iobase;
resource_size_t iosize;
resource_size_t irq;
};
struct platform_device *__init imx_add_mx1_camera(
const struct imx_mx1_camera_data *data,
const struct mx1_camera_pdata *pdata);
#include <mach/mx2_cam.h>
struct imx_mx2_camera_data {
resource_size_t iobasecsi;
resource_size_t iosizecsi;
resource_size_t irqcsi;
resource_size_t iobaseemmaprp;
resource_size_t iosizeemmaprp;
resource_size_t irqemmaprp;
};
struct platform_device *__init imx_add_mx2_camera(
const struct imx_mx2_camera_data *data,
const struct mx2_camera_platform_data *pdata);
#include <mach/mxc_ehci.h>
struct imx_mxc_ehci_data {
int id;
resource_size_t iobase;
resource_size_t irq;
};
struct platform_device *__init imx_add_mxc_ehci(
const struct imx_mxc_ehci_data *data,
const struct mxc_usbh_platform_data *pdata);
struct platform_device *__init imx_add_fsl_ehci(
const struct imx_mxc_ehci_data *data,
const struct fsl_usb2_platform_data *pdata);
#include <mach/mmc.h>
struct imx_mxc_mmc_data {
int id;
resource_size_t iobase;
resource_size_t iosize;
resource_size_t irq;
resource_size_t dmareq;
};
struct platform_device *__init imx_add_mxc_mmc(
const struct imx_mxc_mmc_data *data,
const struct imxmmc_platform_data *pdata);
#include <mach/mxc_nand.h>
struct imx_mxc_nand_data {
/*
* id is traditionally 0, but -1 is more appropriate. We use -1 for new
* machines but don't change existing devices as the nand device usually
* appears in the kernel command line to pass its partitioning.
*/
int id;
resource_size_t iobase;
resource_size_t iosize;
resource_size_t axibase;
resource_size_t irq;
};
struct platform_device *__init imx_add_mxc_nand(
const struct imx_mxc_nand_data *data,
const struct mxc_nand_platform_data *pdata);
struct imx_mxc_pwm_data {
int id;
resource_size_t iobase;
resource_size_t iosize;
resource_size_t irq;
};
struct platform_device *__init imx_add_mxc_pwm(
const struct imx_mxc_pwm_data *data);
/* mxc_rtc */
struct imx_mxc_rtc_data {
resource_size_t iobase;
resource_size_t irq;
};
struct platform_device *__init imx_add_mxc_rtc(
const struct imx_mxc_rtc_data *data);
/* mxc_w1 */
struct imx_mxc_w1_data {
resource_size_t iobase;
};
struct platform_device *__init imx_add_mxc_w1(
const struct imx_mxc_w1_data *data);
#include <mach/esdhc.h>
struct imx_sdhci_esdhc_imx_data {
int id;
resource_size_t iobase;
resource_size_t irq;
};
struct platform_device *__init imx_add_sdhci_esdhc_imx(
const struct imx_sdhci_esdhc_imx_data *data,
const struct esdhc_platform_data *pdata);
#include <mach/spi.h>
#include <mach/spi-mvf.h>
struct imx_spi_imx_data {
const char *devid;
int id;
resource_size_t iobase;
resource_size_t iosize;
int irq;
};
struct platform_device *__init imx_add_spi_imx(
const struct imx_spi_imx_data *data,
const struct spi_imx_master *pdata);
struct platform_device *__init mvf_add_spi_mvf(
const struct imx_spi_imx_data *data,
const struct spi_mvf_master *pdata);
#include <mach/ipu-v3.h>
struct imx_ipuv3_data {
resource_size_t iobase;
resource_size_t iosize;
resource_size_t irq_err;
resource_size_t irq;
unsigned int irq_start;
int (*init) (int);
void (*pg) (int);
};
struct platform_device *__init imx_add_ipuv3(
const int id,
const struct imx_ipuv3_data *data,
struct imx_ipuv3_platform_data *pdata);
struct platform_device *__init imx_add_ipuv3_fb(
const int id,
const struct ipuv3_fb_platform_data *pdata);
#include <mach/mxc_vpu.h>
struct imx_vpu_data {
resource_size_t iobase;
resource_size_t irq_ipi;
resource_size_t irq_jpg;
bool iram_enable;
int iram_size;
void (*reset) (void);
void (*pg) (int);
};
struct platform_device *__init imx_add_vpu(
const struct imx_vpu_data *data);
#include <mach/mvf-dcu-fb.h>
struct mvf_dcu_data {
resource_size_t iobase;
resource_size_t iosize;
resource_size_t irq;
int (*init) (int);
};
struct platform_device *__init mvf_add_dcu(
const int id,
const struct mvf_dcu_data *data,
struct mvf_dcu_platform_data *pdata);
#include <mach/mxc_dvfs.h>
struct imx_dvfs_core_data {
resource_size_t iobase;
resource_size_t irq;
};
struct platform_device *__init imx_add_dvfs_core(
const struct imx_dvfs_core_data *data,
const struct mxc_dvfs_platform_data *pdata);
struct platform_device *__init imx_add_busfreq(void);
#include <linux/fsl_devices.h>
struct imx_tve_data {
resource_size_t iobase;
resource_size_t irq;
};
struct platform_device *__init imx_add_tve(
const struct imx_tve_data *data,
const struct fsl_mxc_tve_platform_data *pdata);
#include <linux/ahci_platform.h>
struct imx_ahci_data {
int id;
resource_size_t iobase;
resource_size_t irq;
};
struct platform_device *__init imx_add_ahci(
const struct imx_ahci_data *data,
const struct ahci_platform_data *pdata);
struct imx_iim_data {
resource_size_t iobase;
resource_size_t irq;
};
struct platform_device *__init imx_add_iim(
const struct imx_iim_data *data,
const struct mxc_iim_platform_data *pdata);
#include <mach/mxc_gpu.h>
struct imx_mxc_gpu_data {
resource_size_t irq_2d;
resource_size_t irq_3d;
resource_size_t iobase_2d;
resource_size_t iobase_3d;
resource_size_t gmem_base;
resource_size_t gmem_size;
};
struct platform_device *__init imx_add_mxc_gpu(
const struct imx_mxc_gpu_data *data,
const struct mxc_gpu_platform_data *pdata);
struct imx_perfmon_data {
resource_size_t iobase;
struct mxs_platform_perfmon_data *pdata;
};
struct platform_device *__init imx_add_perfmon(
const struct imx_perfmon_data *data);
struct imx_ldb_data {
resource_size_t iobase;
resource_size_t iosize;
};
struct platform_device *__init imx_add_ldb(
const struct imx_ldb_data *data,
struct fsl_mxc_ldb_platform_data *pdata);
struct imx_mxc_scc2_data {
resource_size_t iobase;
resource_size_t ram_start;
resource_size_t irq_smn;
resource_size_t irq_scm;
};
struct platform_device *__init imx_add_mxc_scc2(
const struct imx_mxc_scc2_data *data);
struct imx_pxp_data {
resource_size_t iobase;
resource_size_t iosize;
resource_size_t irq;
};
struct platform_device *__init imx_add_imx_pxp(
const struct imx_pxp_data *data);
struct platform_device *__init imx_add_imx_pxp_client(void);
#include <mach/epdc.h>
struct imx_epdc_data {
resource_size_t iobase;
resource_size_t iosize;
resource_size_t irq;
};
struct platform_device *__init imx_add_imx_epdc(
const struct imx_epdc_data *data,
const struct imx_epdc_fb_platform_data *pdata);
struct imx_spdif_data {
resource_size_t iobase;
resource_size_t irq;
};
struct platform_device *__init imx_add_spdif(
const struct imx_spdif_data *data,
const struct mxc_spdif_platform_data *pdata);
struct imx_spdif_dai_data {
resource_size_t iobase;
resource_size_t dmatx;
resource_size_t dmarx;
};
struct platform_device *__init imx_add_spdif_dai(
const struct imx_spdif_dai_data *data);
struct platform_device *__init imx_add_spdif_audio_device(void);
#include <mach/viv_gpu.h>
struct imx_viv_gpu_data {
resource_size_t irq_3d;
resource_size_t iobase_3d;
resource_size_t irq_2d;
resource_size_t iobase_2d;
resource_size_t irq_vg;
resource_size_t iobase_vg;
};
struct platform_device *__init imx_add_viv_gpu(
const struct imx_viv_gpu_data *data,
const struct viv_gpu_platform_data *pdata);
#include <mach/anatop_thermal.h>
struct imx_anatop_thermal_imx_data {
int id;
resource_size_t iobase;
resource_size_t irq;
};
struct platform_device *__init imx_add_anatop_thermal_imx(
const struct imx_anatop_thermal_imx_data *data,
const struct anatop_thermal_platform_data *pdata);
struct imx_otp_data {
resource_size_t iobase;
struct mxc_otp_platform_data *pdata;
};
struct platform_device *__init imx_add_otp(
const struct imx_otp_data *data);
struct imx_viim_data {
resource_size_t iobase;
};
struct platform_device *__init imx_add_viim(
const struct imx_viim_data *data);
struct imx_dcp_data {
resource_size_t iobase;
resource_size_t irq1;
resource_size_t irq2;
};
#include <mach/imx-pm.h>
struct imx_pm_imx_data {
int id;
resource_size_t iobase;
resource_size_t irq;
};
struct platform_device *__init imx_add_pm_imx(
const struct imx_pm_imx_data *data,
const struct pm_platform_data *pdata);
#include <mach/mxc_hdmi.h>
struct imx_mxc_hdmi_data {
resource_size_t irq;
resource_size_t irq_wakeup;
};
struct platform_device *__init imx_add_mxc_hdmi(
const struct imx_mxc_hdmi_data *data,
const struct fsl_mxc_hdmi_platform_data *pdata);
struct imx_mxc_hdmi_core_data {
resource_size_t iobase;
resource_size_t iosize;
};
struct platform_device *__init imx_add_mxc_hdmi_core(
const struct imx_mxc_hdmi_core_data *data,
const struct fsl_mxc_hdmi_core_platform_data *pdata);
#include <mach/mxc_asrc.h>
struct imx_imx_asrc_data {
int id;
resource_size_t iobase;
resource_size_t iosize;
resource_size_t irq;
resource_size_t dmatx1;
resource_size_t dmarx1;
resource_size_t dmatx2;
resource_size_t dmarx2;
resource_size_t dmatx3;
resource_size_t dmarx3;
};
struct platform_device *__init imx_add_imx_asrc(
const struct imx_imx_asrc_data *data,
const struct imx_asrc_platform_data *pdata);
struct imx_hdmi_soc_data {
resource_size_t irq;
};
struct platform_device *__init imx_add_hdmi_soc(void);
struct platform_device *__init imx_add_hdmi_soc_dai(
const struct imx_hdmi_soc_data *data);
#include <mach/mipi_dsi.h>
struct imx_mipi_dsi_data {
int id;
resource_size_t iobase;
resource_size_t iosize;
resource_size_t irq;
};
struct platform_device *__init imx_add_mipi_dsi(
const struct imx_mipi_dsi_data *data,
const struct mipi_dsi_platform_data *pdata);
#include <mach/mipi_csi2.h>
struct imx_mipi_csi2_data {
int id;
resource_size_t iobase;
resource_size_t iosize;
};
struct platform_device *__init imx_add_mipi_csi2(
const struct imx_mipi_csi2_data *data,
const struct mipi_csi2_platform_data *pdata);
struct platform_device *__init imx_add_dcp(
const struct imx_dcp_data *data);
struct imx_fsl_usb2_otg_data {
resource_size_t iobase;
resource_size_t irq;
};
struct platform_device *__init imx_add_fsl_usb2_otg(
const struct imx_fsl_usb2_otg_data *data,
const struct fsl_usb2_platform_data *pdata);
struct imx_fsl_usb2_wakeup_data {
int id;
resource_size_t irq_phy;
resource_size_t irq_core;
};
struct platform_device *__init imx_add_fsl_usb2_wakeup(
const struct imx_fsl_usb2_wakeup_data *data,
const struct fsl_usb2_wakeup_platform_data *pdata);
/* gpmi-nand*/
#include <linux/mtd/gpmi-nand.h>
struct platform_device *__init imx_add_gpmi(
const struct gpmi_nand_platform_data *data);
struct imx_rngb_data {
resource_size_t iobase;
resource_size_t irq;
};
struct platform_device *__init imx_add_rngb(
const struct imx_rngb_data *data);
|