From: Conor Dooley <conor@kernel.org>
To: Philipp Zabel <p.zabel@pengutronix.de>
Cc: claudiu.beznea@tuxon.dev,
Conor Dooley <conor.dooley@microchip.com>,
Daire McNamara <daire.mcnamara@microchip.com>,
pierre-henry.moussay@microchip.com,
valentina.fernandezalanis@microchip.com,
Michael Turquette <mturquette@baylibre.com>,
Stephen Boyd <sboyd@kernel.org>, Rob Herring <robh@kernel.org>,
Krzysztof Kozlowski <krzk+dt@kernel.org>,
linux-riscv@lists.infradead.org, linux-clk@vger.kernel.org,
devicetree@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH v6 1/7] reset: mpfs: add non-auxiliary bus probing
Date: Fri, 31 Oct 2025 11:55:44 +0000 [thread overview]
Message-ID: <20251031-rewrap-single-e13bbfd9f1bb@spud> (raw)
In-Reply-To: <4e3c3c3d6c1a0d2905a90e5f1c0b2cb8f67bc43b.camel@pengutronix.de>
[-- Attachment #1: Type: text/plain, Size: 1312 bytes --]
On Thu, Oct 30, 2025 at 02:40:30PM +0100, Philipp Zabel wrote:
> On Mi, 2025-10-29 at 16:11 +0000, Conor Dooley wrote:
> > @@ -46,41 +52,46 @@ static inline struct mpfs_reset *to_mpfs_reset(struct reset_controller_dev *rcde
> > static int mpfs_assert(struct reset_controller_dev *rcdev, unsigned long id)
> > {
> > struct mpfs_reset *rst = to_mpfs_reset(rcdev);
> > - unsigned long flags;
> > u32 reg;
> >
> > - spin_lock_irqsave(&mpfs_reset_lock, flags);
> > + if (rst->regmap)
> > + return regmap_update_bits(rst->regmap, REG_SUBBLK_RESET_CR, BIT(id), BIT(id));
>
> This could use regmap_set_bits().
>
> > +
> > + guard(spinlock_irqsave)(&mpfs_reset_lock);
> >
> > reg = readl(rst->base);
> > reg |= BIT(id);
> > writel(reg, rst->base);
>
> Since I've just seen this in the i.MX8ULP series [1], it would be
> cleaner to convert the aux driver to regmap as well. The readl/writel()
> code paths could be dropped then.
>
> [1] https://lore.kernel.org/lkml/20251029135229.890-1-laurentiumihalcea111@gmail.com/
Yeah, it's definitely a lot neater this way. I'll do that. Patch ends up
touching the clock driver in the process, but I don't think that's a big
deal, since it's just the auxdev bits relating to the iomem pointer
becoming a regmap pointer instead.
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 228 bytes --]
next prev parent reply other threads:[~2025-10-31 11:55 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-10-29 16:11 [PATCH v6 0/7] Redo PolarFire SoC's mailbox/clock devicestrees and related code Conor Dooley
2025-10-29 16:11 ` [PATCH v6 1/7] reset: mpfs: add non-auxiliary bus probing Conor Dooley
2025-10-30 13:40 ` Philipp Zabel
2025-10-31 11:55 ` Conor Dooley [this message]
2025-10-31 7:20 ` claudiu beznea
2025-10-31 10:58 ` Conor Dooley
2025-10-29 16:11 ` [PATCH v6 2/7] dt-bindings: clk: microchip: mpfs: remove first reg region Conor Dooley
2025-10-29 16:11 ` [PATCH v6 3/7] clk: microchip: mpfs: use regmap for clocks Conor Dooley
2025-10-31 7:14 ` claudiu beznea
2025-10-29 16:11 ` [PATCH v6 4/7] riscv: dts: microchip: fix mailbox description Conor Dooley
2025-10-29 16:11 ` [PATCH v6 5/7] riscv: dts: microchip: convert clock and reset to use syscon Conor Dooley
2025-10-29 16:11 ` [PATCH v6 6/7] MAINTAINERS: add new soc drivers to Microchip RISC-V entry Conor Dooley
2025-10-29 16:11 ` [PATCH v6 7/7] MAINTAINERS: rename " Conor Dooley
2025-11-04 8:32 ` [PATCH v6 0/7] Redo PolarFire SoC's mailbox/clock devicestrees and related code Claudiu Beznea
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=20251031-rewrap-single-e13bbfd9f1bb@spud \
--to=conor@kernel.org \
--cc=claudiu.beznea@tuxon.dev \
--cc=conor.dooley@microchip.com \
--cc=daire.mcnamara@microchip.com \
--cc=devicetree@vger.kernel.org \
--cc=krzk+dt@kernel.org \
--cc=linux-clk@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-riscv@lists.infradead.org \
--cc=mturquette@baylibre.com \
--cc=p.zabel@pengutronix.de \
--cc=pierre-henry.moussay@microchip.com \
--cc=robh@kernel.org \
--cc=sboyd@kernel.org \
--cc=valentina.fernandezalanis@microchip.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).