Skip to content

Commit b55eef5

Browse files
cris-marafaeljw
authored andcommitted
powercap: arm_scmi: Add SCMI Powercap based driver
Add a powercap driver that, using the ARM SCMI Protocol to query the SCMI platform firmware for the list of existing Powercap domains, registers all of such discovered domains under the new 'arm-scmi' powercap control type. A new simple powercap zone and constraint is registered for all the SCMI powercap zones that are found. Reviewed-by: Lukasz Luba <lukasz.luba@arm.com> Signed-off-by: Cristian Marussi <cristian.marussi@arm.com> Acked-by: Sudeep Holla <sudeep.holla@arm.com> Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
1 parent 247f34f commit b55eef5

4 files changed

Lines changed: 524 additions & 0 deletions

File tree

MAINTAINERS

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19977,6 +19977,7 @@ F: drivers/clk/clk-sc[mp]i.c
1997719977
F: drivers/cpufreq/sc[mp]i-cpufreq.c
1997819978
F: drivers/firmware/arm_scmi/
1997919979
F: drivers/firmware/arm_scpi.c
19980+
F: drivers/powercap/arm_scmi_powercap.c
1998019981
F: drivers/regulator/scmi-regulator.c
1998119982
F: drivers/reset/reset-scmi.c
1998219983
F: include/linux/sc[mp]i_protocol.h

drivers/powercap/Kconfig

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,19 @@ config IDLE_INJECT
4444
synchronously on a set of specified CPUs or alternatively
4545
on a per CPU basis.
4646

47+
config ARM_SCMI_POWERCAP
48+
tristate "ARM SCMI Powercap driver"
49+
depends on ARM_SCMI_PROTOCOL
50+
help
51+
This enables support for the ARM Powercap based on ARM SCMI
52+
Powercap protocol.
53+
54+
ARM SCMI Powercap protocol allows power limits to be enforced
55+
and monitored against the SCMI Powercap domains advertised as
56+
available by the SCMI platform firmware.
57+
58+
When compiled as module it will be called arm_scmi_powercap.ko.
59+
4760
config DTPM
4861
bool "Power capping for Dynamic Thermal Power Management (EXPERIMENTAL)"
4962
depends on OF

drivers/powercap/Makefile

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,3 +6,4 @@ obj-$(CONFIG_POWERCAP) += powercap_sys.o
66
obj-$(CONFIG_INTEL_RAPL_CORE) += intel_rapl_common.o
77
obj-$(CONFIG_INTEL_RAPL) += intel_rapl_msr.o
88
obj-$(CONFIG_IDLE_INJECT) += idle_inject.o
9+
obj-$(CONFIG_ARM_SCMI_POWERCAP) += arm_scmi_powercap.o

0 commit comments

Comments
 (0)