From: Brian Masney <bmasney@redhat.com>
To: "Benoît Monin" <benoit.monin@bootlin.com>
Cc: "Vladimir Kondratiev" <vladimir.kondratiev@mobileye.com>,
"Gregory CLEMENT" <gregory.clement@bootlin.com>,
"Théo Lebrun" <theo.lebrun@bootlin.com>,
"Stephen Boyd" <sboyd@kernel.org>,
"Brian Masney" <bmasney+clk@redhat.com>,
"Jerome Brunet" <jbrunet+clk@baylibre.com>,
"Thomas Petazzoni" <thomas.petazzoni@bootlin.com>,
"Tawfik Bayouk" <tawfik.bayouk@mobileye.com>,
linux-mips@vger.kernel.org, linux-clk@vger.kernel.org,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH v2 1/2] clk: eyeq: Use devm_platform_ioremap_resource()
Date: Mon, 14 Sep 2026 12:57:16 -0400 [thread overview]
Message-ID: <aqgnbA_yMRXczyao@redhat.com> (raw)
In-Reply-To: <20260914-clk-eyeq-res-v2-1-687e5de3aba7@bootlin.com>
Hi Benoît,
On Mon, Sep 14, 2026 at 02:16:44PM +0200, Benoît Monin wrote:
> Convert eqc_probe() from the open-coded platform_get_resource() +
> ioremap() sequence to devm_platform_ioremap_resource(). Besides less
> code, this requests the memory region so the OLB registers are properly
> reserved in the iomem_resource tree.
>
> Move devm_platform_ioremap_resource() before checking for device match
> data, so OLBs bound without match data also get their memory region
> mapped and reserved.
>
> Suggested-by: Vladimir Kondratiev <vladimir.kondratiev@mobileye.com>
> Signed-off-by: Benoît Monin <benoit.monin@bootlin.com>
> ---
> drivers/clk/clk-eyeq.c | 15 +++++----------
> 1 file changed, 5 insertions(+), 10 deletions(-)
>
> diff --git a/drivers/clk/clk-eyeq.c b/drivers/clk/clk-eyeq.c
> index cf37feccc734..3662e6990bf7 100644
> --- a/drivers/clk/clk-eyeq.c
> +++ b/drivers/clk/clk-eyeq.c
> @@ -513,21 +513,16 @@ static int eqc_probe(struct platform_device *pdev)
> const struct eqc_match_data *data;
> struct clk_hw_onecell_data *cells;
> unsigned int i, clk_count;
> - struct resource *res;
> void __iomem *base;
> int ret;
>
> + base = devm_platform_ioremap_resource(pdev, 0);
> + if (IS_ERR(base))
> + return PTR_ERR(base);
> +
As Sashiko pointed out, it would probably make sense to just convert the
rest of the driver over to use the devm_ variants where available (like
of_clk_add_hw_provider).
Brian
next prev parent reply other threads:[~2026-09-14 16:57 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-09-14 12:16 [PATCH v2 0/2] clk: eyeq: Reserve OLB memory regions Benoît Monin
2026-09-14 12:16 ` [PATCH v2 1/2] clk: eyeq: Use devm_platform_ioremap_resource() Benoît Monin
2026-09-14 12:30 ` sashiko-bot
2026-09-14 16:57 ` Brian Masney [this message]
2026-09-14 12:16 ` [PATCH v2 2/2] clk: eyeq: Add mobileye,eyeq6h-central-olb compatible Benoît Monin
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=aqgnbA_yMRXczyao@redhat.com \
--to=bmasney@redhat.com \
--cc=benoit.monin@bootlin.com \
--cc=bmasney+clk@redhat.com \
--cc=gregory.clement@bootlin.com \
--cc=jbrunet+clk@baylibre.com \
--cc=linux-clk@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mips@vger.kernel.org \
--cc=sboyd@kernel.org \
--cc=tawfik.bayouk@mobileye.com \
--cc=theo.lebrun@bootlin.com \
--cc=thomas.petazzoni@bootlin.com \
--cc=vladimir.kondratiev@mobileye.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.