Re: [PATCH v3] memory: renesas-rpc-if: Fix PHYCNT.STRTIM setting

From: Wolfram Sang
Date: Fri Jan 27 2023 - 03:31:08 EST



> > - rpc->type = (uintptr_t)of_device_get_match_data(dev);
> > + rpc->size = resource_size(res);
>
> Nit: No need to move the initialization of rpc->size.

True. It is more cosmetic to have all rpc->* inits in one block. But I
think it is worth it.

> > + regmap_update_bits(rpc->regmap, RPCIF_PHYCNT,
> > + /* create mask with all affected bits set */
> > + RPCIF_PHYCNT_STRTIM(BIT(fls(rpc->info->strtim)) - 1),
>
> Note that this relies on the strtim value being 4 or higher.
> As this value is not user-configurable, but fixed in the driver,
> it's probably OK.

If there was a chance that newer SoCs use such a value, I'd go for the
seperate mask. But I am confident this time has passed and the next
value is likely >15.


> Reviewed-by: Geert Uytterhoeven <geert+renesas@xxxxxxxxx>

Thanks!

Attachment: signature.asc
Description: PGP signature