diff options
author | Eric Bénard <eric@eukrea.com> | 2010-06-08 05:02:57 -0400 |
---|---|---|
committer | Sascha Hauer <s.hauer@pengutronix.de> | 2010-07-26 08:18:09 -0400 |
commit | a6e92b49ae5ef48e1791e5df8368af1fe8b3bd9a (patch) | |
tree | b07023d846c725032cc3c1c2aa8e5b5b0c4f0cb9 /arch/arm/mach-mx25 | |
parent | 648beaf5bd7072031bddd84bf7bb482ec459a603 (diff) |
i.MX25: fix get_rate_otg to return the correct value
usb drivers need to get the right value for otg clock so
calculate and return it
Signed-off-by: Eric Bénard <eric@eukrea.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Diffstat (limited to 'arch/arm/mach-mx25')
-rw-r--r-- | arch/arm/mach-mx25/clock.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/arch/arm/mach-mx25/clock.c b/arch/arm/mach-mx25/clock.c index f44d65765b9a..84f0f1efea4b 100644 --- a/arch/arm/mach-mx25/clock.c +++ b/arch/arm/mach-mx25/clock.c | |||
@@ -131,7 +131,10 @@ static unsigned long get_rate_lcdc(struct clk *clk) | |||
131 | 131 | ||
132 | static unsigned long get_rate_otg(struct clk *clk) | 132 | static unsigned long get_rate_otg(struct clk *clk) |
133 | { | 133 | { |
134 | return 48000000; /* FIXME */ | 134 | unsigned long cctl = readl(CRM_BASE + CCM_CCTL); |
135 | unsigned long rate = get_rate_upll(); | ||
136 | |||
137 | return (cctl & (1 << 23)) ? 0 : rate / ((0x3F & (cctl >> 16)) + 1); | ||
135 | } | 138 | } |
136 | 139 | ||
137 | static int clk_cgcr_enable(struct clk *clk) | 140 | static int clk_cgcr_enable(struct clk *clk) |