Commit ded4feb1 authored by Rafael J. Wysocki's avatar Rafael J. Wysocki
Browse files

Merge tag 'cpufreq-arm-updates-6.19' of git://git.kernel.org/pub/scm/linux/kernel/git/vireshk/pm

Pull CPUFreq updates for 6.19 from Viresh Kumar:

"- tegra186: Add OPP / bandwidth support for Tegra186 (Aaron Kling).

 - Minor improvements to various cpufreq drivers (Christian Marangi, Hal
   Feng, Jie Zhan, Marco Crivellari, Miaoqian Lin, and Shuhao Fu)."

* tag 'cpufreq-arm-updates-6.19' of git://git.kernel.org/pub/scm/linux/kernel/git/vireshk/pm:
  cpufreq: qcom-nvmem: fix compilation warning for qcom_cpufreq_ipq806x_match_list
  cpufreq: tegra194: add WQ_PERCPU to alloc_workqueue users
  cpufreq: qcom-nvmem: add compatible fallback for ipq806x for no SMEM
  cpufreq: CPPC: Don't warn if FIE init fails to read counters
  cpufreq: nforce2: fix reference count leak in nforce2
  cpufreq: tegra186: add OPP support and set bandwidth
  cpufreq: dt-platdev: Add JH7110S SOC to the allowlist
  cpufreq: s5pv210: fix refcount leak
parents 1b541e10 c3852d2c
Loading
Loading
Loading
Loading
+8 −9
Original line number Diff line number Diff line
@@ -142,15 +142,14 @@ static void cppc_cpufreq_cpu_fie_init(struct cpufreq_policy *policy)
		init_irq_work(&cppc_fi->irq_work, cppc_irq_work);

		ret = cppc_get_perf_ctrs(cpu, &cppc_fi->prev_perf_fb_ctrs);
		if (ret) {
			pr_warn("%s: failed to read perf counters for cpu:%d: %d\n",
				__func__, cpu, ret);

		/*
			 * Don't abort if the CPU was offline while the driver
			 * was getting registered.
		 * Don't abort as the CPU was offline while the driver was
		 * getting registered.
		 */
			if (cpu_online(cpu))
		if (ret && cpu_online(cpu)) {
			pr_debug("%s: failed to read perf counters for cpu:%d: %d\n",
				__func__, cpu, ret);
			return;
		}
	}
+1 −0
Original line number Diff line number Diff line
@@ -87,6 +87,7 @@ static const struct of_device_id allowlist[] __initconst = {
	{ .compatible = "st-ericsson,u9540", },

	{ .compatible = "starfive,jh7110", },
	{ .compatible = "starfive,jh7110s", },

	{ .compatible = "ti,omap2", },
	{ .compatible = "ti,omap4", },
+3 −0
Original line number Diff line number Diff line
@@ -145,6 +145,8 @@ static unsigned int nforce2_fsb_read(int bootfsb)
	pci_read_config_dword(nforce2_sub5, NFORCE2_BOOTFSB, &fsb);
	fsb /= 1000000;

	pci_dev_put(nforce2_sub5);

	/* Check if PLL register is already set */
	pci_read_config_byte(nforce2_dev, NFORCE2_PLLENABLE, (u8 *)&temp);

@@ -426,6 +428,7 @@ static int __init nforce2_init(void)
static void __exit nforce2_exit(void)
{
	cpufreq_unregister_driver(&nforce2_driver);
	pci_dev_put(nforce2_dev);
}

module_init(nforce2_init);
+33 −2
Original line number Diff line number Diff line
@@ -256,13 +256,22 @@ static int qcom_cpufreq_krait_name_version(struct device *cpu_dev,
	return ret;
}

static const struct of_device_id qcom_cpufreq_ipq806x_match_list[] __maybe_unused = {
	{ .compatible = "qcom,ipq8062", .data = (const void *)QCOM_ID_IPQ8062 },
	{ .compatible = "qcom,ipq8064", .data = (const void *)QCOM_ID_IPQ8064 },
	{ .compatible = "qcom,ipq8065", .data = (const void *)QCOM_ID_IPQ8065 },
	{ .compatible = "qcom,ipq8066", .data = (const void *)QCOM_ID_IPQ8066 },
	{ .compatible = "qcom,ipq8068", .data = (const void *)QCOM_ID_IPQ8068 },
	{ .compatible = "qcom,ipq8069", .data = (const void *)QCOM_ID_IPQ8069 },
};

static int qcom_cpufreq_ipq8064_name_version(struct device *cpu_dev,
					     struct nvmem_cell *speedbin_nvmem,
					     char **pvs_name,
					     struct qcom_cpufreq_drv *drv)
{
	int msm_id = -1, ret = 0;
	int speed = 0, pvs = 0;
	int msm_id, ret = 0;
	u8 *speedbin;
	size_t len;

@@ -279,8 +288,30 @@ static int qcom_cpufreq_ipq8064_name_version(struct device *cpu_dev,
	get_krait_bin_format_a(cpu_dev, &speed, &pvs, speedbin);

	ret = qcom_smem_get_soc_id(&msm_id);
	if (ret)
	if (ret == -ENODEV) {
		const struct of_device_id *match;
		struct device_node *root;

		root = of_find_node_by_path("/");
		if (!root) {
			ret = -ENODEV;
			goto exit;
		}

		/* Fallback to compatible match with no SMEM initialized */
		match = of_match_node(qcom_cpufreq_ipq806x_match_list, root);
		of_node_put(root);
		if (!match) {
			ret = -ENODEV;
			goto exit;
		}

		/* We found a matching device, get the msm_id from the data entry */
		msm_id = (int)(uintptr_t)match->data;
		ret = 0;
	} else if (ret) {
		goto exit;
	}

	switch (msm_id) {
	case QCOM_ID_IPQ8062:
+4 −2
Original line number Diff line number Diff line
@@ -518,7 +518,7 @@ static int s5pv210_cpu_init(struct cpufreq_policy *policy)

	if (policy->cpu != 0) {
		ret = -EINVAL;
		goto out_dmc1;
		goto out;
	}

	/*
@@ -530,7 +530,7 @@ static int s5pv210_cpu_init(struct cpufreq_policy *policy)
	if ((mem_type != LPDDR) && (mem_type != LPDDR2)) {
		pr_err("CPUFreq doesn't support this memory type\n");
		ret = -EINVAL;
		goto out_dmc1;
		goto out;
	}

	/* Find current refresh counter and frequency each DMC */
@@ -544,6 +544,8 @@ static int s5pv210_cpu_init(struct cpufreq_policy *policy)
	cpufreq_generic_init(policy, s5pv210_freq_table, 40000);
	return 0;

out:
	clk_put(dmc1_clk);
out_dmc1:
	clk_put(dmc0_clk);
out_dmc0:
Loading