Received: by 2002:ac0:a582:0:0:0:0:0 with SMTP id m2-v6csp2055157imm; Sat, 13 Oct 2018 09:10:41 -0700 (PDT) X-Google-Smtp-Source: ACcGV61DKja6YAMdD6csgXy1mfKYVqXTwOWZKI/01Pl5zb2q6AXFjL2F+dZfVc42AKoBdzhFS0BO X-Received: by 2002:a17:902:d917:: with SMTP id c23-v6mr10348039plz.206.1539447041730; Sat, 13 Oct 2018 09:10:41 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1539447041; cv=none; d=google.com; s=arc-20160816; b=R0tfGeSO8irAWfjg8E8V6O64p7305mPlt3oS8rN1GfessUPqSUI6tJE2SD0kCv7YaT hfdneqIfMLnhT8nP4RQkXpr3kxmZ6/P8UVM1QRWRdfk9Ll+NNCZyanNKZ9VAhvzzhyHZ RjB8KLpibNfr4GeISPzn4Ll0JkwWPEVmj7aVmwwsjo7eowdNgB7csKev/CW+F9acgd7M t/9SrICsRgjTF53I4dvDSpqg7G+5KZoFQ9F8KGgtfkDk0Lodm6e+nM4+A4YKcAefZ8zF ED9o3UPzzLYROQtEKoj93uQfcOTWtQAkdDvzRCKOgnIW5rVQGPUdMcy0LvFajGQwvIRT NrMA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:date:subject:user-agent:message-id :references:cc:in-reply-to:from:to:content-transfer-encoding :mime-version:dkim-signature; bh=ncsNHE4dHzdM39SyoSpdehaTlOLxwW2ain4AkyDnGIY=; b=czVyWivwx74CvXO5JArHAjBBcE86Nk3t1GcAFZQ20/qE03TQcdmFM/F5+qkkDNcbiB BtlZZloa/TsgxAOeJ5rHDhHgpcUU4BTSOD5gfHmGIH/GHg4CQ0/7Emj1ZvFqfPzUw3Sp vydpmkA56YnMlzSffoY/xI+LACyCBcxrln/Q0rsxZC7kj6RJsTZMOYIGfC8WuPMsddF5 umwwY9JLmSYIE39iN88eQpsRIojXk0L3rkeLyAGmpECMK0h7uOWjpZssPTHsASVXAwNn XQZl1I/vbf7FU2XKHzI/783q3XQDBP6RwjecJ7fRAzzzv9vGC2nGgs8yG/IBv5pppHkq YQdA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@baylibre-com.20150623.gappssmtp.com header.s=20150623 header.b=d6ZShPbD; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id 1-v6si4935666plx.140.2018.10.13.09.10.26; Sat, 13 Oct 2018 09:10:41 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@baylibre-com.20150623.gappssmtp.com header.s=20150623 header.b=d6ZShPbD; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726717AbeJMXqZ (ORCPT + 99 others); Sat, 13 Oct 2018 19:46:25 -0400 Received: from mail-wm1-f68.google.com ([209.85.128.68]:51553 "EHLO mail-wm1-f68.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726356AbeJMXqZ (ORCPT ); Sat, 13 Oct 2018 19:46:25 -0400 Received: by mail-wm1-f68.google.com with SMTP id 143-v6so14859143wmf.1 for ; Sat, 13 Oct 2018 09:08:41 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=baylibre-com.20150623.gappssmtp.com; s=20150623; h=mime-version:content-transfer-encoding:to:from:in-reply-to:cc :references:message-id:user-agent:subject:date; bh=ncsNHE4dHzdM39SyoSpdehaTlOLxwW2ain4AkyDnGIY=; b=d6ZShPbDdmzWYggNcgnHXG07ys/62FzFqpsBpM2qQFcdX+AM4HSd98h4qAWgEHpttI S+oA5DBLOseWSit8RHgpV29bt4gQXPuMuVIsdsvBHcNxSOC8pgbTCaH5ztStVG1D5Ja8 fgbfn5aXH71VVmJ+g5QJ1OgsLQAEqih4jSp7wm4jUAquuH/nWNSFQscffqAFWy12Aj8O kp8CvSL7GDO8FIJamnuxH0sjtsQsaxLmO1GqSsDyyYgNeKORut8tZk2s0KNo+MHD1WLJ +OkYbXoFTrqSFDggLA1BEsHMeXImhZ1FcTN7zhdW02AUhi4c254ADBlMdSCO8iRMRj4c uiRA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:content-transfer-encoding:to:from :in-reply-to:cc:references:message-id:user-agent:subject:date; bh=ncsNHE4dHzdM39SyoSpdehaTlOLxwW2ain4AkyDnGIY=; b=tWCCh2gjUuwcAht3cJxUt46JMfytweNGcHjMtxQOpAlgAnQ8cwNAg4OgavesVxx/J5 DEA/QeD477iIxC4p/vLDq9i1oCfmv9XATqSEYjsNGlDk8brqwohPTephyvv2HzxeNeFO oJ/CM7L4hIDhyA9/OfnnFHTQzyUdYCoqzR6+0nwQscEGwYkJBhPWUGb53w66eHNQ+b+1 PTA9ban0uxtge0Aung8+1Bz5TPGGgX5VsNhf9c7xUZqtdHZpBx/Pqu4s6h/UmGXaN2XE Aug40p447IIwG45iVQIToIpKLUaEVjeCSBK04KazWWw7G/jsTU1hhmnv7qG/rXrCnSof IGoA== X-Gm-Message-State: ABuFfogqDexHdkVFy6R4QM6zMCo6DGJPMTVjGyEQGGhzMZyU9R+w0Gp5 qVQ0KPs96RMJ2F8N7TXbIMTzbg== X-Received: by 2002:a1c:2984:: with SMTP id p126-v6mr8879677wmp.5.1539446920586; Sat, 13 Oct 2018 09:08:40 -0700 (PDT) Received: from localhost (176.143-204-14.abo.bbox.fr. [176.143.204.14]) by smtp.gmail.com with ESMTPSA id e7-v6sm4043916wra.37.2018.10.13.09.08.39 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sat, 13 Oct 2018 09:08:39 -0700 (PDT) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable To: Christian Hewitt From: Michael Turquette In-Reply-To: <1539425086-10997-1-git-send-email-christianshewitt@gmail.com> Cc: christianshewitt@gmail.com, Neil Armstrong , Jerome Brunet , Stephen Boyd , Carlo Caione , Kevin Hilman , linux-amlogic@lists.infradead.org, linux-clk@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org References: <1539425086-10997-1-git-send-email-christianshewitt@gmail.com> Message-ID: <20181013160810.88481.14237@resonance> User-Agent: alot/0.7 Subject: Re: [PATCH] clk: meson-gxbb: set fclk_div3 as CLK_IS_CRITICAL Date: Sat, 13 Oct 2018 18:08:10 +0200 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Quoting Christian Hewitt (2018-10-13 12:04:46) > On the Khadas VIM2 (GXM) and LePotato (GXL) board there are problems > with reboot; e.g. a ~60 second delay between issuing reboot and the > board power cycling (and in some OS configurations reboot will fail > and require manual power cycling). > = > Similar to 'commit c987ac6f1f088663b6dad39281071aeb31d450a8 ("clk: > meson-gxbb: set fclk_div2 as CLK_IS_CRITICAL")' the SCPI Cortex-M4 > Co-Processor seems to depend on FCLK_DIV3 being operational. > = > Bisect gives 'commit 05f814402d6174369b3b29832cbb5eb5ed287059 ("clk: > meson: add fdiv clock gates") between 4.16 and 4.16-rc1 as the first > bad commit. This added support for the missing clock gates before the > fixed PLL fixed dividers (FCLK_DIVx) and the clock framework which > disabled all the unused fixed dividers, thus it disabled a critical > clock path for the SCPI Co-Processor. > = > This change simply sets the FCLK_DIV3 gate as critical to ensure > nothing can disable it. I'm a bit skeptical of this. If FCLK_DIV3 is gated at run-time, there is no side effect other than long and/or failed reboot? Seems like someone should be managing this clock, and simply leaving it on all the time isn't necessarily the right approach. Any chance that you can dig into this behavior to better understand it? It's easy to solve issues by leaving clocks on all the time, but this becomes a problem later on when trying to tune a device for power. Also, if this commit really is the right fix, it should include a comment for FCLK_DIV3 stating why the CLK_IS_CRITICAL flag was set, which may be helpful later on to know if it is safe to remove it. Same is true for FCLK_DIV2 in c987ac6f1f088663b6dad39281071aeb31d450a8. Regards, Mike > = > Signed-off-by: Christian Hewitt > --- > drivers/clk/meson/gxbb.c | 1 + > 1 file changed, 1 insertion(+) > = > diff --git a/drivers/clk/meson/gxbb.c b/drivers/clk/meson/gxbb.c > index 86d3ae5..4c8925d 100644 > --- a/drivers/clk/meson/gxbb.c > +++ b/drivers/clk/meson/gxbb.c > @@ -509,6 +509,7 @@ static struct clk_fixed_factor gxbb_fclk_div3_div =3D= { > .ops =3D &clk_fixed_factor_ops, > .parent_names =3D (const char *[]){ "fixed_pll" }, > .num_parents =3D 1, > + .flags =3D CLK_IS_CRITICAL, > }, > }; > = > -- = > 2.7.4