
30 Sep
2024
30 Sep
'24
1:17 p.m.
Hi Peng,
On Mon, Sep 30, 2024 at 2:47 AM Peng Fan (OSS) peng.fan@oss.nxp.com wrote:
From: Peng Fan peng.fan@nxp.com
Only enable PER clk is not enough, also need to enable AHB/IPG clk.
Currently, the driver is working and now extra clocks need to be turned on.
Please provide more details here as to why this is a problem now and it wasn't before.
#if CONFIG_IS_ENABLED(CLK) /* Assigned clock already set clock */
ret = clk_get_by_name(dev, "ipg", &priv->ipg_clk);
if (!ret) {
ret = clk_enable(&priv->ipg_clk);
if (ret) {
printf("Failed to enable ipg_clk\n");
return ret;
}
}
ret = clk_get_by_name(dev, "ahb", &priv->ahb_clk);
if (!ret) {
ret = clk_enable(&priv->ahb_clk);
if (ret) {
printf("Failed to enable ahb_clk\n");
return ret;
In the case of failure, the previously enabled clock must be disabled.
Would it be better to use clk_enable_bulk() here instead?