linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Stephen Boyd <sboyd@kernel.org>
To: Rex-BC Chen <rex-bc.chen@mediatek.com>,
	krzysztof.kozlowski+dt@linaro.org, matthias.bgg@gmail.com,
	mturquette@baylibre.com, robh+dt@kernel.org
Cc: p.zabel@pengutronix.de, angelogioacchino.delregno@collabora.com,
	nfraprado@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,
	Rex-BC Chen <rex-bc.chen@mediatek.com>
Subject: Re: [RESEND v8 08/19] clk: mediatek: reset: Support inuput argument index mode
Date: Wed, 15 Jun 2022 18:51:59 -0700	[thread overview]
Message-ID: <20220616015201.6D848C3411A@smtp.kernel.org> (raw)
In-Reply-To: <20220523093346.28493-9-rex-bc.chen@mediatek.com>

Quoting Rex-BC Chen (2022-05-23 02:33:35)
> There is a large number of mediatek infra reset bits, but we do not use
> all of them. In addition, the proper input argement of reset controller
> soulde be index.
> Therefore, to be compatible with previous drivers and usage, we add
> description variables to store the ids which can mapping to index.
> 
> To use this mode, we need to put the id in rst_idx_map to map from
> index to ids. For example, if we want to input index 1 (this index
> is used to set bank 1 bit 14) for svs, we need to declare the reset
> controller like this:
> 
> In drivers:
> static u16 rst_ofs[] = {
>         0x120, 0x130, 0x140, 0x150, 0x730,
> };
> 
> static u16 rst_idx_map[] = {
>         0 * 32 + 0,
>         1 * 32 + 14,
>         ....
> };
> 
> static const struct mtk_clk_rst_desc clk_rst_desc = {
>         .version = MTK_RST_SET_CLR,
>         .rst_bank_ofs = rst_ofs,
>         .rst_bank_nr = ARRAY_SIZE(rst_ofs),
>         .rst_idx_map = rst_idx_map,
>         .rst_idx_map_nr = ARRAY_SIZE(rst_idx_map),
> };
> 
> In dts:
> svs: {
>         ...
>         resets = <&infra 1>;
>         ...
> };
> 
> Signed-off-by: Rex-BC Chen <rex-bc.chen@mediatek.com>
> Reviewed-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>
> Reviewed-by: Nícolas F. R. A. Prado <nfraprado@collabora.com>
> Tested-by: Nícolas F. R. A. Prado <nfraprado@collabora.com>
> ---

Applied to clk-next

  reply	other threads:[~2022-06-16  1:52 UTC|newest]

Thread overview: 40+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-05-23  9:33 [RESEND v8 00/19] Cleanup MediaTek clk reset drivers and support SoCs Rex-BC Chen
2022-05-23  9:33 ` [RESEND v8 01/19] clk: mediatek: reset: Add reset.h Rex-BC Chen
2022-06-16  1:50   ` Stephen Boyd
2022-05-23  9:33 ` [RESEND v8 02/19] clk: mediatek: reset: Fix written reset bit offset Rex-BC Chen
2022-06-16  1:50   ` Stephen Boyd
2022-05-23  9:33 ` [RESEND v8 03/19] clk: mediatek: reset: Refine and reorder functions in reset.c Rex-BC Chen
2022-06-16  1:50   ` Stephen Boyd
2022-05-23  9:33 ` [RESEND v8 04/19] clk: mediatek: reset: Extract common drivers to update function Rex-BC Chen
2022-06-16  1:50   ` Stephen Boyd
2022-05-23  9:33 ` [RESEND v8 05/19] clk: mediatek: reset: Merge and revise reset register function Rex-BC Chen
2022-06-16  1:51   ` Stephen Boyd
2022-05-23  9:33 ` [RESEND v8 06/19] clk: mediatek: reset: Revise structure to control reset register Rex-BC Chen
2022-06-16  1:51   ` Stephen Boyd
2022-05-23  9:33 ` [RESEND v8 07/19] clk: mediatek: reset: Support nonsequence base offsets of reset registers Rex-BC Chen
2022-06-16  1:51   ` Stephen Boyd
2022-05-23  9:33 ` [RESEND v8 08/19] clk: mediatek: reset: Support inuput argument index mode Rex-BC Chen
2022-06-16  1:51   ` Stephen Boyd [this message]
2022-05-23  9:33 ` [RESEND v8 09/19] clk: mediatek: reset: Change return type for clock reset register function Rex-BC Chen
2022-06-16  1:52   ` Stephen Boyd
2022-05-23  9:33 ` [RESEND v8 10/19] clk: mediatek: reset: Add new register reset function with device Rex-BC Chen
2022-06-16  1:52   ` Stephen Boyd
2022-05-23  9:33 ` [RESEND v8 11/19] clk: mediatek: reset: Add reset support for simple probe Rex-BC Chen
2022-06-16  1:53   ` Stephen Boyd
2022-05-23  9:33 ` [RESEND v8 12/19] dt-bindings: arm: mediatek: Add #reset-cells property for MT8192/MT8195 Rex-BC Chen
2022-06-16  1:53   ` Stephen Boyd
2022-05-23  9:33 ` [RESEND v8 13/19] dt-bindings: reset: mediatek: Add infra_ao reset index " Rex-BC Chen
2022-06-16  1:53   ` Stephen Boyd
2022-05-23  9:33 ` [RESEND v8 14/19] clk: mediatek: reset: Add infra_ao reset support " Rex-BC Chen
2022-06-16  1:55   ` Stephen Boyd
2022-05-23  9:33 ` [RESEND v8 15/19] arm64: dts: mediatek: Add infra #reset-cells property for MT8192 Rex-BC Chen
2022-05-23  9:33 ` [RESEND v8 16/19] arm64: dts: mediatek: Add infra #reset-cells property for MT8195 Rex-BC Chen
2022-05-23  9:33 ` [RESEND v8 17/19] dt-bindings: reset: mediatek: Add infra_ao reset index for MT8186 Rex-BC Chen
2022-06-16  1:55   ` Stephen Boyd
2022-05-23  9:33 ` [RESEND v8 18/19] dt-bindings: arm: mediatek: Add #reset-cells property " Rex-BC Chen
2022-06-16  1:55   ` Stephen Boyd
2022-05-23  9:33 ` [RESEND v8 19/19] clk: mediatek: reset: Add infra_ao reset support " Rex-BC Chen
2022-06-16  1:55   ` Stephen Boyd
2022-05-23 10:28 ` [RESEND v8 00/19] Cleanup MediaTek clk reset drivers and support SoCs AngeloGioacchino Del Regno
2022-06-13  5:26 ` Rex-BC Chen
2022-06-16  1:57   ` Stephen Boyd

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20220616015201.6D848C3411A@smtp.kernel.org \
    --to=sboyd@kernel.org \
    --cc=Project_Global_Chrome_Upstream_Group@mediatek.com \
    --cc=angelogioacchino.delregno@collabora.com \
    --cc=chun-jie.chen@mediatek.com \
    --cc=devicetree@vger.kernel.org \
    --cc=krzysztof.kozlowski+dt@linaro.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-clk@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mediatek@lists.infradead.org \
    --cc=matthias.bgg@gmail.com \
    --cc=mturquette@baylibre.com \
    --cc=nfraprado@collabora.com \
    --cc=p.zabel@pengutronix.de \
    --cc=rex-bc.chen@mediatek.com \
    --cc=robh+dt@kernel.org \
    --cc=runyang.chen@mediatek.com \
    --cc=wenst@chromium.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).