From patchwork Sat Nov 7 12:14:56 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Pawe=C5=82_Chmiel?= X-Patchwork-Id: 11888889 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-12.5 required=3.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED,DKIM_SIGNED,DKIM_VALID,FREEMAIL_FORGED_FROMDOMAIN, FREEMAIL_FROM,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH,MAILING_LIST_MULTI, SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 07034C388F7 for ; Sat, 7 Nov 2020 12:15:41 +0000 (UTC) Received: from merlin.infradead.org (merlin.infradead.org [205.233.59.134]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 939C5206F4 for ; Sat, 7 Nov 2020 12:15:40 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="VFyQ+wAn"; dkim=fail reason="signature verification failed" (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="F46HQ1XI" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 939C5206F4 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=gmail.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=merlin.20170209; h=Sender:Content-Transfer-Encoding: Content-Type:Cc:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:MIME-Version: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=/LVh2VJya6YYEVEZ7FyDgeU0NUmafgUXdEtKsLokLpA=; b=VFyQ+wAn81jLRAXG2qqjRct+Jz XnK13WsFS45BqkcuyebdoXEhK3PZKOn8k5R6lBA73y2te+2SC7hUSj4XqhdUY6qoghicT8hxeGpIW W2W/A+xliKmdluagXLUUbyZVQ3UEXwXru1eMJHXarfxYHwJ9KQqvau4EwY2KmbduBWdPvT+vSMEKA pyhEX5F8WAZEKq9hr+gsrLqEn5X6wXbptyWS3Wix/PE0nXiUnQ4aRwK7LhR1R1txRuzlvFtsyPsML QUMwkVNe7qsBNDEBsKoqQUl8Mf/ykHMaThiGqEsqmuLEzu8vy1G4c8k0VwhSvmbvpZAJW5LNac5HA xX8pAdvg==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1kbN7c-0006Sm-Jz; Sat, 07 Nov 2020 12:15:08 +0000 Received: from mail-lf1-x144.google.com ([2a00:1450:4864:20::144]) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1kbN7a-0006ST-1O for linux-arm-kernel@lists.infradead.org; Sat, 07 Nov 2020 12:15:06 +0000 Received: by mail-lf1-x144.google.com with SMTP id b1so5640008lfp.11 for ; Sat, 07 Nov 2020 04:15:04 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=8+Mm44weplld/dSNNRNUy7NBfXXfQxTylZi90l7dWis=; b=F46HQ1XI/INYQ7QCgO/1nFtEUip8UcNsw77sK+EOHgPoA37xQiKMI1YEg9yGHvVP1L NXSNEFJLV9uiBbUklfUWAD7/K2vgab61sY/NtQk48GcY9lrVdYqxqvR+TQsin3r2ldpn QuBit5fdNORZoTL9hOoKfQLZ8/UlqWdkQLkE103KiaMSoiK/c231lcvqz5bMjD+Gh2Uu 0X5OUJWK/KgZ/fzXki016xj79F4dxkn8rgFy69DUVIWc6RL033U43v5QSOvolZ4UB49Y DtiJuMHXrMn8FyWPSAz3rD+quEdxxq1ZzAeo8lOQJuvN9m8kB6L+CETuF75WKg4jvJKz 6BGQ== 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:mime-version :content-transfer-encoding; bh=8+Mm44weplld/dSNNRNUy7NBfXXfQxTylZi90l7dWis=; b=keqeyXaDc2qrr0oexIpCkuyKSM7Uu4i0Fy04WhJC2dOvI13DBK2AplS8LlQhbnbazX wQntTL85MDl8vQZLHuhxspYikwbUznRfvASsg3BFh+ktVb7+g2VxyutaE5XdCf0s2BUD BSloMy/9NmpF6HRopLV+a5O0igKZ8d2/7kXuo0HCj6n5UKTF/4C7A/9Sa3Q4uI/oJ1DJ hT/0CpCySZEB4jFo6sL/H66K/K74VXytVZ/zQQ+1+BvsGm0xaFlbiQKnXxVVHZ+EZu+3 cfKxmCwr0+JjvBhfF5hWyEb6Ly4BuXobRDCoFVLax5ytBDP9Bb5Gie4T/+4ytm3KdqcG nDOA== X-Gm-Message-State: AOAM531/Jc/BIP6lYpgpNGwOMv/ZQo2TFHYsAFRI30HVYtkdPS1fOvot jm7mAcG+gFkOZi2/5/Qcjv0= X-Google-Smtp-Source: ABdhPJyXSihKMIVg9TRTUqhHcpHCcsdtTm44JJEMUD1eZcPni5jfyGby+/1mUJWfiSZK+7QD+mGl1g== X-Received: by 2002:ac2:5e91:: with SMTP id b17mr2392285lfq.442.1604751303425; Sat, 07 Nov 2020 04:15:03 -0800 (PST) Received: from localhost.localdomain ([2a02:a315:5445:5300:d646:fcbb:9c5e:1da1]) by smtp.googlemail.com with ESMTPSA id y26sm489828lfe.164.2020.11.07.04.15.01 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 07 Nov 2020 04:15:02 -0800 (PST) From: =?utf-8?q?Pawe=C5=82_Chmiel?= To: kgene@kernel.org, krzk@kernel.org, mturquette@baylibre.com, sboyd@kernel.org Subject: [PATCH v2] clk: exynos7: Keep aclk_fsys1_200 enabled Date: Sat, 7 Nov 2020 13:14:56 +0100 Message-Id: <20201107121456.25562-1-pawel.mikolaj.chmiel@gmail.com> X-Mailer: git-send-email 2.27.0 MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20201107_071506_188388_BCAD660F X-CRM114-Status: GOOD ( 15.64 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: linux-samsung-soc@vger.kernel.org, tomasz.figa@gmail.com, linux-kernel@vger.kernel.org, cw00.choi@samsung.com, s.nawrocki@samsung.com, linux-clk@vger.kernel.org, linux-arm-kernel@lists.infradead.org, =?utf-8?q?Pawe=C5=82_Chmiel?= Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org This clock must be always enabled to allow access to any registers in fsys1 CMU. Until proper solution based on runtime PM is applied (similar to what was done for Exynos5433), fix this by calling clk_prepare_enable() directly from clock provider driver. It was observed on Samsung Galaxy S6 device (based on Exynos7420), where UFS module is probed before pmic used to power that device. In this case defer probe was happening and that clock was disabled by UFS driver, causing whole boot to hang on next CMU access. Signed-off-by: Paweł Chmiel Acked-by: Krzysztof Kozlowski --- Changes from v1: - Instead of marking clock as critical, enable it manually in driver. --- drivers/clk/samsung/clk-exynos7.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/drivers/clk/samsung/clk-exynos7.c b/drivers/clk/samsung/clk-exynos7.c index c1ff715e960c..e05b673e277f 100644 --- a/drivers/clk/samsung/clk-exynos7.c +++ b/drivers/clk/samsung/clk-exynos7.c @@ -6,6 +6,7 @@ #include #include +#include #include "clk.h" #include @@ -571,6 +572,10 @@ static const struct samsung_cmu_info top1_cmu_info __initconst = { static void __init exynos7_clk_top1_init(struct device_node *np) { samsung_cmu_register_one(np, &top1_cmu_info); + /* + * Keep top FSYS1 aclk enabled permanently. It's required for CMU register access. + */ + clk_prepare_enable(__clk_lookup("aclk_fsys1_200")); } CLK_OF_DECLARE(exynos7_clk_top1, "samsung,exynos7-clock-top1",