From: 黄涛 Date: Wed, 26 Mar 2014 04:39:04 +0000 (+0800) Subject: ARM: rockchip: rk3288: disable cpu power down X-Git-Tag: firefly_0821_release~5826 X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=b21384df76cf7dabebb89342179430077cc377a8;p=firefly-linux-kernel-4.4.55.git ARM: rockchip: rk3288: disable cpu power down --- diff --git a/arch/arm/mach-rockchip/rk3288.c b/arch/arm/mach-rockchip/rk3288.c index a3173e0024f7..efe01d74ae45 100644 --- a/arch/arm/mach-rockchip/rk3288.c +++ b/arch/arm/mach-rockchip/rk3288.c @@ -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; }