Received: by 2002:a05:6358:9144:b0:117:f937:c515 with SMTP id r4csp10210481rwr; Fri, 12 May 2023 05:28:44 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ4HaQUEQVfOc9XCKAJzjypXHqGUxaS8OyQWs/Anvo6hud1Wt178w5A+7irIwivS7t7XCrom X-Received: by 2002:a05:6a20:9150:b0:f4:1acb:8b1f with SMTP id x16-20020a056a20915000b000f41acb8b1fmr34353024pzc.2.1683894524232; Fri, 12 May 2023 05:28:44 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1683894524; cv=none; d=google.com; s=arc-20160816; b=E84LumubShfedg9gXq10yIw3G4m6ej65C5nIBNRKwlUdddFtb906WTqhhRYW/iMADX 1ZJVS8Dd+af8FHxQipbctUDS0fThFQWGfYmuCzp270dUp/PVmxhdG/CzWGNzJH4Tkhti QxyrS+AEWyntrtzQ+Yww/8/8dhNofJZVOQBr3qt1PgaKgGuocHtJFziCaqj5h1Ybm6hT g0RTACiLTKptV4Im2trkQ75XrkMqrGgwIMdvmQm1LGvz71qEw364vqC2Obe0xk7k9jzv qkMIjb9t5oEY0oADg9KkwGXELv3aQgxAJWQfqGQdbs9xYmuTF+mWlySk3yekGju0zRjo Fhig== 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=QQHkMWe3qdYU/HmvSBq3YXaycptjgX2aKr/mlQr6WCk=; b=TabH/kt+TuEyXV/jo67BLR4C9mynTsmJHk4HgxkhljptXp4ZTTMED8Jk4kDZfVycpI Hdcu34JUXM5hXes1ZDf4sfw/FiNBUhSXLZUMQYjrZBeSbN3U4mov4kS2cYoLh9N4PwDh WcRRuHEPxNkYt7XhRsXhiOpOYCR3x0/vLv81uVq7wBBGgO3n2rKfILBFpQUtTyJ1Z6TE 139s66Yz32oFp1PjVmodeY8w/Y1Yc01g+UxTUiuyQti5r7tTUfj38mwV/WV4VD2xhMHR PReF6WPdp5Qjv1tLUHRxhL3L2vdnwSLwxQt7T7U80EvdXa4rHQMMFBMlpR+IHpM0RfOP oeIg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20221208 header.b=Pz0MdPIS; 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=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id j5-20020a637a45000000b005303a26dbf8si8990369pgn.408.2023.05.12.05.28.30; Fri, 12 May 2023 05:28:44 -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=@gmail.com header.s=20221208 header.b=Pz0MdPIS; 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=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S240704AbjELLv4 (ORCPT + 99 others); Fri, 12 May 2023 07:51:56 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:37278 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S240096AbjELLvz (ORCPT ); Fri, 12 May 2023 07:51:55 -0400 Received: from mail-wm1-x32c.google.com (mail-wm1-x32c.google.com [IPv6:2a00:1450:4864:20::32c]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 3961044A9; Fri, 12 May 2023 04:51:54 -0700 (PDT) Received: by mail-wm1-x32c.google.com with SMTP id 5b1f17b1804b1-3f49bf0223cso30660565e9.1; Fri, 12 May 2023 04:51:54 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1683892312; x=1686484312; h=content-transfer-encoding:in-reply-to:from:references:cc:to :content-language:subject:user-agent:mime-version:date:message-id :from:to:cc:subject:date:message-id:reply-to; bh=QQHkMWe3qdYU/HmvSBq3YXaycptjgX2aKr/mlQr6WCk=; b=Pz0MdPIS8jASWVo90JrB5T/DQ/znfNThW0Bq9CdlI3Gs3RSAhLGRAH4BCFpQFL56bB DAe7RLXjAXOEmSjBL2RXfPTvK+GRb8g0S6+5R+SGLkLSj6aDuQL6+F0sKekVnhu0uv6n D9iF876dTor6FGYH7KbQDArWwdvawNDjgQeqtLkqyIuAqch2j+thy7hrH4SLzr66N3z/ Vn3f98GQwPlGUBiEw6u97/kBBqtG7zKGVZoLma4yNLQG/Vypw5nl2hhQOqg1Ab12uiqk 6+XChRU1ooE2dgXk/gW+TuWZc75nIkI1oSbxmqZhOIqLIKFNZ0zw0YOdpX0BNWXCqxpC ZeAw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1683892312; x=1686484312; h=content-transfer-encoding:in-reply-to:from:references:cc:to :content-language:subject:user-agent:mime-version:date:message-id :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=QQHkMWe3qdYU/HmvSBq3YXaycptjgX2aKr/mlQr6WCk=; b=OcGiL83F520up7wpQsYrVFBHSiUoMLVjEHbRKkpN5W+pTDvqHZUIKahzUZL4er8e2V KEF3rZwVv+mVtc36tXxwYTmfk7nm2g6Fb7HZeAVQfFR3KdYnUrKALSqb2mqYFSDia14g 4auxh+OLhONe1Eo4CrWNLWkW0Noqa3aJiywVLXPMPAMeW1XdPuZu8Y1sE0zYysH/YeyJ 1Etr4KV8CSRgnUtxpZCMH494dLG8+5vs+6ltwaePy45gXE7m/D1udtH90YzD7pkMk2iQ nBxxHiYHghHNW9rWXswjTNalcofj8Ekcex9wDTlJwuSkdVqd5aDmZg19L/JzqrGt+hU4 5law== X-Gm-Message-State: AC+VfDyEs+Cyl3Bg5UWi1oltVYHhpkJQP6vvo0O5j9XggSb24czL/buS oaAa+iTHaezkQG5ju0QDgjY= X-Received: by 2002:a7b:cbda:0:b0:3f4:2415:617c with SMTP id n26-20020a7bcbda000000b003f42415617cmr12020968wmi.6.1683892312291; Fri, 12 May 2023 04:51:52 -0700 (PDT) Received: from [192.168.2.177] ([207.188.167.132]) by smtp.gmail.com with ESMTPSA id a22-20020a1cf016000000b003f42d8dd7ffsm9013841wmb.19.2023.05.12.04.51.50 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Fri, 12 May 2023 04:51:51 -0700 (PDT) Message-ID: <8603c2b2-2a5b-48f6-9b08-9b3b518b716b@gmail.com> Date: Fri, 12 May 2023 13:51:49 +0200 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.10.0 Subject: Re: [PATCH] clk: mediatek: mt8365: Fix inverted topclk operations Content-Language: en-US, ca-ES, es-ES To: Markus Schneider-Pargmann , Michael Turquette , Stephen Boyd , AngeloGioacchino Del Regno Cc: linux-clk@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-mediatek@lists.infradead.org, Alexandre Mergnat References: <20230511133226.913600-1-msp@baylibre.com> From: Matthias Brugger In-Reply-To: <20230511133226.913600-1-msp@baylibre.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-4.0 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM,NICE_REPLY_A, RCVD_IN_DNSWL_NONE,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 On 11/05/2023 15:32, Markus Schneider-Pargmann wrote: > The given operations are inverted for the wrong registers which makes > multiple of the mt8365 hardware units unusable. In my setup at least usb > did not work. > > Fixed by swapping the operations with the inverted ones. > > Reported-by: Alexandre Mergnat > Fixes: 905b7430d3cc ("clk: mediatek: mt8365: Convert simple_gate to mtk_gate clocks") > Signed-off-by: Markus Schneider-Pargmann Reviewed-by: Matthias Brugger > --- > drivers/clk/mediatek/clk-mt8365.c | 6 +++--- > 1 file changed, 3 insertions(+), 3 deletions(-) > > diff --git a/drivers/clk/mediatek/clk-mt8365.c b/drivers/clk/mediatek/clk-mt8365.c > index 6b4e193f648d..6d785ec5754d 100644 > --- a/drivers/clk/mediatek/clk-mt8365.c > +++ b/drivers/clk/mediatek/clk-mt8365.c > @@ -583,15 +583,15 @@ static const struct mtk_gate_regs top2_cg_regs = { > > #define GATE_TOP0(_id, _name, _parent, _shift) \ > GATE_MTK(_id, _name, _parent, &top0_cg_regs, \ > - _shift, &mtk_clk_gate_ops_no_setclr_inv) > + _shift, &mtk_clk_gate_ops_no_setclr) > > #define GATE_TOP1(_id, _name, _parent, _shift) \ > GATE_MTK(_id, _name, _parent, &top1_cg_regs, \ > - _shift, &mtk_clk_gate_ops_no_setclr) > + _shift, &mtk_clk_gate_ops_no_setclr_inv) > > #define GATE_TOP2(_id, _name, _parent, _shift) \ > GATE_MTK(_id, _name, _parent, &top2_cg_regs, \ > - _shift, &mtk_clk_gate_ops_no_setclr) > + _shift, &mtk_clk_gate_ops_no_setclr_inv) > > static const struct mtk_gate top_clk_gates[] = { > GATE_TOP0(CLK_TOP_CONN_32K, "conn_32k", "clk32k", 10),