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>
12 #include <linux/amba/bus.h>
13
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);
18
mxs_add_platform_device(const char * name,int id,const struct resource * res,unsigned int num_resources,const void * data,size_t size_data)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)
23 {
24 return mxs_add_platform_device_dmamask(
25 name, id, res, num_resources, data, size_data, 0);
26 }
27
28 int __init mxs_add_amba_device(const struct amba_device *dev);
29
30 /* duart */
31 int __init mxs_add_duart(const struct amba_device *dev);
32
33 /* auart */
34 struct mxs_auart_data {
35 int id;
36 resource_size_t iobase;
37 resource_size_t iosize;
38 resource_size_t irq;
39 };
40 struct platform_device *__init mxs_add_auart(
41 const struct mxs_auart_data *data);
42
43 /* fec */
44 #include <linux/fec.h>
45 struct mxs_fec_data {
46 int id;
47 resource_size_t iobase;
48 resource_size_t iosize;
49 resource_size_t irq;
50 };
51 struct platform_device *__init mxs_add_fec(
52 const struct mxs_fec_data *data,
53 const struct fec_platform_data *pdata);
54
55 /* flexcan */
56 #include <linux/can/platform/flexcan.h>
57 struct mxs_flexcan_data {
58 int id;
59 resource_size_t iobase;
60 resource_size_t iosize;
61 resource_size_t irq;
62 };
63 struct platform_device *__init mxs_add_flexcan(
64 const struct mxs_flexcan_data *data,
65 const struct flexcan_platform_data *pdata);
66
67 /* i2c */
68 struct mxs_i2c_data {
69 int id;
70 resource_size_t iobase;
71 resource_size_t errirq;
72 resource_size_t dmairq;
73 };
74 struct platform_device * __init mxs_add_mxs_i2c(const struct mxs_i2c_data *data);
75
76 /* mmc */
77 #include <mach/mmc.h>
78 struct mxs_mxs_mmc_data {
79 int id;
80 resource_size_t iobase;
81 resource_size_t dma;
82 resource_size_t irq_err;
83 resource_size_t irq_dma;
84 };
85 struct platform_device *__init mxs_add_mxs_mmc(
86 const struct mxs_mxs_mmc_data *data,
87 const struct mxs_mmc_platform_data *pdata);
88
89 /* pwm */
90 struct platform_device *__init mxs_add_mxs_pwm(
91 resource_size_t iobase, int id);
92