On Mon, 12 May 2014, Maxime Ripard wrote:

> From: Boris BREZILLON <[email protected]>
> 
> On the Allwinner's A31 SoC the reset line connected to the EHCI IP has to
> be deasserted for the EHCI block to be usable.
> 
> Add support for an optional reset controller that will be deasserted on
> power off and asserted on power on.
> 
> Signed-off-by: Boris BREZILLON <[email protected]>
> Signed-off-by: Maxime Ripard <[email protected]>
> Reviewed-by: Hans de Goede <[email protected]>

...

> @@ -208,6 +210,18 @@ static int ehci_platform_probe(struct platform_device 
> *dev)
>               }
>       }
>  
> +     priv->rst = devm_reset_control_get_optional(&dev->dev, NULL);
> +     if (IS_ERR(priv->rst)) {
> +             err = PTR_ERR(priv->rst);
> +             if (err == -EPROBE_DEFER)
> +                     goto err_put_clks;
> +             priv->rst = NULL;
> +     } else {
> +             err = reset_control_deassert(priv->rst);
> +             if (err)
> +                     goto err_put_clks;
> +     }
> +
>       if (pdata->big_endian_desc)
>               ehci->big_endian_desc = 1;
>       if (pdata->big_endian_mmio)

You don't re-assert the reset control if an error happens later on 
during probe.  Was that intentional?

Alan Stern

-- 
You received this message because you are subscribed to the Google Groups 
"linux-sunxi" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to