Re: [PATCH 02/19] usb: dwc2: debugfs: add support for complete register dump

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Mon, Mar 16, 2015 at 04:45:47PM +0000, Kaukab, Yousaf wrote:
> > -----Original Message-----
> > From: Felipe Balbi [mailto:balbi@xxxxxx]
> > Sent: Saturday, March 14, 2015 6:15 PM
> > To: Kaukab, Yousaf
> > Cc: linux-usb@xxxxxxxxxxxxxxx; balbi@xxxxxx; john.youn@xxxxxxxxxxxx;
> > Herrero, Gregory; r.baldyga@xxxxxxxxxxx;
> > dinguyen@xxxxxxxxxxxxxxxxxxxxx; zhangfei.gao@xxxxxxxxxx
> > Subject: Re: [PATCH 02/19] usb: dwc2: debugfs: add support for complete
> > register dump
> > 
> > On Mon, Mar 09, 2015 at 04:04:42PM +0100, Mian Yousaf Kaukab wrote:
> > > Dump all registers to take a complete snapshot of dwc2 state.
> > > Code is inspired by dwc3/debugfs.c
> > >
> > > Signed-off-by: Mian Yousaf Kaukab <yousaf.kaukab@xxxxxxxxx>
> > > ---
> > >  drivers/usb/dwc2/core.h    |   1 +
> > >  drivers/usb/dwc2/debugfs.c | 356
> > > +++++++++++++++++++++++++++++++++++++++++++++
> > >  2 files changed, 357 insertions(+)
> > >
> > > diff --git a/drivers/usb/dwc2/core.h b/drivers/usb/dwc2/core.h index
> > > 9e2bf4d..e60655f 100644
> > > --- a/drivers/usb/dwc2/core.h
> > > +++ b/drivers/usb/dwc2/core.h
> > > @@ -613,6 +613,7 @@ struct dwc2_hsotg {
> > >  	enum dwc2_lx_state lx_state;
> > >
> > >  	struct dentry *debug_root;
> > > +	struct debugfs_regset32 *regset;
> > >
> > >  	/* DWC OTG HW Release versions */
> > >  #define DWC2_CORE_REV_2_71a	0x4f54271a
> > > diff --git a/drivers/usb/dwc2/debugfs.c b/drivers/usb/dwc2/debugfs.c
> > > index 6c3225c..b8b105e 100644
> > > --- a/drivers/usb/dwc2/debugfs.c
> > > +++ b/drivers/usb/dwc2/debugfs.c
> > > @@ -391,9 +391,344 @@ static inline void s3c_hsotg_create_debug(struct
> > > dwc2_hsotg *hsotg) {}
> > >
> > >  /* s3c_hsotg_delete_debug is removed as cleanup in done in
> > > dwc2_debugfs_exit */
> > >
> > > +#define dump_register(nm)	\
> > > +{				\
> > > +	.name	= #nm,		\
> > 
> > sure you don't need __stringify() here ?
> 
> Yes, sure. 
> with __stringify() I get register addresses instead of names. That is
> something like (0x000) = 0x04cd0000 instead of GOTGCTL = 0x04cd0000.

oh true.. I misparsed it. It's just that with DWC3 I'm not passing the
actual register define name :-p

-- 
balbi

Attachment: signature.asc
Description: Digital signature


[Index of Archives]     [Linux Media]     [Linux Input]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Old Linux USB Devel Archive]

  Powered by Linux