pcmcia: sa11xx_base: fix reporting of timing information
authorRussell King <rmk+kernel@armlinux.org.uk>
Wed, 31 Aug 2016 07:49:43 +0000 (08:49 +0100)
committerRussell King <rmk+kernel@armlinux.org.uk>
Mon, 12 Sep 2016 09:57:00 +0000 (10:57 +0100)
Fix the reporting of the currently programmed timing information.  These
entries have been showing zero due to the clock rate being a factor of
1000 too big.  With this change, we go from:

I/O      : 165 (0)
attribute: 300 (0)
common   : 300 (0)

to:

I/O      : 165 (172)
attribute: 300 (316)
common   : 300 (316)

Signed-off-by: Russell King <rmk+kernel@armlinux.org.uk>
drivers/pcmcia/sa11xx_base.c

index 9f6ec87..af37b7e 100644 (file)
@@ -144,7 +144,7 @@ static int
 sa1100_pcmcia_show_timing(struct soc_pcmcia_socket *skt, char *buf)
 {
        struct soc_pcmcia_timing timing;
-       unsigned int clock = clk_get_rate(skt->clk);
+       unsigned int clock = clk_get_rate(skt->clk) / 1000;
        unsigned long mecr = MECR;
        char *p = buf;