From patchwork Sat Oct 13 10:04:46 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Christian Hewitt X-Patchwork-Id: 10640091 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id B65BC14E2 for ; Sat, 13 Oct 2018 10:05:50 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 930082ACAE for ; Sat, 13 Oct 2018 10:05:50 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 83D582B292; Sat, 13 Oct 2018 10:05:50 +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=-7.7 required=2.0 tests=BAYES_00,DKIM_ADSP_CUSTOM_MED, DKIM_INVALID,DKIM_SIGNED,FREEMAIL_FROM,MAILING_LIST_MULTI,RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 240BA2ACAE for ; Sat, 13 Oct 2018 10:05:50 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726095AbeJMRmU (ORCPT ); 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-Google-Smtp-Source: ACcGV6019r/LjOCdAQOkT+giLTFy3RiVhfpYK3VRhr06rQdliYzX3SiB+6iSMpQqsXujIjPBQvW0qA== 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-clk-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-clk@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP 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, }, };