Received: by 2002:ac2:464d:0:0:0:0:0 with SMTP id s13csp2061913lfo; Fri, 20 May 2022 11:57:26 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxfV45pI/x22IDGBiMZhJdn8EM7w2/agspIx0SbDTaSLgWX6+sF2TGvGkIUdy1lCex8uYjV X-Received: by 2002:aa7:c2d4:0:b0:42a:a9a6:e73c with SMTP id m20-20020aa7c2d4000000b0042aa9a6e73cmr12385425edp.115.1653073046841; Fri, 20 May 2022 11:57:26 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1653073046; cv=none; d=google.com; s=arc-20160816; b=IbV/X3ONgwWEgCGbxpHygu+dzbOR2j4LxbIq3IvzOFHNlAMWGcRoMrCcJEvERitYGk nZTg1n205EuxfO4lqY8P/YHtRAJvBHYaIz+CS0nhr6ew8S5+KydX4iQ3NfXdKMqC8O+X k8+dKopdYlSubk3Ksb4N9lYXu8y5ckz2m1d/NbesrMxvWzEpPcIzxNIbuVJeVsyBHuRi c31itio5jSJT94//C+3jms5vYccE2QM3Q4c7Rrjld1BqghNLrKuSrZfBb2WU3eMEI6Ea uIidUr4WDArii/oi9QTwPD/iX2T6CbIUd2Tlatie9L/ZwjUyhD3z/gk7LkTVN0ah8Urx cxkg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-transfer-encoding :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature; bh=gRkGNFez7QyBltE5mRPZP33PpTXxpK+jfC4pDutK8EY=; b=Prg/wpZRCCzhNwRj7b9NILD97GaSFBZoFSqkmzETafBgLhEb6zQiwS2rxrqbZ505aP D3ZXGChMIAtY2S3wLjeaphJKdt8SHkhUiNp6SfaNd1TPR7f76kj+UoaI/6mr7ufh+b3s uSpsDyOM9EdrWTuY9clYIlrgqcC8rXJKqbj5hni2oQ3zCl5XwdtPvPeqAY8wJoVXkG6p 5GxccLwjBN74PXj3XGHfzMrAdSpdv+ov0AXkEK4MiqmgcCWLcKWa5SEJkEljIh6pDH+E VpDgsGp5E8ltRzJ/E5vHGwmZ9JUkcRz7Bm1O8x5PumYvQTJN+gmf5f0bnZ0a3YMIxFlc 6V2w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@collabora.com header.s=mail header.b=I9k2T7C3; 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 i11-20020a1709064fcb00b006fe58b19736si1661625ejw.510.2022.05.20.11.57.01; Fri, 20 May 2022 11:57:26 -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=I9k2T7C3; 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 S1350692AbiETPTD (ORCPT + 99 others); Fri, 20 May 2022 11:19:03 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:50122 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1343812AbiETPTB (ORCPT ); Fri, 20 May 2022 11:19:01 -0400 Received: from bhuna.collabora.co.uk (bhuna.collabora.co.uk [46.235.227.227]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 39DF417788A; Fri, 20 May 2022 08:19:01 -0700 (PDT) Received: from [127.0.0.1] (localhost [127.0.0.1]) (Authenticated sender: nfraprado) with ESMTPSA id 5B1971F46586 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=collabora.com; s=mail; t=1653059940; bh=YQ31OR4ZEDVzd2CcVyEsIJ0oD9usN7dRjGllBd1TqMc=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=I9k2T7C3tWF2Q3ecHJRuck5leEQwLkSwMo5DGMerg1mS8Fr1EogfPo6jonnSsp4g7 Xw/fpwTKwWh1esgVSCvVPbiZTYPUKvdEDFGGTZ6wvbSRWULRyV9d6KMSqc5vhK7GUZ URBfBdk9fvBJiiMUTml9XZzIW+It09ZGGGev+NcCA6uVo5/B10pF6kU3JA8nIoZPNQ R5aQ98ClKg4IaWUZHu8WvxcXjOWN3SPxm942NPVV1Gh6ynm+Xc1T+iytkEIiMtyT6G ml7WR6OSxIvUhUcjkWkYci1HAMrMp6UHqOJRwIcj3BWXnEbBfC9UCMo1DIwqkQhF17 HkK472iVQYwtQ== Date: Fri, 20 May 2022 11:18:54 -0400 From: =?utf-8?B?TsOtY29sYXMgRi4gUi4gQS4=?= Prado To: Rex-BC Chen Cc: mturquette@baylibre.com, sboyd@kernel.org, matthias.bgg@gmail.com, robh+dt@kernel.org, krzysztof.kozlowski+dt@linaro.org, p.zabel@pengutronix.de, angelogioacchino.delregno@collabora.com, chun-jie.chen@mediatek.com, wenst@chromium.org, runyang.chen@mediatek.com, linux-kernel@vger.kernel.org, devicetree@vger.kernel.org, linux-clk@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-mediatek@lists.infradead.org, Project_Global_Chrome_Upstream_Group@mediatek.com Subject: Re: [PATCH v7 07/19] clk: mediatek: reset: Support nonsequence base offsets of reset registers Message-ID: <20220520151854.kkr2tezmrfniks4j@notapiano> References: <20220519125527.18544-1-rex-bc.chen@mediatek.com> <20220519125527.18544-8-rex-bc.chen@mediatek.com> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <20220519125527.18544-8-rex-bc.chen@mediatek.com> X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,SPF_HELO_PASS,SPF_PASS, T_SCC_BODY_TEXT_LINE,UNPARSEABLE_RELAY 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 Hi Rex, On Thu, May 19, 2022 at 08:55:15PM +0800, Rex-BC Chen wrote: > The bank offsets are not serial for all reset registers. > For example, there are five infra reset banks for MT8192: 0x120, 0x130, > 0x140, 0x150 and 0x730. > > To support this, > - Change reg_ofs to rst_bank_ofs which is a pointer to base offsets of > the reset register. > - Add a new define RST_NR_PER_BANK to define reset number for each > reset bank. > > Signed-off-by: Rex-BC Chen > Reviewed-by: AngeloGioacchino Del Regno > --- > diff --git a/drivers/clk/mediatek/clk-mt2701-g3d.c b/drivers/clk/mediatek/clk-mt2701-g3d.c > index 9cfd589939e5..5cbc5c42204d 100644 > --- a/drivers/clk/mediatek/clk-mt2701-g3d.c > +++ b/drivers/clk/mediatek/clk-mt2701-g3d.c > @@ -35,10 +35,12 @@ static const struct mtk_gate g3d_clks[] = { > GATE_G3D(CLK_G3DSYS_CORE, "g3d_core", "mfg_sel", 0), > }; > > +static u16 rst_ofs[] = { 0xC, }; Very nitpicky, but you could have left the hex lowercase '0xc'. Thanks, N?colas