* [PATCH] mmc: atmel-mci: modify CLKDIV displaying in debugfs
@ 2012-07-06 10:11 Nicolas Ferre
2012-07-09 7:05 ` ludovic.desroches
0 siblings, 1 reply; 3+ messages in thread
From: Nicolas Ferre @ 2012-07-06 10:11 UTC (permalink / raw)
To: linux-arm-kernel
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 files changed, 9 insertions(+), 3 deletions(-)
diff --git a/drivers/mmc/host/atmel-mci.c b/drivers/mmc/host/atmel-mci.c
index 1fe20cd..9c5daa2 100644
--- a/drivers/mmc/host/atmel-mci.c
+++ b/drivers/mmc/host/atmel-mci.c
@@ -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]);
--
1.7.5.4
^ permalink raw reply related [flat|nested] 3+ messages in thread
* [PATCH] mmc: atmel-mci: modify CLKDIV displaying in debugfs
2012-07-06 10:11 [PATCH] mmc: atmel-mci: modify CLKDIV displaying in debugfs Nicolas Ferre
@ 2012-07-09 7:05 ` ludovic.desroches
2012-07-10 3:22 ` Chris Ball
0 siblings, 1 reply; 3+ messages in thread
From: ludovic.desroches @ 2012-07-09 7:05 UTC (permalink / raw)
To: linux-arm-kernel
Le 07/06/2012 12:11 PM, Nicolas Ferre a ?crit :
> 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>
Acked-by: Ludovic Desroches <ludovic.desroches@atmel.com>
Thanks.
> ---
> drivers/mmc/host/atmel-mci.c | 12 +++++++++---
> 1 files changed, 9 insertions(+), 3 deletions(-)
>
> diff --git a/drivers/mmc/host/atmel-mci.c b/drivers/mmc/host/atmel-mci.c
> index 1fe20cd..9c5daa2 100644
> --- a/drivers/mmc/host/atmel-mci.c
> +++ b/drivers/mmc/host/atmel-mci.c
> @@ -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]);
>
^ permalink raw reply [flat|nested] 3+ messages in thread
* [PATCH] mmc: atmel-mci: modify CLKDIV displaying in debugfs
2012-07-09 7:05 ` ludovic.desroches
@ 2012-07-10 3:22 ` Chris Ball
0 siblings, 0 replies; 3+ messages in thread
From: Chris Ball @ 2012-07-10 3:22 UTC (permalink / raw)
To: linux-arm-kernel
Hi,
On Mon, Jul 09 2012, ludovic.desroches wrote:
> Le 07/06/2012 12:11 PM, Nicolas Ferre a ?crit :
>> 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>
>
> Acked-by: Ludovic Desroches <ludovic.desroches@atmel.com>
Thanks, pushed to mmc-next for 3.6.
- Chris.
--
Chris Ball <cjb@laptop.org> <http://printf.net/>
One Laptop Per Child
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2012-07-10 3:22 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-07-06 10:11 [PATCH] mmc: atmel-mci: modify CLKDIV displaying in debugfs Nicolas Ferre
2012-07-09 7:05 ` ludovic.desroches
2012-07-10 3:22 ` Chris Ball
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).