mmc: sdhci: Add mmc tracing events for legacy mode.

Add ring buffer tracing events in legacy mode for
debug purpose.
Tracing events include cpu, timestamp, legacy command
opcode, argument, response, interrupts.

Example:
<5> 171912889412: sdhci_prepare_data: mmc0: 0x28=0x0000003c
0x3E=0x00000000
<5> 171912901235: sdhci_set_transfer_mode: mmc0: 0x00=0x00000000
<5> 171912908579: sdhci_send_command: mmc0: updated
0x8=0x00000000 0xC=0x00000013 0xE=0x0000083a
<5> 171912920922: sdhci_irq: mmc0: resp 0: 0x00000900
resp 1: 0x00000000 resp 2: 0x00000000 resp 3: 0x00000000
<5> 171912931339: sdhci_irq: mmc0: intmask: 0x1
<5> 171912938839: sdhci_irq: mmc0: intmask: 0x2
<5> 171912945766: sdhci_finish_data: mmc0: 0x24=0x01f80000

Change-Id: I26d2de3ddf72a74dd84199a9772d48da128796f4
Signed-off-by: Sayali Lokhande <sayalil@codeaurora.org>
[xiaonian@codeaurora.org: fixed trivial merge conflicts &
fixed compilation errors]
Signed-off-by: Xiaonian Wang <xiaonian@codeaurora.org>
diff --git a/drivers/mmc/host/sdhci-msm.c b/drivers/mmc/host/sdhci-msm.c
index 9b0c029..ce83c59 100644
--- a/drivers/mmc/host/sdhci-msm.c
+++ b/drivers/mmc/host/sdhci-msm.c
@@ -2,7 +2,7 @@
  * drivers/mmc/host/sdhci-msm.c - Qualcomm Technologies, Inc. MSM SDHCI Platform
  * driver source file
  *
- * Copyright (c) 2012-2016, The Linux Foundation. All rights reserved.
+ * Copyright (c) 2012-2017, The Linux Foundation. All rights reserved.
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License version 2 and
@@ -3242,6 +3242,11 @@
 	if (host->cq_host)
 		sdhci_msm_cmdq_dump_debug_ram(host);
 
+	MMC_TRACE(host->mmc, "Data cnt: 0x%08x | Fifo cnt: 0x%08x\n",
+		sdhci_msm_readl_relaxed(host,
+			msm_host_offset->CORE_MCI_DATA_CNT),
+		sdhci_msm_readl_relaxed(host,
+			msm_host_offset->CORE_MCI_FIFO_CNT));
 	pr_info("Data cnt: 0x%08x | Fifo cnt: 0x%08x | Int sts: 0x%08x\n",
 		sdhci_msm_readl_relaxed(host,
 			msm_host_offset->CORE_MCI_DATA_CNT),