Skip to contentSkip to conversation

mmc: atmel-mci: modify CLKDIV displaying in debugfs

PATCH New Nicolas Ferre 3 participants 3 messages Jul 6, 2012 – Jul 10, 2012

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 mmc: atmel-mci: modify CLKDIV displaying in debugfs

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.

---
 drivers/mmc/host/atmel-mci.c |   12 +++++++++---
 1 files changed, 9 insertions(+), 3 deletions(-)
drivers/mmc/host/atmel-mci.c +9 -3
index 1fe20cd..9c5daa2 100644
@@ -396,11 +396,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]);
Signature · 1 line
1.7.5.4
#1 lore raw

PATCH 1/1 mmc: atmel-mci: modify CLKDIV displaying in debugfs

Le 07/06/2012 12:11 PM, Nicolas Ferre a ?crit :

Quoted 5 lines

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.

Thanks.

Quoted 30 lines
---
  drivers/mmc/host/atmel-mci.c |   12 +++++++++---
  1 files changed, 9 insertions(+), 3 deletions(-)
drivers/mmc/host/atmel-mci.c +9 -3
index 1fe20cd..9c5daa2 100644
@@ -396,11 +396,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]);
#2 lore raw

PATCH 1/1 mmc: atmel-mci: modify CLKDIV displaying in debugfs

Hi,

Quoted 8 lines · ludovic.desroches

Le 07/06/2012 12:11 PM, Nicolas Ferre a ?crit :

Quoted 5 lines

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.

Thanks, pushed to mmc-next for 3.6.

- Chris.

Signature · 2 lines
Chris Ball   <[email protected]>   <http://printf.net/>
One Laptop Per Child