net: remove mm.h inclusion from netdevice.h
[linux-stable.git] / arch / arm / plat-mxc / devices / platform-mxc-ehci.c
blobe1763e03e7cb0b0a880a7d7f3e69e2ba3444f14b
1 /*
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.
8 */
9 #include <linux/dma-mapping.h>
10 #include <mach/hardware.h>
11 #include <mach/devices-common.h>
13 #define imx_mxc_ehci_data_entry_single(soc, _id, hs) \
14 { \
15 .id = _id, \
16 .iobase = soc ## _USB_ ## hs ## _BASE_ADDR, \
17 .irq = soc ## _INT_USB_ ## hs, \
20 #ifdef CONFIG_SOC_IMX25
21 const struct imx_mxc_ehci_data imx25_mxc_ehci_otg_data __initconst =
22 imx_mxc_ehci_data_entry_single(MX25, 0, OTG);
23 const struct imx_mxc_ehci_data imx25_mxc_ehci_hs_data __initconst =
24 imx_mxc_ehci_data_entry_single(MX25, 1, HS);
25 #endif /* ifdef CONFIG_SOC_IMX25 */
27 #ifdef CONFIG_SOC_IMX27
28 const struct imx_mxc_ehci_data imx27_mxc_ehci_otg_data __initconst =
29 imx_mxc_ehci_data_entry_single(MX27, 0, OTG);
30 const struct imx_mxc_ehci_data imx27_mxc_ehci_hs_data[] __initconst = {
31 imx_mxc_ehci_data_entry_single(MX27, 1, HS1),
32 imx_mxc_ehci_data_entry_single(MX27, 2, HS2),
34 #endif /* ifdef CONFIG_SOC_IMX27 */
36 #ifdef CONFIG_SOC_IMX31
37 const struct imx_mxc_ehci_data imx31_mxc_ehci_otg_data __initconst =
38 imx_mxc_ehci_data_entry_single(MX31, 0, OTG);
39 const struct imx_mxc_ehci_data imx31_mxc_ehci_hs_data[] __initconst = {
40 imx_mxc_ehci_data_entry_single(MX31, 1, HS1),
41 imx_mxc_ehci_data_entry_single(MX31, 2, HS2),
43 #endif /* ifdef CONFIG_SOC_IMX31 */
45 #ifdef CONFIG_SOC_IMX35
46 const struct imx_mxc_ehci_data imx35_mxc_ehci_otg_data __initconst =
47 imx_mxc_ehci_data_entry_single(MX35, 0, OTG);
48 const struct imx_mxc_ehci_data imx35_mxc_ehci_hs_data __initconst =
49 imx_mxc_ehci_data_entry_single(MX35, 1, HS);
50 #endif /* ifdef CONFIG_SOC_IMX35 */
52 struct platform_device *__init imx_add_mxc_ehci(
53 const struct imx_mxc_ehci_data *data,
54 const struct mxc_usbh_platform_data *pdata)
56 struct resource res[] = {
58 .start = data->iobase,
59 .end = data->iobase + SZ_512 - 1,
60 .flags = IORESOURCE_MEM,
61 }, {
62 .start = data->irq,
63 .end = data->irq,
64 .flags = IORESOURCE_IRQ,
67 return imx_add_platform_device_dmamask("mxc-ehci", data->id,
68 res, ARRAY_SIZE(res),
69 pdata, sizeof(*pdata), DMA_BIT_MASK(32));