scsi: ufs: qcom: Add multiple frequency support for MAX_CORE_CLK_1US_CYCLES
authorNitin Rawat <quic_nitirawa@quicinc.com>
Tue, 5 Sep 2023 05:23:57 +0000 (10:53 +0530)
committerMartin K. Petersen <martin.petersen@oracle.com>
Thu, 14 Sep 2023 01:15:40 +0000 (21:15 -0400)
commitb4e13e1ae95e7d9ad3dd2e1ca98cd1328d913fb8
tree4f6abb408dfe916a09fcc0732d3183c570d95d50
parent07d2290fe80dc9b1b0d066dc2027b84770144e49
scsi: ufs: qcom: Add multiple frequency support for MAX_CORE_CLK_1US_CYCLES

Qualcomm UFS Controller V4 and above supports multiple unipro frequencies
like 403MHz, 300MHz, 202MHz, 150 MHz, 75Mhz, 37.5 MHz. Current code
supports only 150MHz and 75MHz which have performance impact due to low UFS
controller frequencies.

For targets which supports frequencies other than 150 MHz and 75 Mhz, needs
an update of MAX_CORE_CLK_1US_CYCLES to match the configured frequency to
avoid functionality issues. Add multiple frequency support for
MAX_CORE_CLK_1US_CYCLES based on the frequency configured.

Co-developed-by: Naveen Kumar Goud Arepalli <quic_narepall@quicinc.com>
Signed-off-by: Naveen Kumar Goud Arepalli <quic_narepall@quicinc.com>
Signed-off-by: Nitin Rawat <quic_nitirawa@quicinc.com>
Link: https://lore.kernel.org/r/20230905052400.13935-3-quic_nitirawa@quicinc.com
Reviewed-by: Can Guo <quic_cang@quicinc.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
drivers/ufs/host/ufs-qcom.c
drivers/ufs/host/ufs-qcom.h