[lkml]   [2019]   [Apr]   [11]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
Subject[PATCH v1 0/4] Add tracing for SDHCI register access
I was debugging a SDHC hardware bug and got tired of having to
translate the register values by hand. This patch set makes it so all
SDHC register read and write operations can be traced and easily read by
a human.

An example trace can be seen here:

I ended up defining a new tracing function `trace_print_register`. This
method takes a register definition and pretty prints it. It's a hybrid
of `trace_print_flags_seq` and `trace_print_symbols_seq`. It supports
printing bit fields, enum fields, and numeric fields. See the
documentation for usage.

I hope this makes someone else's life easier when debugging SDHC
hardware problems.

Raul E Rangel (4):
trace_events: Add trace_print_register to print register fields
mmc/sdhci: Rename sdhci.c to sdhci-core.c
mmc/host/sdhci: Add register read and write trace events
mmc/host/sdhci: Make sdhci_read/sdhci_write call trace functions

drivers/mmc/host/Makefile | 4 +
drivers/mmc/host/{sdhci.c => sdhci-core.c} | 136 +++++++++
drivers/mmc/host/sdhci-trace.c | 319 +++++++++++++++++++++
drivers/mmc/host/sdhci-trace.h | 93 ++++++
drivers/mmc/host/sdhci.h | 89 +-----
include/linux/trace_events.h | 4 +
include/linux/tracepoint-defs.h | 6 +
include/trace/trace_events.h | 9 +
kernel/trace/trace_output.c | 121 ++++++++
9 files changed, 698 insertions(+), 83 deletions(-)
rename drivers/mmc/host/{sdhci.c => sdhci-core.c} (97%)
create mode 100644 drivers/mmc/host/sdhci-trace.c
create mode 100644 drivers/mmc/host/sdhci-trace.h


 \ /
  Last update: 2019-04-12 00:09    [W:0.109 / U:2.236 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site