scsi: ufs: Use freq table with devfreq
authorBjorn Andersson <bjorn.andersson@linaro.org>
Fri, 18 May 2018 06:26:37 +0000 (23:26 -0700)
committerMartin K. Petersen <martin.petersen@oracle.com>
Fri, 18 May 2018 15:28:18 +0000 (11:28 -0400)
commit092b45583c524edac688f0b6cdc62a70c3081e4a
treeef7532ec0b432489821106c7423822ddd4d32452
parentdeac444f4e44c406796a086381db1c09c70ce042
scsi: ufs: Use freq table with devfreq

devfreq requires that the client operates on actual frequencies, not only 0
and UMAX_INT and as such UFS brok with the introduction of f1d981eaecf8 ("PM
/ devfreq: Use the available min/max frequency").

This patch registers the frequencies of the first clock with devfreq and use
these to determine if we're trying to step up or down.

Reviewed-by: Chanwoo Choi <cw00.choi@samsung.com> [for devfreq & OPP part]
Reviewed-by: Subhash Jadavani <subhashj@codeaurora.org>
Signed-off-by: Bjorn Andersson <bjorn.andersson@linaro.org>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
drivers/scsi/ufs/ufshcd.c