]> pilppa.com Git - linux-2.6-omap-h63xx.git/commitdiff
ARM: OMAP: Do not try to change rate on omap2 if no speed found
authorTony Lindgren <tony@atomide.com>
Fri, 30 Sep 2005 08:35:23 +0000 (11:35 +0300)
committerTony Lindgren <tony@atomide.com>
Fri, 30 Sep 2005 08:35:23 +0000 (11:35 +0300)
Do not try to change rate on omap2 if no speed found

arch/arm/mach-omap2/clock.c

index 63a16f4d5557751ab986de118cb481510b22c593..26a3ae4fccefdf69c84b09974220d67a0b1831a8 100644 (file)
@@ -24,6 +24,7 @@
 #include <linux/delay.h>
 
 #include <asm/io.h>
+
 #include <asm/hardware/clock.h>
 #include <asm/arch/clock.h>
 #include <asm/arch/sram.h>
@@ -869,6 +870,7 @@ static int omap2_select_table_rate(struct clk * clk, unsigned long rate)
        u32 flags, cur_rate, done_rate, bypass = 0;
        u8 cpu_mask;
        struct prcm_config *prcm;
+       unsigned long found_speed = 0;
 
        if (clk != &virt_prcm_set)
                return -EINVAL;
@@ -886,11 +888,13 @@ static int omap2_select_table_rate(struct clk * clk, unsigned long rate)
                if (prcm->xtal_speed != sys_ck.rate)
                        continue;
 
-               if (prcm->mpu_speed <= rate)
+               if (prcm->mpu_speed <= rate) {
+                       found_speed = prcm->mpu_speed;
                        break;
+               }
        }
 
-       if (!prcm->mpu_speed) {
+       if (!found_speed) {
                printk(KERN_INFO "Could not set MPU rate to %luMHz\n",
                       rate / 1000000); 
                return -EINVAL;