ipq-wifi: add BDF for Aruba AP-303
[openwrt/openwrt.git] / target / linux / ipq40xx / patches-4.19 / 070-v4.20-soc-qcom-spm-add-SCM-probe-dependency.patch
1 From 61a3bd10082b0e861b4e1bc451a92e20181a52f5 Mon Sep 17 00:00:00 2001
2 From: Felix Fietkau <nbd@nbd.name>
3 Date: Mon, 23 Jul 2018 16:17:35 +0200
4 Subject: [PATCH] soc: qcom: spm: add SCM probe dependency
5
6 Check for SCM availability before attempting to use SPM. SPM probe will
7 fail otherwise.
8
9 Signed-off-by: Felix Fietkau <nbd@nbd.name>
10 Signed-off-by: John Crispin <john@phrozen.org>
11 Signed-off-by: Andy Gross <andy.gross@linaro.org>
12 ---
13 drivers/soc/qcom/spm.c | 3 +++
14 1 file changed, 3 insertions(+)
15
16 --- a/drivers/soc/qcom/spm.c
17 +++ b/drivers/soc/qcom/spm.c
18 @@ -219,6 +219,9 @@ static int __init qcom_cpuidle_init(stru
19 cpumask_t mask;
20 bool use_scm_power_down = false;
21
22 + if (!qcom_scm_is_available())
23 + return -EPROBE_DEFER;
24 +
25 for (i = 0; ; i++) {
26 state_node = of_parse_phandle(cpu_node, "cpu-idle-states", i);
27 if (!state_node)