aboutsummaryrefslogtreecommitdiffstats
path: root/patches.at91/0168-mmc-atmel-mci-modify-CLKDIV-displaying-in-debugfs.patch
diff options
context:
space:
mode:
Diffstat (limited to 'patches.at91/0168-mmc-atmel-mci-modify-CLKDIV-displaying-in-debugfs.patch')
-rw-r--r--patches.at91/0168-mmc-atmel-mci-modify-CLKDIV-displaying-in-debugfs.patch44
1 files changed, 44 insertions, 0 deletions
diff --git a/patches.at91/0168-mmc-atmel-mci-modify-CLKDIV-displaying-in-debugfs.patch b/patches.at91/0168-mmc-atmel-mci-modify-CLKDIV-displaying-in-debugfs.patch
new file mode 100644
index 00000000000000..ef4ca6dc5a9af5
--- /dev/null
+++ b/patches.at91/0168-mmc-atmel-mci-modify-CLKDIV-displaying-in-debugfs.patch
@@ -0,0 +1,44 @@
+From 8f6fe6c730556e621c6e404c945a330ed4107ad3 Mon Sep 17 00:00:00 2001
+From: Nicolas Ferre <nicolas.ferre@atmel.com>
+Date: Fri, 6 Jul 2012 12:11:51 +0200
+Subject: mmc: atmel-mci: modify CLKDIV displaying in debugfs
+
+commit 8a4de07e05e7bedc894c2de3b3b04673d6d840ec upstream.
+
+Modify clock division displaying in debugfs for matching
+the new CLKDIV,CLKODD user interface arrangement.
+Is using the has_odd_clk_div property to choose the proper format.
+
+Signed-off-by: Nicolas Ferre <nicolas.ferre@atmel.com>
+---
+ drivers/mmc/host/atmel-mci.c | 12 +++++++++---
+ 1 file changed, 9 insertions(+), 3 deletions(-)
+
+diff --git a/drivers/mmc/host/atmel-mci.c b/drivers/mmc/host/atmel-mci.c
+index 90df83b..e03367c 100644
+--- a/drivers/mmc/host/atmel-mci.c
++++ b/drivers/mmc/host/atmel-mci.c
+@@ -394,11 +394,17 @@ static int atmci_regs_show(struct seq_file *s, void *v)
+ clk_disable(host->mck);
+ spin_unlock_bh(&host->lock);
+
+- seq_printf(s, "MR:\t0x%08x%s%s CLKDIV=%u\n",
++ seq_printf(s, "MR:\t0x%08x%s%s ",
+ buf[ATMCI_MR / 4],
+ buf[ATMCI_MR / 4] & ATMCI_MR_RDPROOF ? " RDPROOF" : "",
+- buf[ATMCI_MR / 4] & ATMCI_MR_WRPROOF ? " WRPROOF" : "",
+- buf[ATMCI_MR / 4] & 0xff);
++ buf[ATMCI_MR / 4] & ATMCI_MR_WRPROOF ? " WRPROOF" : "");
++ if (host->caps.has_odd_clk_div)
++ seq_printf(s, "{CLKDIV,CLKODD}=%u\n",
++ ((buf[ATMCI_MR / 4] & 0xff) << 1)
++ | ((buf[ATMCI_MR / 4] >> 16) & 1));
++ else
++ seq_printf(s, "CLKDIV=%u\n",
++ (buf[ATMCI_MR / 4] & 0xff));
+ seq_printf(s, "DTOR:\t0x%08x\n", buf[ATMCI_DTOR / 4]);
+ seq_printf(s, "SDCR:\t0x%08x\n", buf[ATMCI_SDCR / 4]);
+ seq_printf(s, "ARGR:\t0x%08x\n", buf[ATMCI_ARGR / 4]);
+--
+1.8.0.197.g5a90748
+