[U-Boot] [PATCH v10 06/10] usb: host: ehci-generic: add error path and .remove callback

Simon Glass sjg at chromium.org
Fri Jul 7 03:57:07 UTC 2017


On 6 July 2017 at 01:42,  <patrice.chotard at st.com> wrote:
> From: Patrice Chotard <patrice.chotard at st.com>
>
> Use an array to save enabled clocks reference and deasserted resets
> in order to respectively disabled and asserted them in case of error
> during probe() or during driver removal.
>
> Signed-off-by: Patrice Chotard <patrice.chotard at st.com>
> ---
>
> v10:    _ none
> v9:     _ remove useless reset_free() and clk_free() in case of reset and clock has been
>           correctly get and deasserted/enabled
>
> v8:     _ replace devm_kmalloc() by devm_kcalloc()
>         _ fix error path by propagating initial error code until the end of probe()
>
> v7:     _ replace clk_count() and reset_count() by ofnode_count_phandle_with_args()
>
> v6:     _ none
>
> v5:     _ none
>
> v4:     _ update the memory allocation for deasserted resets and enabled
>           clocks reference list. Replace lists by arrays.
>         _ usage of new RESET and CLOCK methods clk_count(), reset_count(),
>           reset_assert_all() and clk_disable_all().
>
> v3:     _ keep enabled clocks and deasserted resets reference in list in order to
>           disable clock or assert resets in error path or in .remove callback
>         _ use struct generic_ehci * instead of struct udevice * as parameter for
>           ehci_release_resets() and ehci_release_clocks()
>  drivers/usb/host/ehci-generic.c | 118 ++++++++++++++++++++++++++++++++--------
>  1 file changed, 95 insertions(+), 23 deletions(-)
>

Reviewed-by: Simon Glass <sjg at chromium.org>


More information about the U-Boot mailing list