[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20250612034723.GB7552@nxa18884-linux>
Date: Thu, 12 Jun 2025 11:47:23 +0800
From: Peng Fan <peng.fan@....nxp.com>
To: Sascha Hauer <s.hauer@...gutronix.de>
Cc: Sudeep Holla <sudeep.holla@....com>,
Cristian Marussi <cristian.marussi@....com>,
Michael Turquette <mturquette@...libre.com>,
Stephen Boyd <sboyd@...nel.org>, Peng Fan <peng.fan@....com>,
arm-scmi@...r.kernel.org, linux-arm-kernel@...ts.infradead.org,
linux-clk@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH] clk: scmi: Fix children encountered before parents case
On Wed, Jun 04, 2025 at 01:00:30PM +0200, Sascha Hauer wrote:
>When it comes to clocks with parents the SCMI clk driver assumes that
>parents are always initialized before their children which might not
>always be the case.
>
>During initialization of the parent_data array we have:
>
> sclk->parent_data[i].hw = hws[sclk->info->parents[i]];
>
>hws[sclk->info->parents[i]] will not yet be initialized when children
>are encountered before their possible parents. Solve this by allocating
>all struct scmi_clk as an array first and populating all hws[] upfront.
>
>Fixes: 65a8a3dd3b95f ("clk: scmi: Add support for clock {set,get}_parent")
>Signed-off-by: Sascha Hauer <s.hauer@...gutronix.de>
Thanks for the fix. To i.MX, the index of child clk is always after
parent clk per current SM design. Not sure you met real issue, anyway
this patch itself is correct.
Reviewed-by: <peng.fan@....com>
Powered by blists - more mailing lists