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: 10640093 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 F34171869 for ; Sat, 13 Oct 2018 10:06:04 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id D65322ACAE for ; Sat, 13 Oct 2018 10:06:04 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id CA6352B292; Sat, 13 Oct 2018 10:06:04 +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_ADSP_CUSTOM_MED, DKIM_SIGNED,DKIM_VALID,FREEMAIL_FROM,MAILING_LIST_MULTI,RCVD_IN_DNSWL_NONE 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 732192ACAE for ; Sat, 13 Oct 2018 10:06:04 +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=36TdeTquH0h8FY+fmnbbjPfnHQRkt5De9Eu4wNsqVyw=; b=XoE wFsqB91zOWSYvtksML/HegN3pp7DxNLLpo512N/V2WX6jffeeV2ugksAAPdLxh1FrqpLiEYxNpCWY IS6f0I0FobyJhrhSzdnl7BmDBaJN4dXdGPzRDPK3VFHIFyd1v4RX0W5V2M1wxOB46/KbDBun22CEI ZF4DYEfYukMH1qpeIpM0stCKAlhKW+qtuS28gCaXJ0rO2eEHU98Hlnd4LYJD32Q5bJoewRbsqf9JV uO6Ugh51pBJACNmXNcAcGoRc6k8mptTsLI9i5mzOdqxW8Iih7lN5ZIEmfhiVPOnf2AbKctXHjiF58 DAO/0q4lKYNhR44qA6gVTxRBAnOK0fA==; 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 1gBGo6-0000tR-SB; Sat, 13 Oct 2018 10:06:02 +0000 Received: from mail-wr1-x443.google.com ([2a00:1450:4864:20::443]) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1gBGo4-0000rr-8r; Sat, 13 Oct 2018 10:06:01 +0000 Received: by mail-wr1-x443.google.com with SMTP id 61-v6so15918768wrb.6; Sat, 13 Oct 2018 03:05:49 -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=VYeX31yUFmYr6V+wqs1nrRj85eWy9/ReF2+mhRLrIIPsar7NdHA28zQZ4g95swNLef f11Ery4gr51IpGUgyICMafvqZ6cBaRnJV/I3pQpe5o4DiwtvKGHGJe9ZL3lgKdelbaPZ V/BRiFIuG3YbjWeMnrwsqAVRn3bc6Cod722JA9TauNI6+df/sBX8zIzKv/AeKQwf8e5Z e1SV/2dlYVaeLO69FYEYuJTZxOMK1WFlSnPl0GHtFVII7RU6Sg+zvmeyg3djX4Sr38TG UuhE1TnePOd5cgny1C/6ppKSDtTS20kXCB71/EN9tOqwAehRsB7h4iNrfCIc+aWQM+bY Ps5w== X-Gm-Message-State: ABuFfojM0m5Ok4d4vt9ukhUlyk3MRYWTHb5R2unWvumjoXjh3Q/ZM6LJ 1EQqzCbaTHZP6tPY7BjKvfw= 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 To: 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 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20181013_030600_315320_A8586693 X-CRM114-Status: GOOD ( 11.25 ) X-BeenThere: linux-amlogic@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Neil Armstrong , Stephen Boyd , Kevin Hilman , Michael Turquette , christianshewitt@gmail.com, linux-kernel@vger.kernel.org, Carlo Caione , linux-amlogic@lists.infradead.org, linux-clk@vger.kernel.org, linux-arm-kernel@lists.infradead.org, Jerome Brunet MIME-Version: 1.0 Sender: "linux-amlogic" Errors-To: linux-amlogic-bounces+patchwork-linux-amlogic=patchwork.kernel.org@lists.infradead.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, }, };