ARM: rockchip: rk3288: disable cpu power down
author黄涛 <huangtao@rock-chips.com>
Wed, 26 Mar 2014 04:39:04 +0000 (12:39 +0800)
committer黄涛 <huangtao@rock-chips.com>
Wed, 26 Mar 2014 04:39:16 +0000 (12:39 +0800)
arch/arm/mach-rockchip/rk3288.c

index a3173e0024f76ad32048604d4509703677c951ab..efe01d74ae45b26dc6cca8254c62845a96daccb6 100644 (file)
@@ -244,10 +244,8 @@ static int rk3288_pmu_set_power_domain(enum pmu_power_domain pd, bool on)
        unsigned long flags;
 
        spin_lock_irqsave(&pmu_pd_lock, flags);
-       if (rk3288_pmu_power_domain_is_on(pd) == on) {
-               spin_unlock_irqrestore(&pmu_pd_lock, flags);
-               return 0;
-       }
+       if (rk3288_pmu_power_domain_is_on(pd) == on)
+               goto out;
 
        if (!on) {
                /* if power down, idle request to NIU first */
@@ -273,6 +271,8 @@ static int rk3288_pmu_set_power_domain(enum pmu_power_domain pd, bool on)
                        SAVE_QOS(hevc_r_qos, HEVC_R);
                        SAVE_QOS(hevc_w_qos, HEVC_W);
                        rk3288_pmu_set_idle_request(IDLE_REQ_HEVC, true);
+               } else if (pd >= PD_CPU_1 && pd <= PD_CPU_3) {
+                       goto out;
                }
        }
 
@@ -310,6 +310,7 @@ static int rk3288_pmu_set_power_domain(enum pmu_power_domain pd, bool on)
                }
        }
 
+out:
        spin_unlock_irqrestore(&pmu_pd_lock, flags);
        return 0;
 }