2 * Copyright (C) 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.
10 #include <mach/hardware.h>
11 #include <mach/devices-common.h>
13 #define imx_fec_data_entry_single(soc) \
15 .iobase = soc ## _FEC_BASE_ADDR, \
16 .irq = soc ## _INT_FEC, \
19 #ifdef CONFIG_SOC_IMX25
20 const struct imx_fec_data imx25_fec_data __initconst
=
21 imx_fec_data_entry_single(MX25
);
22 #endif /* ifdef CONFIG_SOC_IMX25 */
24 #ifdef CONFIG_SOC_IMX27
25 const struct imx_fec_data imx27_fec_data __initconst
=
26 imx_fec_data_entry_single(MX27
);
27 #endif /* ifdef CONFIG_SOC_IMX27 */
29 #ifdef CONFIG_SOC_IMX35
30 const struct imx_fec_data imx35_fec_data __initconst
=
31 imx_fec_data_entry_single(MX35
);
34 #ifdef CONFIG_SOC_IMX51
35 const struct imx_fec_data imx51_fec_data __initconst
=
36 imx_fec_data_entry_single(MX51
);
39 #ifdef CONFIG_SOC_IMX53
40 const struct imx_fec_data imx53_fec_data __initconst
=
41 imx_fec_data_entry_single(MX53
);
44 struct platform_device
*__init
imx_add_fec(
45 const struct imx_fec_data
*data
,
46 const struct fec_platform_data
*pdata
)
48 struct resource res
[] = {
50 .start
= data
->iobase
,
51 .end
= data
->iobase
+ SZ_4K
,
52 .flags
= IORESOURCE_MEM
,
56 .flags
= IORESOURCE_IRQ
,
60 return imx_add_platform_device("fec", 0 /* -1? */,
62 pdata
, sizeof(*pdata
));