scsi: ufs: core: Store min and max clk freq from OPP table
authorNitin Rawat <quic_nitirawa@quicinc.com>
Fri, 8 Dec 2023 13:13:31 +0000 (18:43 +0530)
committerMartin K. Petersen <martin.petersen@oracle.com>
Thu, 14 Dec 2023 03:28:28 +0000 (22:28 -0500)
commit77a67255609606164e1042f3bf7452a568a700e4
treee59fcc46c60c40c90a9397452aff892abaa8ffa4
parentc5becf57dd5659c687d41d623a69f42d63f59eb2
scsi: ufs: core: Store min and max clk freq from OPP table

OPP support added by commit 72208ebe181e ("scsi: ufs: core: Add support for
parsing OPP") doesn't update the min_freq and max_freq of each clock in
'struct ufs_clk_info'.

But these values are used by the host drivers internally for controller
configuration. When the OPP support is enabled in devicetree, these values
will be 0, causing boot issues on the respective platforms.

So add support to parse the min_freq and max_freq of all clocks while
parsing the OPP table.

Fixes: 72208ebe181e ("scsi: ufs: core: Add support for parsing OPP")
Co-developed-by: Manish Pandey <quic_mapa@quicinc.com>
Signed-off-by: Manish Pandey <quic_mapa@quicinc.com>
Signed-off-by: Nitin Rawat <quic_nitirawa@quicinc.com>
Link: https://lore.kernel.org/r/20231208131331.12596-1-quic_nitirawa@quicinc.com
Reviewed-by: Manivannan Sadhasivam <manivannan.sadhasivam@linaro.org>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
drivers/ufs/host/ufshcd-pltfrm.c