aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/plat-mxc/devices/platform-mxc-ehci.c
diff options
context:
space:
mode:
authorJonathan Herman <hermanjl@cs.unc.edu>2013-01-22 10:38:37 -0500
committerJonathan Herman <hermanjl@cs.unc.edu>2013-01-22 10:38:37 -0500
commitfcc9d2e5a6c89d22b8b773a64fb4ad21ac318446 (patch)
treea57612d1888735a2ec7972891b68c1ac5ec8faea /arch/arm/plat-mxc/devices/platform-mxc-ehci.c
parent8dea78da5cee153b8af9c07a2745f6c55057fe12 (diff)
Added missing tegra files.HEADmaster
Diffstat (limited to 'arch/arm/plat-mxc/devices/platform-mxc-ehci.c')
-rw-r--r--arch/arm/plat-mxc/devices/platform-mxc-ehci.c70
1 files changed, 70 insertions, 0 deletions
diff --git a/arch/arm/plat-mxc/devices/platform-mxc-ehci.c b/arch/arm/plat-mxc/devices/platform-mxc-ehci.c
new file mode 100644
index 00000000000..e1763e03e7c
--- /dev/null
+++ b/arch/arm/plat-mxc/devices/platform-mxc-ehci.c
@@ -0,0 +1,70 @@
1/*
2 * Copyright (C) 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/dma-mapping.h>
10#include <mach/hardware.h>
11#include <mach/devices-common.h>
12
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, \
18 }
19
20#ifdef CONFIG_SOC_IMX25
21const struct imx_mxc_ehci_data imx25_mxc_ehci_otg_data __initconst =
22 imx_mxc_ehci_data_entry_single(MX25, 0, OTG);
23const 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 */
26
27#ifdef CONFIG_SOC_IMX27
28const struct imx_mxc_ehci_data imx27_mxc_ehci_otg_data __initconst =
29 imx_mxc_ehci_data_entry_single(MX27, 0, OTG);
30const 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),
33};
34#endif /* ifdef CONFIG_SOC_IMX27 */
35
36#ifdef CONFIG_SOC_IMX31
37const struct imx_mxc_ehci_data imx31_mxc_ehci_otg_data __initconst =
38 imx_mxc_ehci_data_entry_single(MX31, 0, OTG);
39const 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),
42};
43#endif /* ifdef CONFIG_SOC_IMX31 */
44
45#ifdef CONFIG_SOC_IMX35
46const struct imx_mxc_ehci_data imx35_mxc_ehci_otg_data __initconst =
47 imx_mxc_ehci_data_entry_single(MX35, 0, OTG);
48const 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 */
51
52struct platform_device *__init imx_add_mxc_ehci(
53 const struct imx_mxc_ehci_data *data,
54 const struct mxc_usbh_platform_data *pdata)
55{
56 struct resource res[] = {
57 {
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,
65 },
66 };
67 return imx_add_platform_device_dmamask("mxc-ehci", data->id,
68 res, ARRAY_SIZE(res),
69 pdata, sizeof(*pdata), DMA_BIT_MASK(32));
70}