[PATCH v6 1/7] reset: mpfs: add non-auxiliary bus probing

Conor Dooley conor at kernel.org
Fri Oct 31 04:55:44 PDT 2025


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.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 228 bytes
Desc: not available
URL: <http://lists.infradead.org/pipermail/linux-riscv/attachments/20251031/1da097af/attachment.sig>


More information about the linux-riscv mailing list