]> www.infradead.org Git - users/jedix/linux-maple.git/commit
firmware: qcom: scm: Rework dload mode availability check
authorMukesh Ojha <quic_mojha@quicinc.com>
Thu, 21 Mar 2024 15:24:01 +0000 (20:54 +0530)
committerBjorn Andersson <andersson@kernel.org>
Sun, 21 Apr 2024 17:08:06 +0000 (12:08 -0500)
commit398a4c58f3f29ac3ff4d777dc91fe40a07bbca8c
treed13ff37e66564c0271ca95172d3e5ff56b38da85
parent000636d91d605f6209a635a29d0487af5b12b237
firmware: qcom: scm: Rework dload mode availability check

QCOM_SCM_BOOT_SET_DLOAD_MODE scm command is applicable for very
older SoCs where this command is supported from firmware and
for newer SoCs, dload mode tcsr registers is used for setting
the download mode.

Currently, qcom_scm_set_download_mode() checks for availability
of QCOM_SCM_BOOT_SET_DLOAD_MODE command even for SoCs where this
is not used. Fix this by switching the condition to keep the
command availability check only if dload mode registers are not
available.

Signed-off-by: Mukesh Ojha <quic_mojha@quicinc.com>
Reviewed-by: Elliot Berman <quic_eberman@quicinc.com>
Reviewed-by: Konrad Dybcio <konrad.dybcio@linaro.org>
Link: https://lore.kernel.org/r/1711034642-22860-3-git-send-email-quic_mojha@quicinc.com
Signed-off-by: Bjorn Andersson <andersson@kernel.org>
drivers/firmware/qcom/qcom_scm.c