Home Home > GIT Browse
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMatthias Brugger <mbrugger@suse.com>2018-10-10 17:59:05 +0200
committerMatthias Brugger <mbrugger@suse.com>2018-10-11 12:44:29 +0200
commitc6c535a0884cf19dd26a5913f61fccd6890e14db (patch)
treebc22966cac2e71a9c3147714a44f4f049266f702
parent987dd44700b00284bef06156b0cecf93fe88813b (diff)
ARM: bcm2835: Add GET_THROTTLED firmware property (bsc#1108468).
-rw-r--r--patches.drivers/ARM-bcm2835-Add-GET_THROTTLED-firmware-property.patch40
-rw-r--r--series.conf1
2 files changed, 41 insertions, 0 deletions
diff --git a/patches.drivers/ARM-bcm2835-Add-GET_THROTTLED-firmware-property.patch b/patches.drivers/ARM-bcm2835-Add-GET_THROTTLED-firmware-property.patch
new file mode 100644
index 0000000000..45e0337b22
--- /dev/null
+++ b/patches.drivers/ARM-bcm2835-Add-GET_THROTTLED-firmware-property.patch
@@ -0,0 +1,40 @@
+From: Stefan Wahren <stefan.wahren@i2se.com>
+Date: Fri, 25 May 2018 21:24:34 +0200
+Subject: ARM: bcm2835: Add GET_THROTTLED firmware property
+Git-commit: be3035e3627d2570de4c2c612ecd095968986437
+Patch-mainline: v4.19-rc1
+References: bsc#1108468
+
+Recent Raspberry Pi firmware provides a mailbox property to detect
+under-voltage conditions. Here is the current definition.
+
+The u32 value returned by the firmware is divided into 2 parts:
+ - lower 16-bits are the live value
+ - upper 16-bits are the history or sticky value
+
+ Bits:
+ 0: undervoltage
+ 1: arm frequency capped
+ 2: currently throttled
+ 16: undervoltage has occurred
+ 17: arm frequency capped has occurred
+ 18: throttling has occurred
+
+Signed-off-by: Stefan Wahren <stefan.wahren@i2se.com>
+Signed-off-by: Eric Anholt <eric@anholt.net>
+Reviewed-by: Eric Anholt <eric@anholt.net>
+Signed-off-by: Matthias Brugger <mbrugger@suse.com>
+---
+ include/soc/bcm2835/raspberrypi-firmware.h | 1 +
+ 1 file changed, 1 insertion(+)
+
+--- a/include/soc/bcm2835/raspberrypi-firmware.h
++++ b/include/soc/bcm2835/raspberrypi-firmware.h
+@@ -73,6 +73,7 @@ enum rpi_firmware_property_tag {
+ RPI_FIRMWARE_GET_DISPMANX_RESOURCE_MEM_HANDLE = 0x00030014,
+ RPI_FIRMWARE_GET_EDID_BLOCK = 0x00030020,
+ RPI_FIRMWARE_GET_DOMAIN_STATE = 0x00030030,
++ RPI_FIRMWARE_GET_THROTTLED = 0x00030046,
+ RPI_FIRMWARE_SET_CLOCK_STATE = 0x00038001,
+ RPI_FIRMWARE_SET_CLOCK_RATE = 0x00038002,
+ RPI_FIRMWARE_SET_VOLTAGE = 0x00038003,
diff --git a/series.conf b/series.conf
index 655b8a5ad1..70daf8450d 100644
--- a/series.conf
+++ b/series.conf
@@ -17557,6 +17557,7 @@
patches.arch/ARM-hisi-handle-of_iomap-and-fix-missing-of_node_put.patch
patches.arch/ARM-imx-flag-failure-of-of_iomap.patch
patches.arch/ARM-exynos-Clear-global-variable-on-init-error-path.patch
+ patches.drivers/ARM-bcm2835-Add-GET_THROTTLED-firmware-property.patch
patches.drivers/soc-mediatek-pwrap-fix-cipher-init-setting-error.patch
patches.drivers/IB-hfi1-Invalid-NUMA-node-information-can-cause-a-di.patch
patches.drivers/fbdev-Distinguish-between-interlaced-and-progressive.patch