spi-topcliff-pch: add recovery processing in case wait-event timeout
[zen-stable.git] / arch / arm / plat-mxc / devices / platform-fsl-usb2-udc.c
blob848038f301fd24e518449beeb262018f95e367e6
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_fsl_usb2_udc_data_entry_single(soc) \
14 { \
15 .iobase = soc ## _USB_OTG_BASE_ADDR, \
16 .irq = soc ## _INT_USB_OTG, \
19 #ifdef CONFIG_SOC_IMX25
20 const struct imx_fsl_usb2_udc_data imx25_fsl_usb2_udc_data __initconst =
21 imx_fsl_usb2_udc_data_entry_single(MX25);
22 #endif /* ifdef CONFIG_SOC_IMX25 */
24 #ifdef CONFIG_SOC_IMX27
25 const struct imx_fsl_usb2_udc_data imx27_fsl_usb2_udc_data __initconst =
26 imx_fsl_usb2_udc_data_entry_single(MX27);
27 #endif /* ifdef CONFIG_SOC_IMX27 */
29 #ifdef CONFIG_SOC_IMX31
30 const struct imx_fsl_usb2_udc_data imx31_fsl_usb2_udc_data __initconst =
31 imx_fsl_usb2_udc_data_entry_single(MX31);
32 #endif /* ifdef CONFIG_SOC_IMX31 */
34 #ifdef CONFIG_SOC_IMX35
35 const struct imx_fsl_usb2_udc_data imx35_fsl_usb2_udc_data __initconst =
36 imx_fsl_usb2_udc_data_entry_single(MX35);
37 #endif /* ifdef CONFIG_SOC_IMX35 */
39 #ifdef CONFIG_SOC_IMX51
40 const struct imx_fsl_usb2_udc_data imx51_fsl_usb2_udc_data __initconst =
41 imx_fsl_usb2_udc_data_entry_single(MX51);
42 #endif
44 struct platform_device *__init imx_add_fsl_usb2_udc(
45 const struct imx_fsl_usb2_udc_data *data,
46 const struct fsl_usb2_platform_data *pdata)
48 struct resource res[] = {
50 .start = data->iobase,
51 .end = data->iobase + SZ_512 - 1,
52 .flags = IORESOURCE_MEM,
53 }, {
54 .start = data->irq,
55 .end = data->irq,
56 .flags = IORESOURCE_IRQ,
59 return imx_add_platform_device_dmamask("fsl-usb2-udc", -1,
60 res, ARRAY_SIZE(res),
61 pdata, sizeof(*pdata), DMA_BIT_MASK(32));