summaryrefslogtreecommitdiff
path: root/drivers/mmc/mmc_private.h
diff options
context:
space:
mode:
authorSimon Glass <sjg@chromium.org>2016-06-13 05:30:20 (GMT)
committerSimon Glass <sjg@chromium.org>2016-07-11 20:06:44 (GMT)
commitc0c76ebae3d088867e38fb7a61e290ed9676e516 (patch)
tree6300aed5165a9fb4bc85c1a6ee4b31886bb4053d /drivers/mmc/mmc_private.h
parent6775e013c9b68d110e4d6f0489a8b79876081590 (diff)
downloadu-boot-fsl-qoriq-c0c76ebae3d088867e38fb7a61e290ed9676e516.tar.xz
mmc: Move tracing code into separate functions
Move this code into separate functions so that it can be used from the uclass also. Add static inline versions for when the option is disabled. Signed-off-by: Simon Glass <sjg@chromium.org>
Diffstat (limited to 'drivers/mmc/mmc_private.h')
-rw-r--r--drivers/mmc/mmc_private.h19
1 files changed, 19 insertions, 0 deletions
diff --git a/drivers/mmc/mmc_private.h b/drivers/mmc/mmc_private.h
index 3d189ba..49ec022 100644
--- a/drivers/mmc/mmc_private.h
+++ b/drivers/mmc/mmc_private.h
@@ -73,6 +73,25 @@ static inline ulong mmc_bwrite(struct blk_desc *block_dev, lbaint_t start,
#endif /* CONFIG_SPL_BUILD */
+#ifdef CONFIG_MMC_TRACE
+void mmmc_trace_before_send(struct mmc *mmc, struct mmc_cmd *cmd);
+void mmmc_trace_after_send(struct mmc *mmc, struct mmc_cmd *cmd, int ret);
+void mmc_trace_state(struct mmc *mmc, struct mmc_cmd *cmd);
+#else
+static inline void mmmc_trace_before_send(struct mmc *mmc, struct mmc_cmd *cmd)
+{
+}
+
+static inline void mmmc_trace_after_send(struct mmc *mmc, struct mmc_cmd *cmd,
+ int ret)
+{
+}
+
+static inline void mmc_trace_state(struct mmc *mmc, struct mmc_cmd *cmd)
+{
+}
+#endif
+
/**
* mmc_get_next_devnum() - Get the next available MMC device number
*