[PATCH V2 2/2] i3c: master: Add AMD I3C bus controller driver

Guntupalli, Manikanta manikanta.guntupalli at amd.com
Tue Sep 2 00:10:12 PDT 2025


[AMD Official Use Only - AMD Internal Distribution Only]

Hi,

> -----Original Message-----
> From: Alexandre Belloni <alexandre.belloni at bootlin.com>
> Sent: Tuesday, September 2, 2025 1:43 AM
> To: Guntupalli, Manikanta <manikanta.guntupalli at amd.com>
> Cc: git (AMD-Xilinx) <git at amd.com>; Simek, Michal <michal.simek at amd.com>;
> Frank.Li at nxp.com; robh at kernel.org; krzk+dt at kernel.org; conor+dt at kernel.org;
> kees at kernel.org; gustavoars at kernel.org; jarkko.nikula at linux.intel.com; linux-
> i3c at lists.infradead.org; devicetree at vger.kernel.org; linux-kernel at vger.kernel.org;
> linux-hardening at vger.kernel.org; Pandey, Radhey Shyam
> <radhey.shyam.pandey at amd.com>; Goud, Srinivas <srinivas.goud at amd.com>;
> Datta, Shubhrajyoti <shubhrajyoti.datta at amd.com>; manion05gk at gmail.com
> Subject: Re: [PATCH V2 2/2] i3c: master: Add AMD I3C bus controller driver
>
> On 29/08/2025 22:43:27+0530, Manikanta Guntupalli wrote:
> > +static void xi3c_master_reset_fifos(struct xi3c_master *master) {
> > +   u32 data;
> > +
> > +   /* Reset fifos */
> > +   data = readl(master->membase + XI3C_RESET_OFFSET);
> > +   data |= XI3C_FIFOS_RST_MASK;
> > +   writel(data, master->membase + XI3C_RESET_OFFSET);
> > +   udelay(10);
>
> As pointed out by checkpatch:
> usleep_range is preferred over udelay, I guess it would be fine in this function.
In the error path, xi3c_master_reinit() gets called, which in turn calls xi3c_master_reset_fifos(). Since a spinlock is held at that point, we cannot sleep. Therefore, udelay() is used intentionally to avoid sleep.
>
> > +   data &= ~XI3C_FIFOS_RST_MASK;
> > +   writel(data, master->membase + XI3C_RESET_OFFSET);
> > +   udelay(10);
> > +}
> > +
>
> --

Thanks,
Manikanta.



More information about the linux-i3c mailing list