First several patches target fixing the UFS support on the Qualcomm MSM8996 / APQ8096 platforms, broken by the commit b4e13e1ae95e ("scsi: ufs: qcom: Add multiple frequency support for MAX_CORE_CLK_1US_CYCLES"). Last two patches clean up the UFS DT device on that platform to follow the bindings on other MSM8969 platforms. If such breaking change is unacceptable, they can be simply ignored, merging fixes only.
Signed-off-by: Dmitry Baryshkov dmitry.baryshkov@linaro.org --- Changes in v3: - dropped the patch conflicting with Yassine's patch that got accepted - Cc stable on the UFS change (Manivannan) - Fixed typos in the commit message (Manivannan) - Link to v2: https://lore.kernel.org/r/20240213-msm8996-fix-ufs-v2-0-650758c26458@linaro....
Changes in v2: - Dropped patches adding RX_SYMBOL_1_CLK, MSM8996 uses single lane (Krzysztof). - Link to v1: https://lore.kernel.org/r/20240209-msm8996-fix-ufs-v1-0-107b52e57420@linaro....
--- Dmitry Baryshkov (5): scsi: ufs: qcom: provide default cycles_in_1us value arm64: dts: qcom: msm8996: specify UFS core_clk frequencies arm64: dts: qcom: msm8996: set GCC_UFS_ICE_CORE_CLK freq directly dt-bindings: ufs: qcom,ufs: drop source clock entries arm64: dts: qcom: msm8996: drop source clock entries from the UFS node
Documentation/devicetree/bindings/ufs/qcom,ufs.yaml | 12 +++++------- arch/arm64/boot/dts/qcom/msm8996.dtsi | 8 +------- drivers/ufs/host/ufs-qcom.c | 6 ++++-- 3 files changed, 10 insertions(+), 16 deletions(-) --- base-commit: 0035c3918a74a83f94158fbbd667e163bfd4a0d0 change-id: 20240209-msm8996-fix-ufs-f80ae6d4d8cf
Best regards,
The MSM8996 DT doesn't provide frequency limits for the core_clk_unipro clock, which results in miscalculation of the cycles_in_1us value. Provide the backwards-compatible default to support existing MSM8996 DT files.
Fixes: b4e13e1ae95e ("scsi: ufs: qcom: Add multiple frequency support for MAX_CORE_CLK_1US_CYCLES") Cc: Nitin Rawat quic_nitirawa@quicinc.com Cc: stable@vger.kernel.org # 6.7.x Reviewed-by: Konrad Dybcio konrad.dybcio@linaro.org Reviewed-by: Manivannan Sadhasivam manivannan.sadhasivam@linaro.org Signed-off-by: Dmitry Baryshkov dmitry.baryshkov@linaro.org --- drivers/ufs/host/ufs-qcom.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/drivers/ufs/host/ufs-qcom.c b/drivers/ufs/host/ufs-qcom.c index 0aeaee1c564c..79f8cb377710 100644 --- a/drivers/ufs/host/ufs-qcom.c +++ b/drivers/ufs/host/ufs-qcom.c @@ -1210,8 +1210,10 @@ static int ufs_qcom_set_core_clk_ctrl(struct ufs_hba *hba, bool is_scale_up)
list_for_each_entry(clki, head, list) { if (!IS_ERR_OR_NULL(clki->clk) && - !strcmp(clki->name, "core_clk_unipro")) { - if (is_scale_up) + !strcmp(clki->name, "core_clk_unipro")) { + if (!clki->max_freq) + cycles_in_1us = 150; /* default for backwards compatibility */ + else if (is_scale_up) cycles_in_1us = ceil(clki->max_freq, (1000 * 1000)); else cycles_in_1us = ceil(clk_get_rate(clki->clk), (1000 * 1000));
Dmitry,
First several patches target fixing the UFS support on the Qualcomm MSM8996 / APQ8096 platforms, broken by the commit b4e13e1ae95e ("scsi: ufs: qcom: Add multiple frequency support for MAX_CORE_CLK_1US_CYCLES"). Last two patches clean up the UFS DT device on that platform to follow the bindings on other MSM8969 platforms. If such breaking change is unacceptable, they can be simply ignored, merging fixes only.
Does not apply to 6.9/scsi-staging. Please rebase if you want this series to go through the SCSI tree.
On Tue, 27 Feb 2024 at 04:33, Martin K. Petersen martin.petersen@oracle.com wrote:
Dmitry,
First several patches target fixing the UFS support on the Qualcomm MSM8996 / APQ8096 platforms, broken by the commit b4e13e1ae95e ("scsi: ufs: qcom: Add multiple frequency support for MAX_CORE_CLK_1US_CYCLES"). Last two patches clean up the UFS DT device on that platform to follow the bindings on other MSM8969 platforms. If such breaking change is unacceptable, they can be simply ignored, merging fixes only.
Does not apply to 6.9/scsi-staging. Please rebase if you want this series to go through the SCSI tree.
Please pick up just the UFS patch. DT patches should go through arm-soc tree.
linux-stable-mirror@lists.linaro.org