[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <20251031-rewrap-single-e13bbfd9f1bb@spud>
Date: Fri, 31 Oct 2025 11:55:44 +0000
From: Conor Dooley <conor@...nel.org>
To: Philipp Zabel <p.zabel@...gutronix.de>
Cc: claudiu.beznea@...on.dev, Conor Dooley <conor.dooley@...rochip.com>,
Daire McNamara <daire.mcnamara@...rochip.com>,
pierre-henry.moussay@...rochip.com,
valentina.fernandezalanis@...rochip.com,
Michael Turquette <mturquette@...libre.com>,
Stephen Boyd <sboyd@...nel.org>, Rob Herring <robh@...nel.org>,
Krzysztof Kozlowski <krzk+dt@...nel.org>,
linux-riscv@...ts.infradead.org, linux-clk@...r.kernel.org,
devicetree@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH v6 1/7] reset: mpfs: add non-auxiliary bus probing
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.
Download attachment "signature.asc" of type "application/pgp-signature" (229 bytes)
Powered by blists - more mailing lists