[PATCH 4/4] clk: ccf: mux: change the get_rate helper

Simon Glass sjg at chromium.org
Sun May 3 04:26:56 CEST 2020


+Stephen Warren

On Sat, 2 May 2020 at 09:59, Dario Binacchi <dariobin at libero.it> wrote:
>
> The previous version of the get_rate helper does not work if the mux
> clock parent is changed after the probe. This error has not been
> detected because this condition has not been tested. The error occurs
> because the set_parent helper does not change the parent of the clock
> device but only the clock selection register. Since changing the parent
> of a probed device can be tricky, the new version of the get_rate helper
> provides the rate of the selected clock and not that of the parent.
>
> Signed-off-by: Dario Binacchi <dariobin at libero.it>
>
> ---
>
>  drivers/clk/clk-mux.c | 26 +++++++++++++++++++++++++-
>  test/dm/clk_ccf.c     | 24 ++++++++++++++++++++++++
>  2 files changed, 49 insertions(+), 1 deletion(-)

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


More information about the U-Boot mailing list