2 * Copyright (C) 2009-2010 Pengutronix
3 * Uwe Kleine-Koenig <u.kleine-koenig@pengutronix.de>
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.
9 #include <linux/kernel.h>
10 #include <linux/platform_device.h>
11 #include <linux/init.h>
12 #include <linux/amba/bus.h>
14 struct platform_device
*mxs_add_platform_device_dmamask(
15 const char *name
, int id
,
16 const struct resource
*res
, unsigned int num_resources
,
17 const void *data
, size_t size_data
, u64 dmamask
);
19 static inline struct platform_device
*mxs_add_platform_device(
20 const char *name
, int id
,
21 const struct resource
*res
, unsigned int num_resources
,
22 const void *data
, size_t size_data
)
24 return mxs_add_platform_device_dmamask(
25 name
, id
, res
, num_resources
, data
, size_data
, 0);
28 int __init
mxs_add_amba_device(const struct amba_device
*dev
);
31 int __init
mxs_add_duart(const struct amba_device
*dev
);
34 struct mxs_auart_data
{
36 resource_size_t iobase
;
37 resource_size_t iosize
;
40 struct platform_device
*__init
mxs_add_auart(
41 const struct mxs_auart_data
*data
);
44 #include <linux/fec.h>
47 resource_size_t iobase
;
48 resource_size_t iosize
;
51 struct platform_device
*__init
mxs_add_fec(
52 const struct mxs_fec_data
*data
,
53 const struct fec_platform_data
*pdata
);
56 #include <linux/can/platform/flexcan.h>
57 struct mxs_flexcan_data
{
59 resource_size_t iobase
;
60 resource_size_t iosize
;
63 struct platform_device
*__init
mxs_add_flexcan(
64 const struct mxs_flexcan_data
*data
,
65 const struct flexcan_platform_data
*pdata
);
68 struct mxs_mxs_i2c_data
{
70 resource_size_t iobase
;
71 resource_size_t errirq
;
72 resource_size_t dmairq
;
74 struct platform_device
* __init
mxs_add_mxs_i2c(
75 const struct mxs_mxs_i2c_data
*data
);
79 struct mxs_mxs_mmc_data
{
81 resource_size_t iobase
;
83 resource_size_t irq_err
;
84 resource_size_t irq_dma
;
86 struct platform_device
*__init
mxs_add_mxs_mmc(
87 const struct mxs_mxs_mmc_data
*data
,
88 const struct mxs_mmc_platform_data
*pdata
);
91 struct platform_device
*__init
mxs_add_mxs_pwm(
92 resource_size_t iobase
, int id
);