scsi: ufs: ufs-qcom: Factor out the logic finding the HS Gear
authorManivannan Sadhasivam <manivannan.sadhasivam@linaro.org>
Thu, 22 Dec 2022 14:09:58 +0000 (19:39 +0530)
committerMartin K. Petersen <martin.petersen@oracle.com>
Thu, 12 Jan 2023 02:49:34 +0000 (21:49 -0500)
commitc270986527f9fccb140826cbf3eff2cb1fccf463
tree8fc503f6857dcf7526c3c097fc3c1c3b31cce63c
parent96a7141da33207672d7a354c885d65af4f0f9b6c
scsi: ufs: ufs-qcom: Factor out the logic finding the HS Gear

In the preparation of adding support for new gears, move the logic that
finds the gear for each platform to a new function. This helps with code
readability and also allows the logic to be used in other places of the
driver in future.

While at it, make it clear that this driver only supports symmetric gear
setting (hs_tx_gear == hs_rx_gear).

Reviewed-by: Andrew Halaney <ahalaney@redhat.com>
Tested-by: Andrew Halaney <ahalaney@redhat.com> # Qdrive3/sa8540p-ride
Signed-off-by: Manivannan Sadhasivam <manivannan.sadhasivam@linaro.org>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
drivers/ufs/host/ufs-qcom.c