lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20220616015201.6D848C3411A@smtp.kernel.org>
Date:   Wed, 15 Jun 2022 18:51:59 -0700
From:   Stephen Boyd <sboyd@...nel.org>
To:     Rex-BC Chen <rex-bc.chen@...iatek.com>,
        krzysztof.kozlowski+dt@...aro.org, matthias.bgg@...il.com,
        mturquette@...libre.com, robh+dt@...nel.org
Cc:     p.zabel@...gutronix.de, angelogioacchino.delregno@...labora.com,
        nfraprado@...labora.com, chun-jie.chen@...iatek.com,
        wenst@...omium.org, runyang.chen@...iatek.com,
        linux-kernel@...r.kernel.org, devicetree@...r.kernel.org,
        linux-clk@...r.kernel.org, linux-arm-kernel@...ts.infradead.org,
        linux-mediatek@...ts.infradead.org,
        Project_Global_Chrome_Upstream_Group@...iatek.com,
        Rex-BC Chen <rex-bc.chen@...iatek.com>
Subject: Re: [RESEND v8 08/19] clk: mediatek: reset: Support inuput argument index mode

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@...iatek.com>
> Reviewed-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@...labora.com>
> Reviewed-by: NĂ­colas F. R. A. Prado <nfraprado@...labora.com>
> Tested-by: NĂ­colas F. R. A. Prado <nfraprado@...labora.com>
> ---

Applied to clk-next

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ