[PATCH v2 05/21] clk: get clock pointer before proceeding
Simon Glass
sjg at chromium.org
Sun Aug 16 05:39:28 CEST 2020
On Wed, 5 Aug 2020 at 09:12, Claudiu Beznea
<claudiu.beznea at microchip.com> wrote:
>
> clk_get_by_indexed_prop() retrieves a clock with dev member being set
> with the pointer to the udevice for the clock controller driver. But
> in case of CCF each clock driver has set in dev member the reference
> to its parent (the root of the clock tree is a fixed clock, every
> node in clock tree is a clock registered with clk_register()). In this
> case the subsequent operations like dev_get_clk_ptr() on clocks
> retrieved by clk_get_by_indexed_prop() will fail. For this, get the
> pointer to the proper clock registered (with clk_register()) using
> clk_get_by_id() before proceeding.
>
> Fixes: 1d7993d1d0ef ("clk: Port Linux common clock framework [CCF] for imx6q to U-boot (tag: v5.1.12)")
> Signed-off-by: Claudiu Beznea <claudiu.beznea at microchip.com>
> ---
> drivers/clk/clk-uclass.c | 37 +++++++++++++++++++++++++++++++++----
> 1 file changed, 33 insertions(+), 4 deletions(-)
Reviewed-by: Simon Glass <sjg at chromium.org>
More information about the U-Boot
mailing list