[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAEnQRZB2ZkcRirj1SZkfbsPHyyGr5PfnCDfv+ZuMu_Mj6XKBEQ@mail.gmail.com>
Date: Thu, 18 Sep 2025 15:32:58 +0300
From: Daniel Baluta <daniel.baluta@...il.com>
To: Peng Fan <peng.fan@....com>
Cc: Bjorn Andersson <andersson@...nel.org>, Mathieu Poirier <mathieu.poirier@...aro.org>,
Shawn Guo <shawnguo@...nel.org>, Sascha Hauer <s.hauer@...gutronix.de>,
Pengutronix Kernel Team <kernel@...gutronix.de>, Fabio Estevam <festevam@...il.com>, Frank Li <frank.li@....com>,
Daniel Baluta <daniel.baluta@....com>, linux-remoteproc@...r.kernel.org,
imx@...ts.linux.dev, linux-arm-kernel@...ts.infradead.org,
linux-kernel@...r.kernel.org
Subject: Re: [PATCH 1/5] remoteproc: imx_rproc: Simplify clock enable logic
using dcfg flags
On Thu, Sep 18, 2025 at 2:51 PM Peng Fan <peng.fan@....com> wrote:
>
> Simplify the clock enable logic by removing the dedicated
> imx_rproc_clk_enable() function and integrate the clock handling directly
> into the probe function to simplify the code.
>
> Add a new IMX_RPROC_NEED_CLKS flag in dcfg to indicate whether clock
> management is required for a given SoC. Update probe logic to conditionally
> enable clocks based on the new flag.
>
<snip>
> - return dev_err_probe(dev, ret, "failed to enable clks\n");
> + /* Remote core is under control of Linux or clock is not managed by firmware */
I see that you negate the comment from imx_rproc_clk_enable but with
the negation
OR becomes AND.
So, the comment should be:
/* Handle clocks when remote core is under control of Linux AND the
clocks are not managed by remote side FW */
Also, do we really need this flag?
Shouldn't we just make a decision based on the fact that clk is in the
device tree or not?
> + if (dcfg->flags & IMX_RPROC_NEED_CLKS) {
> + priv->clk = devm_clk_get_enabled(dev, NULL);
> + if (IS_ERR(priv->clk))
> + return dev_err_probe(dev, PTR_ERR(priv->clk), "Failed to enable clock\n");
Powered by blists - more mailing lists