[U-Boot] [PATCH v2 10/14] usb:ci_udc: Introduce init_after_reset phy function

Lukasz Majewski lukma at denx.de
Mon Oct 1 12:49:46 UTC 2018


Hi Ramon,

> MSM variant of Chipidea must reinitalize the phy
> after controller reset.
> Introduce ci_init_after_reset() weak function that
> can be used to achieve the above init.
> 
> Signed-off-by: Ramon Fried <ramon.fried at gmail.com>
> ---
> 
> Changes in v2: None
> 
>  drivers/usb/gadget/ci_udc.c | 6 ++++++
>  1 file changed, 6 insertions(+)
> 
> diff --git a/drivers/usb/gadget/ci_udc.c b/drivers/usb/gadget/ci_udc.c
> index 2b9dbf06b9..8d23fab3b7 100644
> --- a/drivers/usb/gadget/ci_udc.c
> +++ b/drivers/usb/gadget/ci_udc.c
> @@ -104,6 +104,10 @@ static struct usb_ep_ops ci_ep_ops = {
>  	.free_request   = ci_ep_free_request,
>  };
>  
> +__weak void ci_init_after_reset(struct ehci_ctrl *ctrl)
> +{
> +}
> +
>  /* Init values for USB endpoints. */
>  static const struct usb_ep ci_ep_init[5] = {
>  	[0] = {	/* EP 0 */
> @@ -887,6 +891,8 @@ static int ci_pullup(struct usb_gadget *gadget,
> int is_on) writel(USBCMD_ITC(MICRO_8FRAME) | USBCMD_RST,
> &udc->usbcmd); udelay(200);
>  
> +		ci_init_after_reset(controller.ctrl);
> +
>  		writel((unsigned long)controller.epts,
> &udc->epinitaddr); 
>  		/* select DEVICE mode */

Reviewed-by: Lukasz Majewski <lukma at denx.de>


Best regards,

Lukasz Majewski

--

DENX Software Engineering GmbH,      Managing Director: Wolfgang Denk
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 488 bytes
Desc: OpenPGP digital signature
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20181001/17f09992/attachment.sig>


More information about the U-Boot mailing list