[U-Boot] [PATCH V3 06/20] usb: gadget: mv_udc: fix hardware udc address for i.MX6

Marek Vasut marex at denx.de
Fri Aug 2 12:53:42 CEST 2013


Dear Troy Kisky,

> The hcor for i.MX6 is 02184340
> and the udc should be 02184140
> 
> Signed-off-by: Troy Kisky <troy.kisky at boundarydevices.com>
> 
> ---
> I don't know if this is a correct fix, please check carefully.
> ---
>  drivers/usb/gadget/mv_udc.c | 28 +++++++++++++++++++---------
>  1 file changed, 19 insertions(+), 9 deletions(-)
> 
> diff --git a/drivers/usb/gadget/mv_udc.c b/drivers/usb/gadget/mv_udc.c
> index 7574e31..359b8e1 100644
> --- a/drivers/usb/gadget/mv_udc.c
> +++ b/drivers/usb/gadget/mv_udc.c
> @@ -110,6 +110,16 @@ static struct mv_drv controller = {
>  	},
>  };
> 
> +struct mv_udc *get_mv_udc(void)
> +{
> +#ifdef CONFIG_MXC_USB_PORT
> +	return (struct mv_udc *)((unsigned)controller.ctrl->hcor
> +			- (0x200 * CONFIG_MXC_USB_PORT));
> +#else
> +	return (struct mv_udc *)controller.ctrl->hcor;
> +#endif
> +}
> +

This in particular is something I wanted to avoid happening.

Can you instead call

usb_lowlevel_init(0, (void **)&controller.ctrl);

for different number than 0 in usb_gadget_register_driver() instead ? THe effect 
will be the same, yet the patch will be smaller.

Best regards,
Marek Vasut


More information about the U-Boot mailing list