1 // SPDX-License-Identifier: GPL-2.0-only
3 * Copyright (C) 2010 Pengutronix
4 * Uwe Kleine-Koenig <u.kleine-koenig@pengutronix.de>
6 #include "../hardware.h"
7 #include "devices-common.h"
9 #define imx_imx21_hcd_data_entry_single(soc) \
11 .iobase = soc ## _USBOTG_BASE_ADDR, \
12 .irq = soc ## _INT_USBHOST, \
15 #ifdef CONFIG_SOC_IMX21
16 const struct imx_imx21_hcd_data imx21_imx21_hcd_data __initconst =
17 imx_imx21_hcd_data_entry_single(MX21);
18 #endif /* ifdef CONFIG_SOC_IMX21 */
20 struct platform_device *__init imx_add_imx21_hcd(
21 const struct imx_imx21_hcd_data *data,
22 const struct mx21_usbh_platform_data *pdata)
24 struct resource res[] = {
26 .start = data->iobase,
27 .end = data->iobase + SZ_8K - 1,
28 .flags = IORESOURCE_MEM,
32 .flags = IORESOURCE_IRQ,
35 return imx_add_platform_device_dmamask("imx21-hcd", 0,
37 pdata, sizeof(*pdata), DMA_BIT_MASK(32));