- Add 0013 early-SCM 4-core SMP + cpufreq kernel patch and clock-frequency DT nodes - Complete nokia-sparkler lk2nd port, boot/X11 session startup, 180-deg cached camera, and 157 Hz haptic audio - Replace root-only timer backend with permissionless sxmo_timer.sh and keypad/hook cancellation - Fix EDL Firehose rawmode ACK, USB active-config preservation, *+# hint, and 30 s default USB timeout - Sync a1120 (cocojamboo) prebuilts, docs, tests, and verified checksums in check-rebuild.sh
166 lines
5.2 KiB
Diff
166 lines
5.2 KiB
Diff
diff --git a/arch/arm/boot/dts/qcom/qcom-msm8909.dtsi b/arch/arm/boot/dts/qcom/qcom-msm8909.dtsi
|
|
index af87a9a..6112cda 100644
|
|
--- a/arch/arm/boot/dts/qcom/qcom-msm8909.dtsi
|
|
+++ b/arch/arm/boot/dts/qcom/qcom-msm8909.dtsi
|
|
@@ -49,6 +49,7 @@ cpu0: cpu@0 {
|
|
device_type = "cpu";
|
|
compatible = "arm,cortex-a7";
|
|
reg = <0x0>;
|
|
+ clock-frequency = <1094400000>;
|
|
next-level-cache = <&L2_0>;
|
|
enable-method = "qcom,msm8909-smp";
|
|
clocks = <&apcs>;
|
|
@@ -65,6 +66,7 @@ cpu1: cpu@1 {
|
|
device_type = "cpu";
|
|
compatible = "arm,cortex-a7";
|
|
reg = <0x1>;
|
|
+ clock-frequency = <1094400000>;
|
|
next-level-cache = <&L2_0>;
|
|
enable-method = "qcom,msm8909-smp";
|
|
clocks = <&apcs>;
|
|
@@ -81,6 +83,7 @@ cpu2: cpu@2 {
|
|
device_type = "cpu";
|
|
compatible = "arm,cortex-a7";
|
|
reg = <0x2>;
|
|
+ clock-frequency = <1094400000>;
|
|
next-level-cache = <&L2_0>;
|
|
enable-method = "qcom,msm8909-smp";
|
|
clocks = <&apcs>;
|
|
@@ -97,6 +100,7 @@ cpu3: cpu@3 {
|
|
device_type = "cpu";
|
|
compatible = "arm,cortex-a7";
|
|
reg = <0x3>;
|
|
+ clock-frequency = <1094400000>;
|
|
next-level-cache = <&L2_0>;
|
|
enable-method = "qcom,msm8909-smp";
|
|
clocks = <&apcs>;
|
|
diff --git a/drivers/cpufreq/qcom-cpufreq-nvmem.c b/drivers/cpufreq/qcom-cpufreq-nvmem.c
|
|
index cecbd1e..f8e302c 100644
|
|
--- a/drivers/cpufreq/qcom-cpufreq-nvmem.c
|
|
+++ b/drivers/cpufreq/qcom-cpufreq-nvmem.c
|
|
@@ -508,6 +508,9 @@ static int qcom_cpufreq_probe(struct platform_device *pdev)
|
|
.supported_hw = NULL,
|
|
};
|
|
|
|
+ if (!cpu_present(cpu))
|
|
+ continue;
|
|
+
|
|
cpu_dev = get_cpu_device(cpu);
|
|
if (NULL == cpu_dev) {
|
|
ret = -ENODEV;
|
|
@@ -571,7 +574,8 @@ static int qcom_cpufreq_probe(struct platform_device *pdev)
|
|
free_opp:
|
|
for_each_possible_cpu(cpu) {
|
|
qcom_cpufreq_put_virt_devs(drv, cpu);
|
|
- dev_pm_opp_clear_config(drv->cpus[cpu].opp_token);
|
|
+ if (drv->cpus[cpu].opp_token > 0)
|
|
+ dev_pm_opp_clear_config(drv->cpus[cpu].opp_token);
|
|
}
|
|
return ret;
|
|
}
|
|
@@ -585,7 +589,8 @@ static void qcom_cpufreq_remove(struct platform_device *pdev)
|
|
|
|
for_each_possible_cpu(cpu) {
|
|
qcom_cpufreq_put_virt_devs(drv, cpu);
|
|
- dev_pm_opp_clear_config(drv->cpus[cpu].opp_token);
|
|
+ if (drv->cpus[cpu].opp_token > 0)
|
|
+ dev_pm_opp_clear_config(drv->cpus[cpu].opp_token);
|
|
}
|
|
}
|
|
|
|
diff --git a/drivers/firmware/qcom/qcom_scm-smc.c b/drivers/firmware/qcom/qcom_scm-smc.c
|
|
index 2b4c282..c2032e4 100644
|
|
--- a/drivers/firmware/qcom/qcom_scm-smc.c
|
|
+++ b/drivers/firmware/qcom/qcom_scm-smc.c
|
|
@@ -13,6 +13,10 @@
|
|
#include <linux/firmware/qcom/qcom_tzmem.h>
|
|
#include <linux/arm-smccc.h>
|
|
#include <linux/dma-mapping.h>
|
|
+#include <linux/mm.h>
|
|
+#ifdef CONFIG_ARM
|
|
+#include <asm/cacheflush.h>
|
|
+#endif
|
|
|
|
#include "qcom_scm.h"
|
|
|
|
@@ -156,6 +160,7 @@ int __scm_smc_call(struct device *dev, const struct qcom_scm_desc *desc,
|
|
int arglen = desc->arginfo & 0xf;
|
|
int i, ret;
|
|
void *args_virt __free(qcom_tzmem) = NULL;
|
|
+ void *early_virt __free(kfree) = NULL;
|
|
gfp_t flag = atomic ? GFP_ATOMIC : GFP_KERNEL;
|
|
u32 smccc_call_type = atomic ? ARM_SMCCC_FAST_CALL : ARM_SMCCC_STD_CALL;
|
|
u32 qcom_smccc_convention = (qcom_convention == SMC_CONVENTION_ARM_32) ?
|
|
@@ -173,27 +178,45 @@ int __scm_smc_call(struct device *dev, const struct qcom_scm_desc *desc,
|
|
smc.args[i + SCM_SMC_FIRST_REG_IDX] = desc->args[i];
|
|
|
|
if (unlikely(arglen > SCM_SMC_N_REG_ARGS)) {
|
|
- args_virt = qcom_tzmem_alloc(mempool,
|
|
- SCM_SMC_N_EXT_ARGS * sizeof(u64),
|
|
- flag);
|
|
- if (!args_virt)
|
|
- return -ENOMEM;
|
|
+ void *ext_virt;
|
|
+
|
|
+ if (mempool) {
|
|
+ args_virt = qcom_tzmem_alloc(mempool,
|
|
+ SCM_SMC_N_EXT_ARGS * sizeof(u64),
|
|
+ flag);
|
|
+ if (!args_virt)
|
|
+ return -ENOMEM;
|
|
+ ext_virt = args_virt;
|
|
+ } else {
|
|
+ /* Early SMP setup runs before qcom_scm creates its tzmem pool. */
|
|
+ early_virt = kzalloc(PAGE_SIZE, flag);
|
|
+ if (!early_virt)
|
|
+ return -ENOMEM;
|
|
+ ext_virt = early_virt;
|
|
+ }
|
|
|
|
if (qcom_smccc_convention == ARM_SMCCC_SMC_32) {
|
|
- __le32 *args = args_virt;
|
|
+ __le32 *args = ext_virt;
|
|
|
|
for (i = 0; i < SCM_SMC_N_EXT_ARGS; i++)
|
|
args[i] = cpu_to_le32(desc->args[i +
|
|
SCM_SMC_FIRST_EXT_IDX]);
|
|
} else {
|
|
- __le64 *args = args_virt;
|
|
+ __le64 *args = ext_virt;
|
|
|
|
for (i = 0; i < SCM_SMC_N_EXT_ARGS; i++)
|
|
args[i] = cpu_to_le64(desc->args[i +
|
|
SCM_SMC_FIRST_EXT_IDX]);
|
|
}
|
|
|
|
- smc.args[SCM_SMC_LAST_REG_IDX] = qcom_tzmem_to_phys(args_virt);
|
|
+ if (mempool) {
|
|
+ smc.args[SCM_SMC_LAST_REG_IDX] = qcom_tzmem_to_phys(args_virt);
|
|
+ } else {
|
|
+#ifdef CONFIG_ARM
|
|
+ __sync_cache_range_w(early_virt, PAGE_SIZE);
|
|
+#endif
|
|
+ smc.args[SCM_SMC_LAST_REG_IDX] = virt_to_phys(early_virt);
|
|
+ }
|
|
}
|
|
|
|
ret = __scm_smc_do(dev, &smc, &smc_res, atomic);
|
|
diff --git a/drivers/firmware/qcom/qcom_scm.c b/drivers/firmware/qcom/qcom_scm.c
|
|
index 2e4260b..bae849f 100644
|
|
--- a/drivers/firmware/qcom/qcom_scm.c
|
|
+++ b/drivers/firmware/qcom/qcom_scm.c
|
|
@@ -406,11 +406,10 @@ static int qcom_scm_set_boot_addr_mc(void *entry, unsigned int flags)
|
|
},
|
|
};
|
|
|
|
- /* Need a device for DMA of the additional arguments */
|
|
- if (!__scm || __get_convention() == SMC_CONVENTION_LEGACY)
|
|
+ if (__get_convention() == SMC_CONVENTION_LEGACY)
|
|
return -EOPNOTSUPP;
|
|
|
|
- return qcom_scm_call(__scm->dev, &desc, NULL);
|
|
+ return qcom_scm_call(__scm ? __scm->dev : NULL, &desc, NULL);
|
|
}
|
|
|
|
/**
|