Received: by 2002:a05:6a10:8c0a:0:0:0:0 with SMTP id go10csp3551357pxb; Sun, 31 Jan 2021 20:43:31 -0800 (PST) X-Google-Smtp-Source: ABdhPJxmMiAVxRsoAbXwJ/OpRj90eObdiY+W5vT6iLN7sciOFEDqJMlz4iB8N5b/0aNWuWX990V8 X-Received: by 2002:a17:906:1fda:: with SMTP id e26mr7784284ejt.195.1612154611037; Sun, 31 Jan 2021 20:43:31 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1612154611; cv=none; d=google.com; s=arc-20160816; b=SnApKQkuD/AG0JR4vHBc+bcFwnd6/JzETvmB8bCE8sOO9NxoxD13YiiKOIUkXUbt1w hKlKkfatuKqOwgXuySsHNhnmnM9F7XYufQw9FJyP/1xm3TYu9HwtEyY9NnCbGDrUnb8h y097rOW/dCBrgY02tVWXZ+IVKvX8GQtwFmX0VpT5V6+bD1NeKPhQOTdKPJYgK8YGWCDH fFzD1O8QtRIlBADfiLIKLdIbJ5UAkyxVNtSumtraPZRm96H3ECnoAFK5Pi8Y0k6VGmty /IMlnkr3V3N3xrj0W1qcOwFfIutazMgtBOHpzGlI9i56loksx0NLRI0ulk/drnHo4eic LLKw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:references:dlp-filter:cms-type :content-transfer-encoding:content-language:in-reply-to:mime-version :user-agent:date:message-id:organization:from:cc:to:subject :dkim-signature:dkim-filter; bh=SU5P9sjoxFiX/I0nd/FfMGD5s5MSDPlaCsf2GzDbrBI=; b=bHS7T/jG0JdsvXm72inIX9i9tHxuapqRBPQu/TSQMMxAIb6Bda/lebUL6tFGMqHa9L h1GdDqF0OAa9HAYbKt3PuplTO59rCv8Bv+ufVdMjrslJrHNFW2h0EDkxKvrZLoydnyPa OHizioLtddJQkU2rEj4Safiw124ySHKiberZQWi3brNbl8TBrjq0L/geleoI6K04O7iU FPig6ZaF86in7tcERhC8EoyU4S8LYhncEWb3HxNV7BOPbDLwuHKIxvb8as81p7sn6xzo WzWeesBQbUZc84Iuo+kjBUaYKnzr6SYi3ugq93aseqnSHuu4tJTpHockrX9rW3zDmYAN 4r+A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@samsung.com header.s=mail20170921 header.b=p4ZPk6Yi; 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=samsung.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id h4si9684792edd.105.2021.01.31.20.43.06; Sun, 31 Jan 2021 20:43:31 -0800 (PST) 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=@samsung.com header.s=mail20170921 header.b=p4ZPk6Yi; 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=samsung.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231475AbhBAEjW (ORCPT + 99 others); Sun, 31 Jan 2021 23:39:22 -0500 Received: from mailout3.samsung.com ([203.254.224.33]:27003 "EHLO mailout3.samsung.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231393AbhBAEfn (ORCPT ); Sun, 31 Jan 2021 23:35:43 -0500 Received: from epcas1p2.samsung.com (unknown [182.195.41.46]) by mailout3.samsung.com (KnoxPortal) with ESMTP id 20210201043500epoutp0375503c636ba59e4be32c0b430d8699b3~fhZzmjq3B2759027590epoutp03h for ; Mon, 1 Feb 2021 04:35:00 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 mailout3.samsung.com 20210201043500epoutp0375503c636ba59e4be32c0b430d8699b3~fhZzmjq3B2759027590epoutp03h DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=samsung.com; s=mail20170921; t=1612154100; bh=SU5P9sjoxFiX/I0nd/FfMGD5s5MSDPlaCsf2GzDbrBI=; h=Subject:To:Cc:From:Date:In-Reply-To:References:From; b=p4ZPk6YiR/aeOYCoNGmp0A/tw7oDpi6bFQDUVSvzqVXterAlJswwLrAazSsyy5xCm a7QBX4SbAK5xuXAEl14pYzZsRsXLlaE88o3cTJmXRmxLf39+YDKk/fg47lw0wcpsF5 GtlxUU7nyrbl7mVSzaFSCX3nvnMC3DfQ+5WeBFpA= Received: from epsnrtp2.localdomain (unknown [182.195.42.163]) by epcas1p2.samsung.com (KnoxPortal) with ESMTP id 20210201043459epcas1p2b9f9254198460b16a425887bb37ddeaa~fhZzD3QKK1020110201epcas1p2P; Mon, 1 Feb 2021 04:34:59 +0000 (GMT) Received: from epsmges1p5.samsung.com (unknown [182.195.40.153]) by epsnrtp2.localdomain (Postfix) with ESMTP id 4DTZqP0Z62z4x9Px; Mon, 1 Feb 2021 04:34:57 +0000 (GMT) Received: from epcas1p3.samsung.com ( [182.195.41.47]) by epsmges1p5.samsung.com (Symantec Messaging Gateway) with SMTP id E8.B9.09577.0F487106; Mon, 1 Feb 2021 13:34:57 +0900 (KST) Received: from epsmtrp1.samsung.com (unknown [182.195.40.13]) by epcas1p4.samsung.com (KnoxPortal) with ESMTPA id 20210201043455epcas1p4be656aaf6e12a99b1cad55f94f470e55~fhZvHgBxO2277022770epcas1p4I; Mon, 1 Feb 2021 04:34:55 +0000 (GMT) Received: from epsmgms1p1new.samsung.com (unknown [182.195.42.41]) by epsmtrp1.samsung.com (KnoxPortal) with ESMTP id 20210201043455epsmtrp100dd4504f15c8f7aa7a1fb87b6a37039~fhZvFZjF71405014050epsmtrp1-; Mon, 1 Feb 2021 04:34:55 +0000 (GMT) X-AuditID: b6c32a39-bfdff70000002569-96-601784f09fb8 Received: from epsmtip1.samsung.com ( [182.195.34.30]) by epsmgms1p1new.samsung.com (Symantec Messaging Gateway) with SMTP id BF.D1.13470.FE487106; Mon, 1 Feb 2021 13:34:55 +0900 (KST) Received: from [10.113.221.102] (unknown [10.113.221.102]) by epsmtip1.samsung.com (KnoxPortal) with ESMTPA id 20210201043455epsmtip1165d10fb80c36aecd3fcef3a6d13c9fe~fhZupg8MH1236412364epsmtip1l; Mon, 1 Feb 2021 04:34:55 +0000 (GMT) Subject: Re: [PATCH v3] clk: exynos7: Keep aclk_fsys1_200 enabled To: =?UTF-8?Q?Pawe=c5=82_Chmiel?= , kgene@kernel.org, krzk@kernel.org, mturquette@baylibre.com, sboyd@kernel.org Cc: s.nawrocki@samsung.com, tomasz.figa@gmail.com, linux-samsung-soc@vger.kernel.org, linux-clk@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org From: Chanwoo Choi Organization: Samsung Electronics Message-ID: <2562d6ab-f7ec-8445-7207-a83318dd6402@samsung.com> Date: Mon, 1 Feb 2021 13:50:50 +0900 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:59.0) Gecko/20100101 Thunderbird/59.0 MIME-Version: 1.0 In-Reply-To: <20210131170428.3290-1-pawel.mikolaj.chmiel@gmail.com> Content-Language: en-US Content-Transfer-Encoding: 8bit X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFlrPJsWRmVeSWpSXmKPExsWy7bCmvu7HFvEEg/NJFv2PXzNbnD+/gd1i 0+NrrBYfe+6xWlzeNYfNYsb5fUwWF0+5Wvw43sdscfhNO6vFv2sbWSxW7frD6MDt8f5GK7vH zll32T02repk89i8pN6jb8sqRo/Pm+QC2KKybTJSE1NSixRS85LzUzLz0m2VvIPjneNNzQwM dQ0tLcyVFPISc1NtlVx8AnTdMnOAjlNSKEvMKQUKBSQWFyvp29kU5ZeWpCpk5BeX2CqlFqTk FFgW6BUn5haX5qXrJefnWhkaGBiZAhUmZGd8XN/FXnBIoGJS/2XWBsZ9vF2MHBwSAiYSF49q dDFycQgJ7GC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FhdPuVr8ON7HbHH4TTurxb9rG1ksVu36w+jA7fH+Riu7 x85Zd9k9Nq3qZPPYvKTeo2/LKkaPz5vkAtiiuGxSUnMyy1KL9O0SuDI+ru9iLzgkUDGp/zJr A+M+3i5GTg4JAROJhavPs3QxcnEICexmlDgz6SobREJSYtrFo8xdjBxAtrDE4cPFEDVvGSWm ndzNCFIjLOAoMWV9BxtIQkRgEqPEp4+d7CAOs8B2RomvBw8wQbRMY5TY8H0WC0gLm4CWxP4X N8BW8AsoSlz98RhsFK+AnUTz9O0sIOtYBFQkJq8RAgmLCoRJ7FzymAmiRFDi5MwnYGM4BZwl js3fB2YzC6hL/Jl3iRnCFpe49WQ+E4QtL9G8dTbzBEbhWUjaZyFpmYWkZRaSlgWMLKsYJVML inPTc4sNCwzzUsv1ihNzi0vz0vWS83M3MYLjT0tzB+P2VR/0DjEycTAeYpTgYFYS4T01SSxB iDclsbIqtSg/vqg0J7X4EKM0B4uSOO+FrpPxQgLpiSWp2ampBalFMFkmDk6pBqbGJS+Pblo/ /3fg1bhl2+re3oh4z27xb20I+75jjpE7eIzdAxU8SkX4z3x4tvLQnB6O1GvLQ81+R0UYTrD7 Wf3yZ96jHvNGL50VpxwTzjFm/ll998Ga5Sc4pR/95jq4tFhxr/Wy6E3BFvfeFpvJaB6+rfmt wbjFi//Dov/lv75MS23YqCcrNnHrOYe3ST7RG0rdAlo3LonrXn/xVpX/jYpo7jLDx3tPKnjm PFMPDWL0Set6K9SYYs1ox37kwzYJv26D/q1PX8infp6/vWmv0JYa6ZCE7Mq17NIJ+nkZ3bqX N6oLM7+7q/nTx9i65hnPEVWD3EDBGWW/n3Qp/Pbj1/k5iaNAp0jfvz/d5nb7PiWW4oxEQy3m ouJEAMOkawcuAwAA X-CMS-MailID: 20210201043455epcas1p4be656aaf6e12a99b1cad55f94f470e55 X-Msg-Generator: CA Content-Type: text/plain; charset="utf-8" X-Sendblock-Type: SVC_REQ_APPROVE CMS-TYPE: 101P DLP-Filter: Pass X-CFilter-Loop: Reflected X-CMS-RootMailID: 20210131170444epcas1p1244bfbf4e3bf121360e973b719a699c0 References: <20210131170428.3290-1-pawel.mikolaj.chmiel@gmail.com> Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 2/1/21 2:04 AM, Paweł Chmiel wrote: > 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 > --- > Changes from v2: > - Avoid __clk_lookup() call when enabling clock > Changes from v1: > - Instead of marking clock as critical, enable it manually in driver. > --- > drivers/clk/samsung/clk-exynos7.c | 14 +++++++++++++- > 1 file changed, 13 insertions(+), 1 deletion(-) > > diff --git a/drivers/clk/samsung/clk-exynos7.c b/drivers/clk/samsung/clk-exynos7.c > index c1ff715e960c..24d3fc5c5d0f 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 > @@ -570,7 +571,18 @@ 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); > + struct samsung_clk_provider *ctx; > + struct clk_hw **hws; > + > + ctx = samsung_cmu_register_one(np, &top1_cmu_info); > + if (!ctx) > + return; > + hws = ctx->clk_data.hws; > + > + /* > + * Keep top FSYS1 aclk enabled permanently. It's required for CMU register access. > + */ > + clk_prepare_enable(hws[CLK_ACLK_FSYS1_200]->clk); > } > > CLK_OF_DECLARE(exynos7_clk_top1, "samsung,exynos7-clock-top1", > Acked-by: Chanwoo Choi -- Best Regards, Chanwoo Choi Samsung Electronics