[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <20250912231100.hkdmnvnfxulqznvh@synopsys.com>
Date: Fri, 12 Sep 2025 23:11:00 +0000
From: Thinh Nguyen <Thinh.Nguyen@...opsys.com>
To: Prashanth K <prashanth.k@....qualcomm.com>
CC: Thinh Nguyen <Thinh.Nguyen@...opsys.com>,
Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
"linux-usb@...r.kernel.org" <linux-usb@...r.kernel.org>,
"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH] usb: dwc3: Log dwc3 instance name in traces
On Fri, Sep 12, 2025, Thinh Nguyen wrote:
>
> >
> > 2) OR we can use container_of(base, struct dwc3, regs)) to get dwc pointer,
> > this will not work in few places where we use dep->regs (~6 places). we
> > can just create a separate function dwc3_dep_readl/writel for dep->regs,
>
> We can just update the endpoint macros to something like this:
> #define DWC3_DEPCMD(n) (DWC3_DEP_BASE(n) + 0x0c)
Or we can just remove the DWC3_DEP_BASE and do as follow:
#define DWC3_DEPCMDPAR2(n) (0xc800 + ((n) * 0x10))
#define DWC3_DEPCMDPAR1(n) (0xc804 + ((n) * 0x10))
#define DWC3_DEPCMDPAR0(n) (0xc808 + ((n) * 0x10))
#define DWC3_DEPCMD(n) (0xc80c + ((n) * 0x10))
>
> so we can do this:
> dwc3_readl(dwc->regs, DWC3_DEPCMD(dep->number));
>
Powered by blists - more mailing lists