> -----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. > > -- > balbi BR, Yousaf -- To unsubscribe from this list: send the line "unsubscribe linux-usb" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html