From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail.bootlin.com ([62.4.15.54]:59051 "EHLO mail.bootlin.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932881AbeGIPmn (ORCPT ); Mon, 9 Jul 2018 11:42:43 -0400 From: Gregory CLEMENT To: Stephen Boyd Cc: Mike Turquette , Stephen Boyd , linux-clk@vger.kernel.org, linux-kernel@vger.kernel.org, Andrew Lunn , Jason Cooper , Hua Jing , Antoine Tenart , stable@vger.kernel.org, Maxime Chevallier , Nadav Haklai , Ken Ma , Victor Gu , Neta Zur Hershkovits , Thomas Petazzoni , =?utf-8?Q?Miqu=C3=A8l?= Raynal , Marcin Wojtas , Wilson Ding , linux-arm-kernel@lists.infradead.org, Sebastian Hesselbarth Subject: Re: [PATCH 1/2] clk: mvebu: armada-37xx-periph: Fix switching CPU rate from 300Mhz to 1.2GHz References: <20180619123446.694-1-gregory.clement@bootlin.com> <20180619123446.694-2-gregory.clement@bootlin.com> <87tvpl4pql.fsf@bootlin.com> <153092068418.143105.5823916627333449732@swboyd.mtv.corp.google.com> Date: Mon, 09 Jul 2018 17:42:31 +0200 In-Reply-To: <153092068418.143105.5823916627333449732@swboyd.mtv.corp.google.com> (Stephen Boyd's message of "Fri, 06 Jul 2018 16:44:44 -0700") Message-ID: <87va9oct5k.fsf@bootlin.com> MIME-Version: 1.0 Content-Type: text/plain Sender: stable-owner@vger.kernel.org List-ID: Hi Stephen, On ven., juil. 06 2018, Stephen Boyd wrote: > Quoting Gregory CLEMENT (2018-06-29 07:44:02) >> Hi, >> >> On mar., juin 19 2018, Gregory CLEMENT wrote: >> >> > Switching the CPU from the L2 or L3 frequencies (300 and 200 Mhz >> > respectively) to L0 frequency (1.2 Ghz) requires a significant amount >> > of time to let VDD stabilize to the appropriate voltage. This amount of >> > time is large enough that it cannot be covered by the hardware >> > countdown register. Due to this, the CPU might start operating at L0 >> > before the voltage is stabilized, leading to CPU stalls. >> > >> > To work around this problem, we prevent switching directly from the >> > L2/L3 frequencies to the L0 frequency, and instead switch to the L1 >> > frequency in-between. The sequence therefore becomes: >> > >> > 1. First switch from L2/L3(200/300MHz) to L1(600MHZ) >> > 2. Sleep 20ms for stabling VDD voltage >> > 3. Then switch from L1(600MHZ) to L0(1200Mhz). >> >> Do you have any comment on this fix? >> > > Looks good. Is it crashing right now? I can throw it into clk-fixes if > it's fixing pain. Yes for the SoC capable to run at 1200Mhz it crashes. At the time the initial support was provided, my SoC version only ran at 1000MHz, so the problem was not noticed. Thanks, Gregory -- Gregory Clement, Bootlin (formerly Free Electrons) Embedded Linux and Kernel engineering http://bootlin.com