Received: by 2002:ad5:4acb:0:0:0:0:0 with SMTP id n11csp4198341imw; Tue, 12 Jul 2022 03:53:17 -0700 (PDT) X-Google-Smtp-Source: AGRyM1vQPM7PSVJglh0O8tEI02Px6FzkNBKUiuGqVX605Izl6HZuZ0LsS0M2nbTW+dv13fEGtJ4B X-Received: by 2002:a17:902:b694:b0:16c:29d9:7308 with SMTP id c20-20020a170902b69400b0016c29d97308mr12284420pls.110.1657623197547; Tue, 12 Jul 2022 03:53:17 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1657623197; cv=none; d=google.com; s=arc-20160816; b=eJHw+2KDrLsAonOxnguC97b6UNmZOl2dlQ6Oz4QU68Drmdpk/HeKyhg1fwV0rue4bc srpR0w3jdL+tT/iBWMPCYX5oYTv6XM8YLF6LRJtqfsAsMoIh/KRB52KFkOWXbR9hvLIX ThYVbP2K1YNG5xh/35P0FLNHruULf8LuDu1eoX/VUrF4k0pDzVJSv9D3h7/tlg435gCw 748uGFH7VoJRSDdCwYk551ZxrjhcwUj/yX0EoRJnITPlqe4YauHVBRn/1IBhp3UEhMnN BUxsarqMTbXwpW5+xBRCVngAo2rbqtoSEVRwsvhrEphQCbA9RtNUhe+wZhaiV6pZnr3u Mopw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:in-reply-to:from :references:cc:to:content-language:subject:user-agent:mime-version :date:message-id:dkim-signature; bh=cYGi9iYw5xqenfsy1Wa7WBvwgsNozUXDBdKmrRILrm8=; b=J17/ZnjI80K+hGXoqnerXe8+VBSxzEIqokcNm2c38S7Jz/UKfX8CWaIL8HHMehq/wg /cOidLCBZsJ9GKrsqhXJYAREaCHw7o86ccqa346FSQG7OD5EEEKRmEAska/by4NPLl2D r2eVzbamyiR98YItMI0pNNBDJvzudtBnTH0D91Ekjb4sP74ModTi26DON0h7vENw6oYg MzItM9kosOdgsj+tDLj7y5EfnQYdXAoS+F7h54bn53WjBz2+3hq7uWRjV7EMv5pVJGpp 9zUY/SbFb6jxcDVM9ZQVmFAYDysB8VXZFpA6MAwAzre1Nkl582q6taife3BrW9FNxo00 FbnQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@collabora.com header.s=mail header.b=Twxvmviw; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=collabora.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id j3-20020a170903028300b0016c4ff6aaa3si6545913plr.40.2022.07.12.03.53.03; Tue, 12 Jul 2022 03:53:17 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@collabora.com header.s=mail header.b=Twxvmviw; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=collabora.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231991AbiGLKld (ORCPT + 99 others); Tue, 12 Jul 2022 06:41:33 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:58956 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229889AbiGLKlb (ORCPT ); Tue, 12 Jul 2022 06:41:31 -0400 Received: from madras.collabora.co.uk (madras.collabora.co.uk [IPv6:2a00:1098:0:82:1000:25:2eeb:e5ab]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 146967CB61; Tue, 12 Jul 2022 03:41:30 -0700 (PDT) Received: from [192.168.1.100] (2-237-20-237.ip236.fastwebnet.it [2.237.20.237]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits)) (No client certificate requested) (Authenticated sender: kholk11) by madras.collabora.co.uk (Postfix) with ESMTPSA id C277266018EA; Tue, 12 Jul 2022 11:41:28 +0100 (BST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=collabora.com; s=mail; t=1657622489; bh=aOj+sQx7dj4knkAMQNH+ntgBvPv44y7F0cbpMrBGyOY=; h=Date:Subject:To:Cc:References:From:In-Reply-To:From; b=Twxvmviw03FzYyIwPUIjYmNGsgHcFzfCylKPNIhAw8llGo2yt81ZhUL4y4uXfXK/v 7F5hSOQrEkVvtNO8pV3d0GPii9cMDONdLIzhlAlQz6/IeFgzNgAbIjlPYYsKNI++NK hvdpMTatwHDSnQ7xmlPd25Rw9yBnVzpyTI/j+3xe485hJzwzepGW45nxha25j20jv8 mBhOcdC881hmSsFdiUeQh+xq9clXltl6aMhMP0+11MX+2terDAL5K2t6SqMQ36G8wH MHbS4TRHvDWu5sgFS80STUVEtN28Ndz6c/zU9M5ebE+wKoWL7e5iXzkF79WzWc5xNL L3qovPPeDUSbA== Message-ID: <79a79313-00e0-632f-f238-95686362675e@collabora.com> Date: Tue, 12 Jul 2022 12:41:26 +0200 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.11.0 Subject: Re: [PATCH] clk: mediatek: Don't check HW status for mt8192/5's imp_iic_wrap clocks Content-Language: en-US To: =?UTF-8?B?TsOtY29sYXMgRi4gUi4gQS4gUHJhZG8=?= , Stephen Boyd Cc: kernel@collabora.com, Chen-Yu Tsai , Chun-Jie Chen , Ikjoon Jang , Matthias Brugger , Michael Turquette , Miles Chen , Ran Jianping , Weiyi Lu , linux-arm-kernel@lists.infradead.org, linux-clk@vger.kernel.org, linux-kernel@vger.kernel.org, linux-mediatek@lists.infradead.org References: <20220711205733.203963-1-nfraprado@collabora.com> From: AngeloGioacchino Del Regno In-Reply-To: <20220711205733.203963-1-nfraprado@collabora.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,NICE_REPLY_A,SPF_HELO_NONE, SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Il 11/07/22 22:57, NĂ­colas F. R. A. Prado ha scritto: > The imp_iic_wrap clocks on mt8192/mt8195 require that the i2c_sel parent > clock be enabled before their hardware status can be checked. Since this > wasn't taken into account, reading from the clk_summary debugfs file > would cause the system to completely freeze. > > Assuming that this clock is managed only by the kernel, and not by any > firmware, simply drop the is_enabled() optional callback and instead > rely on the enable count for the imp_iic_wrap clocks. > > Signed-off-by: NĂ­colas F. R. A. Prado For both MT8192 and MT8195: Tested-by: AngeloGioacchino Del Regno > --- > > drivers/clk/mediatek/clk-gate.c | 6 ++++++ > drivers/clk/mediatek/clk-gate.h | 1 + > drivers/clk/mediatek/clk-mt8192-imp_iic_wrap.c | 2 +- > drivers/clk/mediatek/clk-mt8195-imp_iic_wrap.c | 2 +- > 4 files changed, 9 insertions(+), 2 deletions(-) >