diff options
-rw-r--r-- | arch/arm/plat-s3c24xx/s3c2443-clock.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/arch/arm/plat-s3c24xx/s3c2443-clock.c b/arch/arm/plat-s3c24xx/s3c2443-clock.c index 31f97f1bb363..40a87206400f 100644 --- a/arch/arm/plat-s3c24xx/s3c2443-clock.c +++ b/arch/arm/plat-s3c24xx/s3c2443-clock.c | |||
@@ -185,7 +185,8 @@ static unsigned long s3c2443_armclk_roundrate(struct clk *clk, | |||
185 | for (ptr = 0; ptr < nr_armdiv; ptr++) { | 185 | for (ptr = 0; ptr < nr_armdiv; ptr++) { |
186 | div = armdiv[ptr]; | 186 | div = armdiv[ptr]; |
187 | if (div) { | 187 | if (div) { |
188 | calc = parent / div; | 188 | /* cpufreq provides 266mhz as 266666000 not 266666666 */ |
189 | calc = (parent / div / 1000) * 1000; | ||
189 | if (calc <= rate && div < best) | 190 | if (calc <= rate && div < best) |
190 | best = div; | 191 | best = div; |
191 | } | 192 | } |
@@ -225,7 +226,8 @@ static int s3c2443_armclk_setrate(struct clk *clk, unsigned long rate) | |||
225 | for (ptr = 0; ptr < nr_armdiv; ptr++) { | 226 | for (ptr = 0; ptr < nr_armdiv; ptr++) { |
226 | div = armdiv[ptr]; | 227 | div = armdiv[ptr]; |
227 | if (div) { | 228 | if (div) { |
228 | calc = parent / div; | 229 | /* cpufreq provides 266mhz as 266666000 not 266666666 */ |
230 | calc = (parent / div / 1000) * 1000; | ||
229 | if (calc <= rate && div < best) { | 231 | if (calc <= rate && div < best) { |
230 | best = div; | 232 | best = div; |
231 | val = ptr; | 233 | val = ptr; |