mbox series

[0/5] scsi: ufs: renesas: Refactor code for other UFS controller

Message ID 20240708120931.1703956-1-yoshihiro.shimoda.uh@renesas.com
Headers show
Series scsi: ufs: renesas: Refactor code for other UFS controller | expand

Message

Yoshihiro Shimoda July 8, 2024, 12:09 p.m. UTC
The current UFS controller of R-Car S4-8 ES 1.0 only requires statical values
for initializing it. However, other UFS controller (R-Car S4-8 ES 1.2) will
require dynamic values like eFuse values. So, refactor the code for it.
For now, readling eFuse values function which Geert-san made is under
review [1]. So, this patch series refactors is the code only.

[1]
https://lore.kernel.org/all/cover.1716974502.git.geert+renesas@glider.be/

Yoshihiro Shimoda (5):
  scsi: ufs: renesas: Refactor init code for other UFS controller
  scsi: ufs: renesas: Remove a static local variable
  scsi: ufs: renesas: Use udelay() directly
  scsi: ufs: renesas: Refactoring specific PHY settings of 0x10a[df]
  scsi: ufs: renesas: Add reusable functions

 drivers/ufs/host/ufs-renesas.c | 523 +++++++++++++++++----------------
 1 file changed, 265 insertions(+), 258 deletions(-)

Comments

Bart Van Assche July 8, 2024, 5:04 p.m. UTC | #1
On 7/8/24 5:09 AM, Yoshihiro Shimoda wrote:
> +static void ufs_renesas_param_poll(struct ufs_hba *hba, u32 reg, u32 expected,
> +				   u32 mask)
> +{
> +	struct ufs_renesas_init_param param = { 0 };
> +
> +	param.mode = MODE_POLL;
> +	param.reg = reg;
> +	param.u.expected = expected;
> +	param.mask = mask;

Please combine the above declaration and assignments into a single
statement:

struct ufs_renesas_init_param param = {
         .mode = MODE_POLL,
         .reg = reg,
         .u.expected = expected,
         .mask = mask,
};

Same comment for the other functions below this function.

Thanks,

Bart.