usb: dwc3: Keep track of interrupt statistics

This change adds debug support to log all received different
events with endpoint0, other endpoints and gadget events. It
tracks these events per endpoint and displays the same.

For each of the endpoint event counters, add the rate (in Hz)
at which it occurs in order to better analyze performance and
aid in optimization.

How to use:
- Mount debugfs
- To see received all dwc3 events/interrupts
cat /sys/kernel/debug/<base_address>.dwc3/int_events
- To clear all received dwc3 events/interrupts
echo 0 > /sys/kernel/debug/<base_address>.dwc3/int_events

Change-Id: Ibf5f3ee57f69c87f94f55a58f50792075be24fbb
Signed-off-by: Gilad Broner <gbroner@codeaurora.org>
Signed-off-by: Mayank Rana <mrana@codeaurora.org>
4 files changed