Linux Kernel
3.7.1
Main Page
Related Pages
Modules
Namespaces
Data Structures
Files
File List
Globals
All
Data Structures
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Macros
Groups
Pages
arch
arm
plat-mxc
include
mach
devices-common.h
Go to the documentation of this file.
1
/*
2
* Copyright (C) 2009-2010 Pengutronix
3
* Uwe Kleine-Koenig <
[email protected]
>
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
>
12
#include <
linux/platform_data/dma-imx-sdma.h
>
13
14
extern
struct
device
mxc_aips_bus
;
15
extern
struct
device
mxc_ahb_bus
;
16
17
static
inline
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)
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
}
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
}
42
43
#include <
linux/fec.h
>
44
struct
imx_fec_data
{
45
const
char
*
devid
;
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
53
#include <
linux/can/platform/flexcan.h
>
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
,
62
const
struct
flexcan_platform_data
*
pdata
);
63
64
#include <
linux/fsl_devices.h
>
65
struct
imx_fsl_usb2_udc_data
{
66
resource_size_t
iobase
;
67
resource_size_t
irq
;
68
};
69
struct
platform_device
*
__init
imx_add_fsl_usb2_udc
(
70
const
struct
imx_fsl_usb2_udc_data
*
data
,
71
const
struct
fsl_usb2_platform_data
*
pdata
);
72
73
#include <
linux/gpio_keys.h
>
74
struct
platform_device
*
__init
imx_add_gpio_keys
(
75
const
struct
gpio_keys_platform_data
*
pdata
);
76
77
#include <
linux/platform_data/usb-mx2.h
>
78
struct
imx_imx21_hcd_data
{
79
resource_size_t
iobase
;
80
resource_size_t
irq
;
81
};
82
struct
platform_device
*
__init
imx_add_imx21_hcd
(
83
const
struct
imx_imx21_hcd_data
*
data
,
84
const
struct
mx21_usbh_platform_data
*
pdata
);
85
86
struct
imx_imx27_coda_data
{
87
resource_size_t
iobase
;
88
resource_size_t
iosize
;
89
resource_size_t
irq
;
90
};
91
struct
platform_device
*
__init
imx_add_imx27_coda
(
92
const
struct
imx_imx27_coda_data
*
data
);
93
94
struct
imx_imx2_wdt_data
{
95
int
id
;
96
resource_size_t
iobase
;
97
resource_size_t
iosize
;
98
};
99
struct
platform_device
*
__init
imx_add_imx2_wdt
(
100
const
struct
imx_imx2_wdt_data
*
data
);
101
102
struct
imx_imxdi_rtc_data
{
103
resource_size_t
iobase
;
104
resource_size_t
irq
;
105
};
106
struct
platform_device
*
__init
imx_add_imxdi_rtc
(
107
const
struct
imx_imxdi_rtc_data
*
data
);
108
109
#include <
linux/platform_data/video-imxfb.h
>
110
struct
imx_imx_fb_data
{
111
resource_size_t
iobase
;
112
resource_size_t
iosize
;
113
resource_size_t
irq
;
114
};
115
struct
platform_device
*
__init
imx_add_imx_fb
(
116
const
struct
imx_imx_fb_data
*
data
,
117
const
struct
imx_fb_platform_data
*
pdata
);
118
119
#include <
linux/platform_data/i2c-imx.h
>
120
struct
imx_imx_i2c_data
{
121
int
id
;
122
resource_size_t
iobase
;
123
resource_size_t
iosize
;
124
resource_size_t
irq
;
125
};
126
struct
platform_device
*
__init
imx_add_imx_i2c
(
127
const
struct
imx_imx_i2c_data
*
data
,
128
const
struct
imxi2c_platform_data
*
pdata
);
129
130
#include <
linux/input/matrix_keypad.h
>
131
struct
imx_imx_keypad_data
{
132
resource_size_t
iobase
;
133
resource_size_t
iosize
;
134
resource_size_t
irq
;
135
};
136
struct
platform_device
*
__init
imx_add_imx_keypad
(
137
const
struct
imx_imx_keypad_data
*
data
,
138
const
struct
matrix_keymap_data
*
pdata
);
139
140
#include <
linux/platform_data/asoc-imx-ssi.h
>
141
struct
imx_imx_ssi_data
{
142
int
id
;
143
resource_size_t
iobase
;
144
resource_size_t
iosize
;
145
resource_size_t
irq
;
146
resource_size_t
dmatx0
;
147
resource_size_t
dmarx0
;
148
resource_size_t
dmatx1
;
149
resource_size_t
dmarx1
;
150
};
151
struct
platform_device
*
__init
imx_add_imx_ssi
(
152
const
struct
imx_imx_ssi_data
*
data
,
153
const
struct
imx_ssi_platform_data
*
pdata
);
154
155
#include <
linux/platform_data/serial-imx.h
>
156
struct
imx_imx_uart_3irq_data
{
157
int
id
;
158
resource_size_t
iobase
;
159
resource_size_t
iosize
;
160
resource_size_t
irqrx
;
161
resource_size_t
irqtx
;
162
resource_size_t
irqrts
;
163
};
164
struct
platform_device
*
__init
imx_add_imx_uart_3irq
(
165
const
struct
imx_imx_uart_3irq_data
*
data
,
166
const
struct
imxuart_platform_data
*
pdata
);
167
168
struct
imx_imx_uart_1irq_data
{
169
int
id
;
170
resource_size_t
iobase
;
171
resource_size_t
iosize
;
172
resource_size_t
irq
;
173
};
174
struct
platform_device
*
__init
imx_add_imx_uart_1irq
(
175
const
struct
imx_imx_uart_1irq_data
*
data
,
176
const
struct
imxuart_platform_data
*
pdata
);
177
178
#include <
linux/platform_data/usb-imx_udc.h
>
179
struct
imx_imx_udc_data
{
180
resource_size_t
iobase
;
181
resource_size_t
iosize
;
182
resource_size_t
irq0
;
183
resource_size_t
irq1
;
184
resource_size_t
irq2
;
185
resource_size_t
irq3
;
186
resource_size_t
irq4
;
187
resource_size_t
irq5
;
188
resource_size_t
irq6
;
189
};
190
struct
platform_device
*
__init
imx_add_imx_udc
(
191
const
struct
imx_imx_udc_data
*
data
,
192
const
struct
imxusb_platform_data
*
pdata
);
193
194
#include <
linux/platform_data/video-mx3fb.h
>
195
#include <
linux/platform_data/camera-mx3.h
>
196
struct
imx_ipu_core_data
{
197
resource_size_t
iobase
;
198
resource_size_t
synirq
;
199
resource_size_t
errirq
;
200
};
201
struct
platform_device
*
__init
imx_add_ipu_core
(
202
const
struct
imx_ipu_core_data
*
data
);
203
struct
platform_device
*
__init
imx_alloc_mx3_camera
(
204
const
struct
imx_ipu_core_data
*
data
,
205
const
struct
mx3_camera_pdata
*
pdata
);
206
struct
platform_device
*
__init
imx_add_mx3_sdc_fb
(
207
const
struct
imx_ipu_core_data
*
data
,
208
struct
mx3fb_platform_data
*
pdata
);
209
210
#include <
linux/platform_data/camera-mx1.h
>
211
struct
imx_mx1_camera_data
{
212
resource_size_t
iobase
;
213
resource_size_t
iosize
;
214
resource_size_t
irq
;
215
};
216
struct
platform_device
*
__init
imx_add_mx1_camera
(
217
const
struct
imx_mx1_camera_data
*
data
,
218
const
struct
mx1_camera_pdata
*
pdata
);
219
220
#include <
linux/platform_data/camera-mx2.h
>
221
struct
imx_mx2_camera_data
{
222
resource_size_t
iobasecsi
;
223
resource_size_t
iosizecsi
;
224
resource_size_t
irqcsi
;
225
resource_size_t
iobaseemmaprp
;
226
resource_size_t
iosizeemmaprp
;
227
resource_size_t
irqemmaprp
;
228
};
229
struct
platform_device
*
__init
imx_add_mx2_camera
(
230
const
struct
imx_mx2_camera_data
*
data
,
231
const
struct
mx2_camera_platform_data
*
pdata
);
232
struct
platform_device
*
__init
imx_add_mx2_emmaprp
(
233
const
struct
imx_mx2_camera_data
*
data
);
234
235
#include <
linux/platform_data/usb-ehci-mxc.h
>
236
struct
imx_mxc_ehci_data
{
237
int
id
;
238
resource_size_t
iobase
;
239
resource_size_t
irq
;
240
};
241
struct
platform_device
*
__init
imx_add_mxc_ehci
(
242
const
struct
imx_mxc_ehci_data
*
data
,
243
const
struct
mxc_usbh_platform_data
*
pdata
);
244
245
#include <
linux/platform_data/mmc-mxcmmc.h
>
246
struct
imx_mxc_mmc_data
{
247
int
id
;
248
resource_size_t
iobase
;
249
resource_size_t
iosize
;
250
resource_size_t
irq
;
251
resource_size_t
dmareq
;
252
};
253
struct
platform_device
*
__init
imx_add_mxc_mmc
(
254
const
struct
imx_mxc_mmc_data
*
data
,
255
const
struct
imxmmc_platform_data
*
pdata
);
256
257
#include <
linux/platform_data/mtd-mxc_nand.h
>
258
struct
imx_mxc_nand_data
{
259
/*
260
* id is traditionally 0, but -1 is more appropriate. We use -1 for new
261
* machines but don't change existing devices as the nand device usually
262
* appears in the kernel command line to pass its partitioning.
263
*/
264
int
id
;
265
resource_size_t
iobase
;
266
resource_size_t
iosize
;
267
resource_size_t
axibase
;
268
resource_size_t
irq
;
269
};
270
struct
platform_device
*
__init
imx_add_mxc_nand
(
271
const
struct
imx_mxc_nand_data
*
data
,
272
const
struct
mxc_nand_platform_data
*
pdata
);
273
274
struct
imx_pata_imx_data
{
275
resource_size_t
iobase
;
276
resource_size_t
iosize
;
277
resource_size_t
irq
;
278
};
279
struct
platform_device
*
__init
imx_add_pata_imx
(
280
const
struct
imx_pata_imx_data
*
data
);
281
282
struct
imx_mxc_pwm_data
{
283
int
id
;
284
resource_size_t
iobase
;
285
resource_size_t
iosize
;
286
resource_size_t
irq
;
287
};
288
struct
platform_device
*
__init
imx_add_mxc_pwm
(
289
const
struct
imx_mxc_pwm_data
*
data
);
290
291
/* mxc_rtc */
292
struct
imx_mxc_rtc_data
{
293
resource_size_t
iobase
;
294
resource_size_t
irq
;
295
};
296
struct
platform_device
*
__init
imx_add_mxc_rtc
(
297
const
struct
imx_mxc_rtc_data
*
data
);
298
299
/* mxc_w1 */
300
struct
imx_mxc_w1_data
{
301
resource_size_t
iobase
;
302
};
303
struct
platform_device
*
__init
imx_add_mxc_w1
(
304
const
struct
imx_mxc_w1_data
*
data
);
305
306
#include <
linux/platform_data/mmc-esdhc-imx.h
>
307
struct
imx_sdhci_esdhc_imx_data
{
308
const
char
*
devid
;
309
int
id
;
310
resource_size_t
iobase
;
311
resource_size_t
irq
;
312
};
313
struct
platform_device
*
__init
imx_add_sdhci_esdhc_imx
(
314
const
struct
imx_sdhci_esdhc_imx_data
*
data
,
315
const
struct
esdhc_platform_data
*
pdata
);
316
317
#include <
linux/platform_data/spi-imx.h
>
318
struct
imx_spi_imx_data
{
319
const
char
*
devid
;
320
int
id
;
321
resource_size_t
iobase
;
322
resource_size_t
iosize
;
323
int
irq
;
324
};
325
struct
platform_device
*
__init
imx_add_spi_imx
(
326
const
struct
imx_spi_imx_data
*
data
,
327
const
struct
spi_imx_master
*
pdata
);
328
329
struct
platform_device
*
imx_add_imx_dma
(
void
);
330
struct
platform_device
*
imx_add_imx_sdma
(
char
*
name
,
331
resource_size_t
iobase
,
int
irq,
struct
sdma_platform_data
*
pdata
);
332
333
#include <
linux/ahci_platform.h
>
334
struct
imx_ahci_imx_data
{
335
const
char
*
devid
;
336
resource_size_t
iobase
;
337
resource_size_t
irq
;
338
};
339
struct
platform_device
*
__init
imx_add_ahci_imx
(
340
const
struct
imx_ahci_imx_data
*
data
,
341
const
struct
ahci_platform_data
*
pdata
);
Generated on Thu Jan 10 2013 13:02:21 for Linux Kernel by
1.8.2