Received: by 2002:ac0:a582:0:0:0:0:0 with SMTP id m2-v6csp1748326imm; Sat, 13 Oct 2018 03:06:26 -0700 (PDT) X-Google-Smtp-Source: ACcGV63A7K9wifkaSmAlQaGEybYYLLz40sqi9lmQt+iE9NGd86Y9Zfsy5Zki5JSfB3x0PZtrYBKV X-Received: by 2002:a65:6204:: with SMTP id d4-v6mr8690283pgv.121.1539425186161; Sat, 13 Oct 2018 03:06:26 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1539425186; cv=none; d=google.com; s=arc-20160816; b=cKpVl0//5bjaNYIiEB/Y9MNYHLJet2VksOJyc7cyQqHPZty8lNZJsI4BeHrFJgRueq YO2AytOHGY40YzypnP0kCs5RInB6rGHvKRBz0Iu1GoP7Llz0lZYWjMDWVI2QDzeeekWX VPbe6NmcOt4wZCJos9fcWhkKgVdX6qyyU3KkDS9ZDsnnbFxB3w1UPrk3CL8Fty7J+v1C WHw+vK6wUiLS6uGJah2jHrvNX066dApzwujYI8p85AzAlENoRzZvVu70Q8Y7D3qpTc2Q Acv4yiRuv6cP/b/+TZDYGrlw3wDb8cHqyj/A0Cq/LyflRPfWg8M54qGIXGVx49mzRrMo 4rJw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:to:message-id:date:subject:cc:from :dkim-signature; bh=dtmS436VhqJGsEKf0bweThZjTYZPJrcmRb9GRkbDIs8=; b=BJCzxU9qZtTyIIydXxHvDXGEoo8As0F7BlJlv6Az2NezTeQsEvD67iF1ahOCjZK58k 8DlaY3bydp64ARFRLFbyaE2wCQLHoPq3VgqfJaL+Pnm9smEoSUtmu2l97hhB0Ho0IRuf 88QljFUfkL+Zue6daIgEIW2/VUwBX765GSlCtqpXcPnPM1/PDEjuaDORNVJRu0nyaAjg oictX6NmNtodqRgWGPhMa6XoCGaYk7Z4N1lvW7M5ZLYQgp0l14r7xZKbDXlXF+UjtO6E K+9ZPN4wPhSCyVrSkH++/giPdRQNCcz2Ab5Fg70waad5DAp5x/eJNbBHlql/TV5YKWbN h3qA== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@gmail.com header.s=20161025 header.b=pGd5DExC; 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; dmarc=fail (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id x85-v6si4286763pfk.54.2018.10.13.03.06.10; Sat, 13 Oct 2018 03:06:26 -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=fail header.i=@gmail.com header.s=20161025 header.b=pGd5DExC; 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; dmarc=fail (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726255AbeJMRmU (ORCPT + 99 others); Sat, 13 Oct 2018 13:42:20 -0400 Received: from mail-wr1-f68.google.com ([209.85.221.68]:45174 "EHLO mail-wr1-f68.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726072AbeJMRmU (ORCPT ); Sat, 13 Oct 2018 13:42:20 -0400 Received: by mail-wr1-f68.google.com with SMTP id q5-v6so15916221wrw.12; Sat, 13 Oct 2018 03:05:48 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id; bh=dtmS436VhqJGsEKf0bweThZjTYZPJrcmRb9GRkbDIs8=; b=pGd5DExC+s2CZKTT4OfjPORqBkcVH8Itj5y9QYQH+CnXednsuKPwebqYRp6364TYdn YKydrsRGHkhH+qi8efjdizNoZAzV8FKHlrej4MNb+6slX3hRBPwmnEFexqdUWBNkA3eC O29vprxx5r3Ccau4if4bZLzTJ8DO5ydfFCi4ZQ90TeXRlhPRE/1FpOapciD+nH7KXR55 xA7UeZZaQIZwkt0zwa43B0JbM6VPDoSWLI4w444eF6CSvzYP382GljkzRH5N5WZgYMrq g1XGb1AYWKHkLutNN/BQwuAJ9iCe/C45liWLWsfn0icyCf4WU4z42lJ6KqIl8YlgcOxk oXjQ== 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=dtmS436VhqJGsEKf0bweThZjTYZPJrcmRb9GRkbDIs8=; b=LlZ8mAsihz7gvv7fgHkfHWv//m5APzHxNvidLarbmOMW1I5GDhmPUNWSRFMylIRZm1 PFJbMhWKp2+BgNZY6CY7nai3ieYhwK3YeD3+9HDSsEHJYgsuBglKjIp15dOR/BcjNhHN mQlSytKc44bQ7wVpVVBloTsHyjSYtwyli30OpH6qaMMwpUowsAgf3YhxnwEe/FZEgA01 EpK2es3dzjGSHWRYyPGdsRfNiohrFczQ6j0f62Hnsq44+1v2k9bS72cv3r8GxJeE4iJJ TMHHFHm3DifcU7wYs+tQN+ujEotbRB9czLqIBJsTX21WfZ60xhBlHeyWe6E6cyGduak+ gbjQ== X-Gm-Message-State: ABuFfog7SsD51IiIGIcsxGSYGalk68KF6q93cvZ0rLsQy6ZLb0KBUNMd lsxLvVXyrfmqg7y+KtN4sMk= X-Received: by 2002:a5d:450d:: with SMTP id s13-v6mr7895648wrq.82.1539425147717; Sat, 13 Oct 2018 03:05:47 -0700 (PDT) Received: from localhost.localdomain ([94.204.252.234]) by smtp.gmail.com with ESMTPSA id 63-v6sm4984308wmj.39.2018.10.13.03.05.44 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Sat, 13 Oct 2018 03:05:46 -0700 (PDT) From: Christian Hewitt Cc: christianshewitt@gmail.com, Neil Armstrong , Jerome Brunet , Michael Turquette , 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 Subject: [PATCH] clk: meson-gxbb: set fclk_div3 as CLK_IS_CRITICAL Date: Sat, 13 Oct 2018 14:04:46 +0400 Message-Id: <1539425086-10997-1-git-send-email-christianshewitt@gmail.com> X-Mailer: git-send-email 2.7.4 To: unlisted-recipients:; (no To-header on input) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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. 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 = { .ops = &clk_fixed_factor_ops, .parent_names = (const char *[]){ "fixed_pll" }, .num_parents = 1, + .flags = CLK_IS_CRITICAL, }, }; -- 2.7.4