Linux Kernel  3.7.1
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
platform-fsl-usb2-udc.c
Go to the documentation of this file.
1 /*
2  * Copyright (C) 2010 Pengutronix
3  * Uwe Kleine-Koenig <[email protected]>
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_fsl_usb2_udc_data_entry_single(soc) \
14  { \
15  .iobase = soc ## _USB_OTG_BASE_ADDR, \
16  .irq = soc ## _INT_USB_OTG, \
17  }
18 
19 #ifdef CONFIG_SOC_IMX25
22 #endif /* ifdef CONFIG_SOC_IMX25 */
23 
24 #ifdef CONFIG_SOC_IMX27
25 const struct imx_fsl_usb2_udc_data imx27_fsl_usb2_udc_data __initconst =
27 #endif /* ifdef CONFIG_SOC_IMX27 */
28 
29 #ifdef CONFIG_SOC_IMX31
30 const struct imx_fsl_usb2_udc_data imx31_fsl_usb2_udc_data __initconst =
32 #endif /* ifdef CONFIG_SOC_IMX31 */
33 
34 #ifdef CONFIG_SOC_IMX35
35 const struct imx_fsl_usb2_udc_data imx35_fsl_usb2_udc_data __initconst =
37 #endif /* ifdef CONFIG_SOC_IMX35 */
38 
39 #ifdef CONFIG_SOC_IMX51
40 const struct imx_fsl_usb2_udc_data imx51_fsl_usb2_udc_data __initconst =
42 #endif
43 
45  const struct imx_fsl_usb2_udc_data *data,
46  const struct fsl_usb2_platform_data *pdata)
47 {
48  struct resource res[] = {
49  {
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,
57  },
58  };
59  return imx_add_platform_device_dmamask("fsl-usb2-udc", -1,
60  res, ARRAY_SIZE(res),
61  pdata, sizeof(*pdata), DMA_BIT_MASK(32));
62 }