From mboxrd@z Thu Jan 1 00:00:00 1970 From: Gregory CLEMENT Subject: Re: [PATCH 11/12] cpuidle: mvebu: Add initial cpu idle support for Armada 370/XP SoC Date: Fri, 23 Aug 2013 10:41:53 +0200 Message-ID: <52172051.2030505@free-electrons.com> References: <1377240797-4047-1-git-send-email-gregory.clement@free-electrons.com> <1377240797-4047-12-git-send-email-gregory.clement@free-electrons.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <1377240797-4047-12-git-send-email-gregory.clement@free-electrons.com> List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=m.gmane.org@lists.infradead.org To: Gregory CLEMENT Cc: Lior Amsalem , Andrew Lunn , Ike Pan , Atsushi Yamagata , Nadav Haklai , David Marlin , Yehuda Yitschak , Tawfik Bayouk , Dan Frazier , Daniel Lezcano , Eran Ben-Avi , Ezequiel Garcia , Leif Lindholm , Sebastian Hesselbarth , Tomonori Kimura , Jason Cooper , Nobuhiro Iwamatsu , linux-pm@vger.kernel.org, Jon Masters , "Rafael J. Wysocki" , Hironobu Shibata , linux-arm-kernel@lists.infradead.org, Thomas Petazzoni List-Id: linux-pm@vger.kernel.org On 23/08/2013 08:53, Gregory CLEMENT wrote: > Add wfi/cpu idle/cpu deep idle power states support for Armada XP SoC. > > All the latencies and the power consumption values used at the > "armada_370_xp_idle_driver" structure are preliminary and will be > modified in the future after running some measurements and analysis. > > Based on the work of Nadav Haklai. Atsushi Yamagata reported me an kernel crash when pm_support=off. Indeed I have lost a small chunk of code during my code reshaping. The following code will fix the issue. I will add it in the next version of this series. [...] > + > + if (pm_support == WFI) > + pr_info(" (WFI)\n"); > + else if (pm_support == MV_CPU_IDLE) > + pr_info(" (CPU_IDLE)\n"); > + else if (pm_support == MV_CPU_DEEP_IDLE) > + pr_info(" (CPU_DEEP_IDLE)\n"); > + else > + pr_info(" (DISABLED)\n"); Will be replaced by + else { + pr_info(" (DISABLED)\n"); + return; /* do not register the cpuidle device */ + } > + > + armada_370_xp_idle_driver.state_count = pm_support + 1; > + > + return cpuidle_register(&armada_370_xp_idle_driver, NULL); > +} > + -- Gregory Clement, Free Electrons Kernel, drivers, real-time and embedded Linux development, consulting, training and support. http://free-electrons.com From mboxrd@z Thu Jan 1 00:00:00 1970 From: gregory.clement@free-electrons.com (Gregory CLEMENT) Date: Fri, 23 Aug 2013 10:41:53 +0200 Subject: [PATCH 11/12] cpuidle: mvebu: Add initial cpu idle support for Armada 370/XP SoC In-Reply-To: <1377240797-4047-12-git-send-email-gregory.clement@free-electrons.com> References: <1377240797-4047-1-git-send-email-gregory.clement@free-electrons.com> <1377240797-4047-12-git-send-email-gregory.clement@free-electrons.com> Message-ID: <52172051.2030505@free-electrons.com> To: linux-arm-kernel@lists.infradead.org List-Id: linux-arm-kernel.lists.infradead.org On 23/08/2013 08:53, Gregory CLEMENT wrote: > Add wfi/cpu idle/cpu deep idle power states support for Armada XP SoC. > > All the latencies and the power consumption values used at the > "armada_370_xp_idle_driver" structure are preliminary and will be > modified in the future after running some measurements and analysis. > > Based on the work of Nadav Haklai. Atsushi Yamagata reported me an kernel crash when pm_support=off. Indeed I have lost a small chunk of code during my code reshaping. The following code will fix the issue. I will add it in the next version of this series. [...] > + > + if (pm_support == WFI) > + pr_info(" (WFI)\n"); > + else if (pm_support == MV_CPU_IDLE) > + pr_info(" (CPU_IDLE)\n"); > + else if (pm_support == MV_CPU_DEEP_IDLE) > + pr_info(" (CPU_DEEP_IDLE)\n"); > + else > + pr_info(" (DISABLED)\n"); Will be replaced by + else { + pr_info(" (DISABLED)\n"); + return; /* do not register the cpuidle device */ + } > + > + armada_370_xp_idle_driver.state_count = pm_support + 1; > + > + return cpuidle_register(&armada_370_xp_idle_driver, NULL); > +} > + -- Gregory Clement, Free Electrons Kernel, drivers, real-time and embedded Linux development, consulting, training and support. http://free-electrons.com