Re: [PATCH 08/10] MXS: Add separate MXS EHCI HCD driver

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Wed, 18 Apr 2012, Marek Vasut wrote:

> This driver will handle i.MX233/i.MX28 and I hope soon i.MX6Q. I tried to keep
> this separate from the MXC EHCI to avoid further polution of the MXC EHCI,
> though eventually these two might be merged.


> +/* Called during probe() after chip reset completes */
> +static int ehci_mxs_setup(struct usb_hcd *hcd)
> +{
> +	struct ehci_hcd *ehci = hcd_to_ehci(hcd);
> +	int retval;
> +
> +	dbg_hcs_params(ehci, "reset");
> +	dbg_hcc_params(ehci, "reset");
> +
> +	/* Cache this readonly data; minimize chip reads. */
> +	ehci->hcs_params = ehci_readl(ehci, &ehci->caps->hcs_params);
> +
> +	hcd->has_tt = 1;
> +
> +	retval = ehci_halt(ehci);
> +	if (retval)
> +		return retval;
> +
> +	/* Data structure init. */
> +	retval = ehci_init(hcd);
> +	if (retval)
> +		return retval;
> +
> +	ehci->sbrn = 0x20;
> +
> +	ehci_reset(ehci);
> +
> +	ehci_port_power(ehci, 0);
> +
> +	return 0;
> +}

The current recommendation is that people use the existing ehci_setup() 
routine in ehci-hcd.c as much as possible instead of duplicating the 
code.

Alan Stern

--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux Media]     [Linux Input]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Old Linux USB Devel Archive]

  Powered by Linux