> -----Original Message-----
> From: Felipe Balbi [mailto:ba...@ti.com]
> Sent: Saturday, March 14, 2015 6:15 PM
> To: Kaukab, Yousaf
> Cc: linux-usb@vger.kernel.org; ba...@ti.com; john.y...@synopsys.com;
> Herrero, Gregory; r.bald...@samsung.com;
> dingu...@opensource.altera.com; zhangfei....@linaro.org
> 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.kau...@intel.com>
> > ---
> >  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 majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to