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 ? -- balbi
Attachment:
signature.asc
Description: Digital signature