Received: by 2002:a05:6a10:206:0:0:0:0 with SMTP id 6csp33282pxj; Thu, 20 May 2021 03:58:39 -0700 (PDT) X-Google-Smtp-Source: ABdhPJydvzKtIUAae++zyK0W/H/prFuQE/FGHrSnKzOeLAv3NR/Ph83tFG8BLPmtZFxpU+gM23Y+ X-Received: by 2002:a05:6402:518:: with SMTP id m24mr4308294edv.133.1621508319173; Thu, 20 May 2021 03:58:39 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1621508319; cv=none; d=google.com; s=arc-20160816; b=EC01602fSPBXbZ/KWP/dblGaRKdk4pd6Fdvbhq/zgLfh9/RI9h5uE8NcCl+oxgexWr C5q6YQKxOzHu5J17+1D8EXKDjIwG21nQSqZF+745x5zcIiOzIg1YV+GJdvzpDemEgQTt azXA6FmICMWBRIJ4zXeI2VenH94wguVoKmVW83NMV94omqeQoPV+/QdTg7fHmaPSQQan lwXv51HUguC/oXvqKDDqOzD9yULXa8XZir84CiOHk5EyKaxb5fJ4KfnB/KpQurwT5xEe MdPg7OkNmaYhSYVd1MokrF2sM0mjHCHqjS2GN2upuGogPwgJFnNLufJMmS1LZRwyxHkW C/fg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=XrMzGGEOWmqUcqwtxu6oWGH+FTn5pApjcIrzDXoaG9s=; b=ry+oGfKlBaDAvZobfXQwv9UGDVGd16f/vnrZblKuGWEo7ICvmBFYzQuzm6vApdDn24 QbcxCya3cpWDasmPeMdZTz16n0hiIj55aw5xka2/+DNBBk5YpM3zMfg9Ufw4BdX9QE75 0H56M/gjS1ZKEujRhy0deU0XqfyMRcCv30F9sTdSE2Kr+bE5Gwp03bpGf7GF831bLaL+ uVZEwcA1suAa9x5hAkUMYisXwVqdSLKBmajrJlV1DMYlH1S34+6YJCOLVd31XzChrfij 9RGq/u+VskoCd8uG0m0Hgp8bCEFQudL0fJSptNQxAbTrK8pbO/BG78fwvkpppEvWYKTq /vjQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=uos4A73Y; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id d26si2285499edr.567.2021.05.20.03.58.10; Thu, 20 May 2021 03:58:39 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=uos4A73Y; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S239069AbhETK5O (ORCPT + 99 others); Thu, 20 May 2021 06:57:14 -0400 Received: from mail.kernel.org ([198.145.29.99]:44330 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S237479AbhETKlN (ORCPT ); Thu, 20 May 2021 06:41:13 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id 7971D61406; Thu, 20 May 2021 09:56:00 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1621504560; bh=iXgKiE9R8jdkGoaGr2EyzBtoQ+G1t82TOnZlung0k0A=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=uos4A73YIxCBbRZRFxjM9Ff9d0UZmnUvXxNlNOLxFcmry1U1+P39tM4k9sgILVCRj IF27NBxKREtwc7ENAWTPu+C/pmFBTb633MM//c/tQ6OYKzqoH7SzoRHga1dc5Av7GA PAY1j7ZDPtKZKPkI7STYkNimG30EJO1A6FPOlj0o= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, =?UTF-8?q?Pawe=C5=82=20Chmiel?= , Krzysztof Kozlowski , Sylwester Nawrocki Subject: [PATCH 4.14 301/323] clk: exynos7: Mark aclk_fsys1_200 as critical Date: Thu, 20 May 2021 11:23:13 +0200 Message-Id: <20210520092130.547040763@linuxfoundation.org> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20210520092120.115153432@linuxfoundation.org> References: <20210520092120.115153432@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Paweł Chmiel commit 34138a59b92c1a30649a18ec442d2e61f3bc34dd upstream. 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), mark that clock as critical so it won't be disabled. 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. Fixes: 753195a749a6 ("clk: samsung: exynos7: Correct CMU_FSYS1 clocks names") Signed-off-by: Paweł Chmiel Acked-by: Krzysztof Kozlowski Link: https://lore.kernel.org/linux-clk/20201024154346.9589-1-pawel.mikolaj.chmiel@gmail.com [s.nawrocki: Added comment in the code] Signed-off-by: Sylwester Nawrocki Signed-off-by: Greg Kroah-Hartman --- drivers/clk/samsung/clk-exynos7.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) --- a/drivers/clk/samsung/clk-exynos7.c +++ b/drivers/clk/samsung/clk-exynos7.c @@ -541,8 +541,13 @@ static const struct samsung_gate_clock t GATE(CLK_ACLK_FSYS0_200, "aclk_fsys0_200", "dout_aclk_fsys0_200", ENABLE_ACLK_TOP13, 28, CLK_SET_RATE_PARENT | CLK_IS_CRITICAL, 0), + /* + * This clock is required for the CMU_FSYS1 registers access, keep it + * enabled permanently until proper runtime PM support is added. + */ GATE(CLK_ACLK_FSYS1_200, "aclk_fsys1_200", "dout_aclk_fsys1_200", - ENABLE_ACLK_TOP13, 24, CLK_SET_RATE_PARENT, 0), + ENABLE_ACLK_TOP13, 24, CLK_SET_RATE_PARENT | + CLK_IS_CRITICAL, 0), GATE(CLK_SCLK_PHY_FSYS1_26M, "sclk_phy_fsys1_26m", "dout_sclk_phy_fsys1_26m", ENABLE_SCLK_TOP1_FSYS11,