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

Merge branches 'pm-core', 'powercap', 'pm-opp', 'pm-avs' and 'pm-misc'

* pm-core:
  PM-runtime: add tracepoints for usage_count changes

* powercap:
  powercap/intel_rapl: add support for JasperLake
  x86/cpu: Add Jasper Lake to Intel family
  powercap/intel_rapl: add support for TigerLake Mobile

* pm-opp:
  opp: Replace list_kref with a local counter
  opp: Free static OPPs on errors while adding them

* pm-avs:
  power: avs: qcom-cpr: remove duplicated include from qcom-cpr.c
  power: avs: fix uninitialized error return on failed cpr_read_fuse_uV() call
  power: avs: qcom-cpr: make cpr_get_opp_hz_for_req() static
  power: avs: qcom-cpr: remove set but unused variable
  power: avs: qcom-cpr: make sure that regmap is available
  power: avs: qcom-cpr: fix unsigned expression compared with zero
  power: avs: qcom-cpr: fix invalid printk specifier in debug print
  power: avs: Add support for CPR (Core Power Reduction)
  dt-bindings: power: avs: Add support for CPR (Core Power Reduction)

* pm-misc:
  mailmap: Add entry for <rjw@sisk.pl>
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -217,6 +217,7 @@ Praveen BP <praveenbp@ti.com>
Punit Agrawal <punitagrawal@gmail.com> <punit.agrawal@arm.com>
Qais Yousef <qsyousef@gmail.com> <qais.yousef@imgtec.com>
Quentin Perret <qperret@qperret.net> <quentin.perret@arm.com>
Rafael J. Wysocki <rjw@rjwysocki.net> <rjw@sisk.pl>
Rajesh Shah <rajesh.shah@intel.com>
Ralf Baechle <ralf@linux-mips.org>
Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
+130 −0
Original line number Diff line number Diff line
QCOM CPR (Core Power Reduction)

CPR (Core Power Reduction) is a technology to reduce core power on a CPU
or other device. Each OPP of a device corresponds to a "corner" that has
a range of valid voltages for a particular frequency. While the device is
running at a particular frequency, CPR monitors dynamic factors such as
temperature, etc. and suggests adjustments to the voltage to save power
and meet silicon characteristic requirements.

- compatible:
	Usage: required
	Value type: <string>
	Definition: should be "qcom,qcs404-cpr", "qcom,cpr" for qcs404

- reg:
	Usage: required
	Value type: <prop-encoded-array>
	Definition: base address and size of the rbcpr register region

- interrupts:
	Usage: required
	Value type: <prop-encoded-array>
	Definition: should specify the CPR interrupt

- clocks:
	Usage: required
	Value type: <prop-encoded-array>
	Definition: phandle to the reference clock

- clock-names:
	Usage: required
	Value type: <stringlist>
	Definition: must be "ref"

- vdd-apc-supply:
	Usage: required
	Value type: <phandle>
	Definition: phandle to the vdd-apc-supply regulator

- #power-domain-cells:
	Usage: required
	Value type: <u32>
	Definition: should be 0

- operating-points-v2:
	Usage: required
	Value type: <phandle>
	Definition: A phandle to the OPP table containing the
		    performance states supported by the CPR
		    power domain

- acc-syscon:
	Usage: optional
	Value type: <phandle>
	Definition: phandle to syscon for writing ACC settings

- nvmem-cells:
	Usage: required
	Value type: <phandle>
	Definition: phandle to nvmem cells containing the data
		    that makes up a fuse corner, for each fuse corner.
		    As well as the CPR fuse revision.

- nvmem-cell-names:
	Usage: required
	Value type: <stringlist>
	Definition: should be "cpr_quotient_offset1", "cpr_quotient_offset2",
		    "cpr_quotient_offset3", "cpr_init_voltage1",
		    "cpr_init_voltage2", "cpr_init_voltage3", "cpr_quotient1",
		    "cpr_quotient2", "cpr_quotient3", "cpr_ring_osc1",
		    "cpr_ring_osc2", "cpr_ring_osc3", "cpr_fuse_revision"
		    for qcs404.

Example:

	cpr_opp_table: cpr-opp-table {
		compatible = "operating-points-v2-qcom-level";

		cpr_opp1: opp1 {
			opp-level = <1>;
			qcom,opp-fuse-level = <1>;
		};
		cpr_opp2: opp2 {
			opp-level = <2>;
			qcom,opp-fuse-level = <2>;
		};
		cpr_opp3: opp3 {
			opp-level = <3>;
			qcom,opp-fuse-level = <3>;
		};
	};

	power-controller@b018000 {
		compatible = "qcom,qcs404-cpr", "qcom,cpr";
		reg = <0x0b018000 0x1000>;
		interrupts = <0 15 IRQ_TYPE_EDGE_RISING>;
		clocks = <&xo_board>;
		clock-names = "ref";
		vdd-apc-supply = <&pms405_s3>;
		#power-domain-cells = <0>;
		operating-points-v2 = <&cpr_opp_table>;
		acc-syscon = <&tcsr>;

		nvmem-cells = <&cpr_efuse_quot_offset1>,
			<&cpr_efuse_quot_offset2>,
			<&cpr_efuse_quot_offset3>,
			<&cpr_efuse_init_voltage1>,
			<&cpr_efuse_init_voltage2>,
			<&cpr_efuse_init_voltage3>,
			<&cpr_efuse_quot1>,
			<&cpr_efuse_quot2>,
			<&cpr_efuse_quot3>,
			<&cpr_efuse_ring1>,
			<&cpr_efuse_ring2>,
			<&cpr_efuse_ring3>,
			<&cpr_efuse_revision>;
		nvmem-cell-names = "cpr_quotient_offset1",
			"cpr_quotient_offset2",
			"cpr_quotient_offset3",
			"cpr_init_voltage1",
			"cpr_init_voltage2",
			"cpr_init_voltage3",
			"cpr_quotient1",
			"cpr_quotient2",
			"cpr_quotient3",
			"cpr_ring_osc1",
			"cpr_ring_osc2",
			"cpr_ring_osc3",
			"cpr_fuse_revision";
	};
+8 −0
Original line number Diff line number Diff line
@@ -13671,6 +13671,14 @@ S: Maintained
F:	Documentation/devicetree/bindings/opp/qcom-nvmem-cpufreq.txt
F:	drivers/cpufreq/qcom-cpufreq-nvmem.c
QUALCOMM CORE POWER REDUCTION (CPR) AVS DRIVER
M:	Niklas Cassel <nks@flawful.org>
L:	linux-pm@vger.kernel.org
L:	linux-arm-msm@vger.kernel.org
S:	Maintained
F:	Documentation/devicetree/bindings/power/avs/qcom,cpr.txt
F:	drivers/power/avs/qcom-cpr.c
QUALCOMM EMAC GIGABIT ETHERNET DRIVER
M:	Timur Tabi <timur@kernel.org>
L:	netdev@vger.kernel.org
+1 −0
Original line number Diff line number Diff line
@@ -111,6 +111,7 @@

#define INTEL_FAM6_ATOM_TREMONT_D	0x86 /* Jacobsville */
#define INTEL_FAM6_ATOM_TREMONT		0x96 /* Elkhart Lake */
#define INTEL_FAM6_ATOM_TREMONT_L	0x9C /* Jasper Lake */

/* Xeon Phi */

+11 −2
Original line number Diff line number Diff line
@@ -1006,9 +1006,11 @@ int __pm_runtime_idle(struct device *dev, int rpmflags)
	int retval;

	if (rpmflags & RPM_GET_PUT) {
		if (!atomic_dec_and_test(&dev->power.usage_count))
		if (!atomic_dec_and_test(&dev->power.usage_count)) {
			trace_rpm_usage_rcuidle(dev, rpmflags);
			return 0;
		}
	}

	might_sleep_if(!(rpmflags & RPM_ASYNC) && !dev->power.irq_safe);

@@ -1038,9 +1040,11 @@ int __pm_runtime_suspend(struct device *dev, int rpmflags)
	int retval;

	if (rpmflags & RPM_GET_PUT) {
		if (!atomic_dec_and_test(&dev->power.usage_count))
		if (!atomic_dec_and_test(&dev->power.usage_count)) {
			trace_rpm_usage_rcuidle(dev, rpmflags);
			return 0;
		}
	}

	might_sleep_if(!(rpmflags & RPM_ASYNC) && !dev->power.irq_safe);

@@ -1101,6 +1105,7 @@ int pm_runtime_get_if_in_use(struct device *dev)
	retval = dev->power.disable_depth > 0 ? -EINVAL :
		dev->power.runtime_status == RPM_ACTIVE
			&& atomic_inc_not_zero(&dev->power.usage_count);
	trace_rpm_usage_rcuidle(dev, 0);
	spin_unlock_irqrestore(&dev->power.lock, flags);
	return retval;
}
@@ -1434,6 +1439,8 @@ void pm_runtime_allow(struct device *dev)
	dev->power.runtime_auto = true;
	if (atomic_dec_and_test(&dev->power.usage_count))
		rpm_idle(dev, RPM_AUTO | RPM_ASYNC);
	else
		trace_rpm_usage_rcuidle(dev, RPM_AUTO | RPM_ASYNC);

 out:
	spin_unlock_irq(&dev->power.lock);
@@ -1501,6 +1508,8 @@ static void update_autosuspend(struct device *dev, int old_delay, int old_use)
		if (!old_use || old_delay >= 0) {
			atomic_inc(&dev->power.usage_count);
			rpm_resume(dev, 0);
		} else {
			trace_rpm_usage_rcuidle(dev, 0);
		}
	}

Loading