Ejemplo n.º 1
0
static int imx_chipidea_port_init(void *drvdata)
{
	struct imx_chipidea *ci = drvdata;
	int ret;

	if ((ci->flags & MXC_EHCI_PORTSC_MASK) == MXC_EHCI_MODE_ULPI) {
		dev_dbg(ci->dev, "using ULPI phy\n");
		if (IS_ENABLED(CONFIG_USB_ULPI)) {
			ret = ulpi_setup(ci->base + 0x170, 1);
			if (ret)
				dev_err(ci->dev, "ULPI setup failed with %s\n",
						strerror(-ret));
			mdelay(20);
		} else {
			dev_err(ci->dev, "no ULPI support available\n");
			ret = -ENODEV;
		}

		if (ret)
			return ret;
	}

	ret = imx_usbmisc_port_init(ci->portno, ci->flags);
	if (ret)
		dev_err(ci->dev, "misc init failed: %s\n", strerror(-ret));

	return ret;
}
Ejemplo n.º 2
0
static int imx_chipidea_port_init(void *drvdata)
{
	struct imx_chipidea *ci = drvdata;
	int ret;

	ret = imx_usbmisc_port_init(ci->portno, ci->flags);
	if (ret)
		dev_err(ci->dev, "misc init failed: %s\n", strerror(-ret));

	if (ci->init)
		ci->init(ci->portno);

	return ret;
}
Ejemplo n.º 3
0
static int imx_chipidea_port_init(void *drvdata)
{
	struct device_d *dev = drvdata;
	struct imxusb_platformdata *pdata = dev->platform_data;
	int ret;

	ret = imx_usbmisc_port_init(dev->id, pdata->flags);
	if (ret)
		dev_err(dev, "misc init failed: %s\n", strerror(-ret));

	if (pdata->init)
		pdata->init(dev->id);

	return ret;
}