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: <OSZPR01MB70197D0092E43A929A3FDE74AA9B9@OSZPR01MB7019.jpnprd01.prod.outlook.com>
Date:   Thu, 18 Nov 2021 02:42:11 +0000
From:   Prabhakar Mahadev Lad <prabhakar.mahadev-lad.rj@...renesas.com>
To:     Wolfram Sang <wsa+renesas@...g-engineering.com>,
        "linux-renesas-soc@...r.kernel.org" 
        <linux-renesas-soc@...r.kernel.org>
CC:     Krzysztof Kozlowski <krzysztof.kozlowski@...onical.com>,
        "linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>
Subject: RE: [PATCH RFT] memory: renesas-rpc-if: simplify register update

Hi Wolfram,

Thank you for the patch.

> -----Original Message-----
> From: Wolfram Sang <wsa+renesas@...g-engineering.com>
> Sent: 17 November 2021 10:29
> To: linux-renesas-soc@...r.kernel.org
> Cc: Prabhakar Mahadev Lad <prabhakar.mahadev-lad.rj@...renesas.com>; Wolfram Sang <wsa+renesas@...g-
> engineering.com>; Krzysztof Kozlowski <krzysztof.kozlowski@...onical.com>; linux-
> kernel@...r.kernel.org
> Subject: [PATCH RFT] memory: renesas-rpc-if: simplify register update
> 
> No need to open code regmap_update_bits().
> 
> Signed-off-by: Wolfram Sang <wsa+renesas@...g-engineering.com>
> ---
> 
> Only build tested as I don't have the G2L hardware.
> @Prabhakar: would you also kindly test this patch?
> 
Dumped the register setting with and without this patch. And also tested it on RZ/G2L.

Tested-by: Lad Prabhakar <prabhakar.mahadev-lad.rj@...renesas.com>

Cheers,
Prabhakar

>  drivers/memory/renesas-rpc-if.c | 7 ++-----
>  1 file changed, 2 insertions(+), 5 deletions(-)
> 
> diff --git a/drivers/memory/renesas-rpc-if.c b/drivers/memory/renesas-rpc-if.c index
> a9f3e7bdddf8..0c8f00323a91 100644
> --- a/drivers/memory/renesas-rpc-if.c
> +++ b/drivers/memory/renesas-rpc-if.c
> @@ -258,17 +258,14 @@ EXPORT_SYMBOL(rpcif_sw_init);
> 
>  static void rpcif_rzg2l_timing_adjust_sdr(struct rpcif *rpc)  {
> -	u32 data;
> -
>  	regmap_write(rpc->regmap, RPCIF_PHYWR, 0xa5390000);
>  	regmap_write(rpc->regmap, RPCIF_PHYADD, 0x80000000);
>  	regmap_write(rpc->regmap, RPCIF_PHYWR, 0x00008080);
>  	regmap_write(rpc->regmap, RPCIF_PHYADD, 0x80000022);
>  	regmap_write(rpc->regmap, RPCIF_PHYWR, 0x00008080);
>  	regmap_write(rpc->regmap, RPCIF_PHYADD, 0x80000024);
> -
> -	regmap_read(rpc->regmap, RPCIF_PHYCNT, &data);
> -	regmap_write(rpc->regmap, RPCIF_PHYCNT, data | RPCIF_PHYCNT_CKSEL(3));
> +	regmap_update_bits(rpc->regmap, RPCIF_PHYCNT, RPCIF_PHYCNT_CKSEL(3),
> +			   RPCIF_PHYCNT_CKSEL(3));
>  	regmap_write(rpc->regmap, RPCIF_PHYWR, 0x00000030);
>  	regmap_write(rpc->regmap, RPCIF_PHYADD, 0x80000032);  }
> --
> 2.30.2

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ