From patchwork Wed Jun 13 12:20:21 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Neil Armstrong X-Patchwork-Id: 10462139 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 4F7F260234 for ; Wed, 13 Jun 2018 12:20:56 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 3B726289A6 for ; Wed, 13 Jun 2018 12:20:56 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 3A3462899C; Wed, 13 Jun 2018 12:20:56 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-2.9 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,MAILING_LIST_MULTI autolearn=ham version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 1254F28943 for ; Wed, 13 Jun 2018 12:20:54 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:MIME-Version:Cc:List-Subscribe: List-Help:List-Post:List-Archive:List-Unsubscribe:List-Id:Message-Id:Date: Subject:To:From:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To: References:List-Owner; bh=rn3JfIyzusO7jJ2NyGq6hKOosbdL4PAdxo0/CFxM+wo=; b=iLU wjHVfsvt13cdcOVCqzkVH3yLC+QRn8dIaWd6AG1TsC/Mdg/2EbqqjtkJU5RlqYiQ+D5qmiRZy/nGz 0MRSxoz/GhrQ0i2vjqjCILtEOWk/CnMi/kC/vnkflc92BiWI+HGH7l1u4WmBES6gvg+sXixkl4cmR CBN6N6130vQPpRn/ApLxkEr9u8JFfz6hHwYEhpZ4cZm1AY5dcUNI4MDrRyh8kn/yO/7x/ElN+V7PT qzhXCDv5n8YNYgumuUt3mhvOBxF5DzIfXLCLI0wHo4Z+EnxuT14LmcHbjJaB9dO8iND0E6r0LNTcU sUQ4MGuEp3LBdPGf12MO31cPq8wByZw==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.90_1 #2 (Red Hat Linux)) id 1fT4lX-0004LB-L6; Wed, 13 Jun 2018 12:20:43 +0000 Received: from mail-wr0-x244.google.com ([2a00:1450:400c:c0c::244]) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1fT4lR-0004Ik-KK for linux-arm-kernel@lists.infradead.org; Wed, 13 Jun 2018 12:20:40 +0000 Received: by mail-wr0-x244.google.com with SMTP id l10-v6so2550293wrn.2 for ; Wed, 13 Jun 2018 05:20:26 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=baylibre-com.20150623.gappssmtp.com; s=20150623; h=from:to:cc:subject:date:message-id; bh=VXMObLkaRdtZ5xIrVEFfsDP8NaYCnE9HLQjsV/6p7wE=; b=MLzk5GRdof6PHZDjr5c6b42CTniqL/DAa+w+uVMEzwlS2aGOc39iyLjNAd7/ZR4VgK WDaXWDIRWOjFnmO2xrxjSgLj0a0wmXK1fcY2ufK4cF/pDRDLiUqE7fC5rSN0jFCY5igl mKNvmeBjl6Wp8rkZtWxbjCj+wwrYZy9JQyuHLU869VIQZSu4P09UNvWW0ycM8HaNukrA FjXIf802h879OQTw3v3VwX/U9CbU26/XTMfLS0JqsWwK/MKOLpjf4h5th7cENbeFZ9fu Jw0UuqoNUK+Q6RBkjR+icTntWAxniopQf4ljePEzNd52EjXWaNk+nns95dNysbdE6IYp LbUQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=VXMObLkaRdtZ5xIrVEFfsDP8NaYCnE9HLQjsV/6p7wE=; b=Um1i+2mxMmLWzko9o1ewhItKBxCA9TcdrAi+icg9ssR28OvbnrJCA1p3o9XqLJr+Nc ANqsWRQvLI+5P/0qGMF7RYYxnkscYwzCIElw/IwJiJ/XjqxRPTYon+tFwDDU+T3uSwKC H+O6y+tdy60RDnvfdfsf0YXVMJoW984VgdgkR3YBmrVWn8E0Z6Ac0Twvwdh0jFLznjC0 1dzivR6E3gp7388Sc7C+3EJYPpAfloaSp9RGMQDF/GvNA754uwoUX8At4THrWuZY6R9a rF/jaOrohoFQc7HMKKgxfYEMFgtiytFlOsWy262TWR18cYyOGX7hcFgKYE/W8n4jEpb0 8l6Q== X-Gm-Message-State: APt69E3Zwr8+xl7P9EigzVYVUaSQddBcp7uEGX9aw9TkRp6tuxvM61Nr euoPXezH/xvtU9RewRsUe5lJDg== X-Google-Smtp-Source: ADUXVKLthqDp2dg3qYvaRvzpn43+gfXwpq4S72HAe6Oa9UcmlMS1EHbaF69pHJSz3G5UNC41f41YBA== X-Received: by 2002:adf:a6ca:: with SMTP id t68-v6mr3876410wrc.215.1528892424885; Wed, 13 Jun 2018 05:20:24 -0700 (PDT) Received: from bender.baylibre.local ([90.63.244.31]) by smtp.gmail.com with ESMTPSA id g11-v6sm3202829wrr.46.2018.06.13.05.20.23 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Wed, 13 Jun 2018 05:20:24 -0700 (PDT) From: Neil Armstrong To: jbrunet@baylibre.com, sboyd@kernel.org, mturquette@baylibre.com Subject: [PATCH] clk: meson-gxbb: set fclk_div2 as CLK_IS_CRITICAL Date: Wed, 13 Jun 2018 14:20:21 +0200 Message-Id: <1528892421-12180-1-git-send-email-narmstrong@baylibre.com> X-Mailer: git-send-email 2.7.4 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20180613_052037_696336_F2B72268 X-CRM114-Status: GOOD ( 14.40 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: linux-amlogic@lists.infradead.org, linux-kernel@vger.kernel.org, linux-clk@vger.kernel.org, linux-arm-kernel@lists.infradead.org, Neil Armstrong MIME-Version: 1.0 Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP On Amlogic Meson GXBB & GXL platforms, the SCPI Cortex-M4 Co-Processor seems to be dependent on the FCLK_DIV2 to be operationnal. The issue occured since v4.17-rc1 by freezing the kernel boot when the 'schedutil' cpufreq governor was selected as default : [ 12.071837] scpi_protocol scpi: SCP Protocol 0.0 Firmware 0.0.0 version domain-0 init dvfs: 4 [ 12.087757] hctosys: unable to open rtc device (rtc0) [ 12.087907] cfg80211: Loading compiled-in X.509 certificates for regulatory database [ 12.102241] cfg80211: Loaded X.509 cert 'sforshee: 00b28ddf47aef9cea7' But when disabling the MMC driver, the boot finished but cpufreq failed to change the CPU frequency : [ 12.153045] cpufreq: __target_index: Failed to change cpu frequency: -5 A bisect between v4.16 and v4.16-rc1 gave the 05f814402d61 commit to be the first bad commit. This commit added support for the missing clock gates before the fixed PLL fixed dividers (FCLK_DIVx) and the clock framework basically disabled all the unused fixed dividers, thus disabled a critical clock path for the SCPI Co-Processor. This patch simply sets the FCLK_DIV2 gate as critical to ensure nobody can disable it. Fixes: 05f814402d61 ("clk: meson: add fdiv clock gates") Signed-off-by: Neil Armstrong Tested-by: Kevin Hilman --- 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 b1e4d95..0e053c1 100644 --- a/drivers/clk/meson/gxbb.c +++ b/drivers/clk/meson/gxbb.c @@ -511,6 +511,7 @@ static struct clk_regmap gxbb_fclk_div2 = { .ops = &clk_regmap_gate_ops, .parent_names = (const char *[]){ "fclk_div2_div" }, .num_parents = 1, + .flags = CLK_IS_CRITICAL, }, };