Re: [RFC 10/21] xhci: replace xhci_readl() with readl() in xhci-dbg.c

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

 



On Tue, Sep 10, 2013 at 02:03:15AM +0800, Xenia Ragiadakou wrote:
> Function xhci_readl() is used to read 32bit xHC registers residing in MMIO
> address space. It takes as first argument a pointer to the xhci_hcd although
> it does not use it because internally it simply calls readl. This creates
> an illusion that xhci_readl() is an xhci specific function that has to be
> called in a context where a pointer to xhci_hcd is available.
> This patch replaces calls to xhci_readl() with calls to readl() in xhci-dbg.c.
> This is done so that xhci_readl() can be removed completely and code can
> become more straight-forward.

Its fine that this replacement would simplify it. But, I have
experienced that sometime such way of reading/writing a peripheral
registers is quite helpful. I was able to find several issues in dwc3
gadget isoc handling quickly because of the availability of dwc3_readl
dwc3_writel.

With such peripheral specific exerciser one can log all register
read/write in sequential order with timestamp with a little effort,
which can further help in debugging critical issues. Sometime, they
might be even helpful in diagnosis of hardware issues. Same sequence
can be extracted and provided to hardware engineer for analysing the
behaviour of device in simulation.

Regards
Pratyush

> 
> Signed-off-by: Xenia Ragiadakou <burzalodowa@xxxxxxxxx>
--
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




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

  Powered by Linux