[PATCH 1/2] drivers: usb: musb: Fail if the ctrl mod register is missing

Marek Vasut marex at denx.de
Wed Apr 22 12:52:59 CEST 2020


On 4/22/20 12:50 PM, Arnaud Ferraris wrote:
> From: Sjoerd Simons <sjoerd.simons at collabora.co.uk>
> 
> If the trcl mode register address cannot be found error out rather then
> trying to continue (which cannot work)
> 
> Signed-off-by: Sjoerd Simons <sjoerd.simons at collabora.co.uk>
> Signed-off-by: Arnaud Ferraris <arnaud.ferraris at collabora.com>
> ---
> 
>  drivers/usb/musb-new/ti-musb.c | 5 +++++
>  1 file changed, 5 insertions(+)
> 
> diff --git a/drivers/usb/musb-new/ti-musb.c b/drivers/usb/musb-new/ti-musb.c
> index 608facefa3..4e88652433 100644
> --- a/drivers/usb/musb-new/ti-musb.c
> +++ b/drivers/usb/musb-new/ti-musb.c
> @@ -91,6 +91,11 @@ static int ti_musb_ofdata_to_platdata(struct udevice *dev)
>  	phys = fdtdec_lookup_phandle(fdt, node, "phys");
>  	ctrl_mod = fdtdec_lookup_phandle(fdt, phys, "ti,ctrl_mod");
>  	platdata->ctrl_mod_base = (void *)fdtdec_get_addr(fdt, ctrl_mod, "reg");
> +	if (platdata->ctrl_mod_base == FDT_ADDR_T_NONE) {
> +		pr_err("MUSB ctrl mod missing\n");

dev_err()


More information about the U-Boot mailing list