net: skb_segment() provides list head and tail
[linux/fpc-iii.git] / arch / arm / mach-imx / devices / platform-fsl-usb2-udc.c
blob23b0061347cba81f5fd8c63add9d8d57b7585d82
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>
11 #include "../hardware.h"
12 #include "devices-common.h"
14 #define imx_fsl_usb2_udc_data_entry_single(soc, _devid) \
15 { \
16 .devid = _devid, \
17 .iobase = soc ## _USB_OTG_BASE_ADDR, \
18 .irq = soc ## _INT_USB_OTG, \
21 #ifdef CONFIG_SOC_IMX25
22 const struct imx_fsl_usb2_udc_data imx25_fsl_usb2_udc_data __initconst =
23 imx_fsl_usb2_udc_data_entry_single(MX25, "imx-udc-mx27");
24 #endif /* ifdef CONFIG_SOC_IMX25 */
26 #ifdef CONFIG_SOC_IMX27
27 const struct imx_fsl_usb2_udc_data imx27_fsl_usb2_udc_data __initconst =
28 imx_fsl_usb2_udc_data_entry_single(MX27, "imx-udc-mx27");
29 #endif /* ifdef CONFIG_SOC_IMX27 */
31 #ifdef CONFIG_SOC_IMX31
32 const struct imx_fsl_usb2_udc_data imx31_fsl_usb2_udc_data __initconst =
33 imx_fsl_usb2_udc_data_entry_single(MX31, "imx-udc-mx27");
34 #endif /* ifdef CONFIG_SOC_IMX31 */
36 #ifdef CONFIG_SOC_IMX35
37 const struct imx_fsl_usb2_udc_data imx35_fsl_usb2_udc_data __initconst =
38 imx_fsl_usb2_udc_data_entry_single(MX35, "imx-udc-mx27");
39 #endif /* ifdef CONFIG_SOC_IMX35 */
41 struct platform_device *__init imx_add_fsl_usb2_udc(
42 const struct imx_fsl_usb2_udc_data *data,
43 const struct fsl_usb2_platform_data *pdata)
45 struct resource res[] = {
47 .start = data->iobase,
48 .end = data->iobase + SZ_512 - 1,
49 .flags = IORESOURCE_MEM,
50 }, {
51 .start = data->irq,
52 .end = data->irq,
53 .flags = IORESOURCE_IRQ,
56 return imx_add_platform_device_dmamask(data->devid, -1,
57 res, ARRAY_SIZE(res),
58 pdata, sizeof(*pdata), DMA_BIT_MASK(32));