aboutsummaryrefslogtreecommitdiffstats
path: root/target/linux/brcm2708/patches-4.19/950-0296-firmware-raspberrypi-Report-the-fw-git-hash-during-p.patch
diff options
context:
space:
mode:
authorÁlvaro Fernández Rojas <noltari@gmail.com>2019-07-09 20:32:28 +0200
committerÁlvaro Fernández Rojas <noltari@gmail.com>2019-07-14 12:44:14 +0200
commit42954857190b9df16d9d873ecc7f6cc38e013e44 (patch)
tree98c588f629ff534d458eb0884782ea99672d7634 /target/linux/brcm2708/patches-4.19/950-0296-firmware-raspberrypi-Report-the-fw-git-hash-during-p.patch
parentf1875e902d0afb7d9b9e5285b4fd8da7f6c5e30a (diff)
downloadupstream-42954857190b9df16d9d873ecc7f6cc38e013e44.tar.gz
upstream-42954857190b9df16d9d873ecc7f6cc38e013e44.tar.bz2
upstream-42954857190b9df16d9d873ecc7f6cc38e013e44.zip
brcm2708: add linux 4.19 support
Boot tested on Raspberry Pi B+ (BCM2708) and Raspberry Pi 2 (BCM2709) Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
Diffstat (limited to 'target/linux/brcm2708/patches-4.19/950-0296-firmware-raspberrypi-Report-the-fw-git-hash-during-p.patch')
-rw-r--r--target/linux/brcm2708/patches-4.19/950-0296-firmware-raspberrypi-Report-the-fw-git-hash-during-p.patch58
1 files changed, 58 insertions, 0 deletions
diff --git a/target/linux/brcm2708/patches-4.19/950-0296-firmware-raspberrypi-Report-the-fw-git-hash-during-p.patch b/target/linux/brcm2708/patches-4.19/950-0296-firmware-raspberrypi-Report-the-fw-git-hash-during-p.patch
new file mode 100644
index 0000000000..8194883bd2
--- /dev/null
+++ b/target/linux/brcm2708/patches-4.19/950-0296-firmware-raspberrypi-Report-the-fw-git-hash-during-p.patch
@@ -0,0 +1,58 @@
+From 66d4a3ecb20bca91bc9e209cc8dc7730dffb0b57 Mon Sep 17 00:00:00 2001
+From: Dave Stevenson <dave.stevenson@raspberrypi.org>
+Date: Thu, 10 Jan 2019 18:48:54 +0000
+Subject: [PATCH 296/703] firmware: raspberrypi: Report the fw git hash during
+ probe
+
+The firmware can now report the git hash from which it was built
+via the mailbox, so report it during probe.
+
+Signed-off-by: Dave Stevenson <dave.stevenson@raspberrypi.org>
+---
+ drivers/firmware/raspberrypi.c | 17 +++++++++++++++++
+ include/soc/bcm2835/raspberrypi-firmware.h | 1 +
+ 2 files changed, 18 insertions(+)
+
+--- a/drivers/firmware/raspberrypi.c
++++ b/drivers/firmware/raspberrypi.c
+@@ -263,6 +263,22 @@ rpi_firmware_print_firmware_revision(str
+ }
+
+ static void
++rpi_firmware_print_firmware_hash(struct rpi_firmware *fw)
++{
++ u32 hash[5];
++ int ret = rpi_firmware_property(fw,
++ RPI_FIRMWARE_GET_FIRMWARE_HASH,
++ hash, sizeof(hash));
++
++ if (ret)
++ return;
++
++ dev_info(fw->cl.dev,
++ "Firmware hash is %08x%08x%08x%08x%08x\n",
++ hash[0], hash[1], hash[2], hash[3], hash[4]);
++}
++
++static void
+ rpi_register_hwmon_driver(struct device *dev, struct rpi_firmware *fw)
+ {
+ u32 packet;
+@@ -308,6 +324,7 @@ static int rpi_firmware_probe(struct pla
+ g_pdev = pdev;
+
+ rpi_firmware_print_firmware_revision(fw);
++ rpi_firmware_print_firmware_hash(fw);
+ rpi_register_hwmon_driver(dev, fw);
+
+ return 0;
+--- a/include/soc/bcm2835/raspberrypi-firmware.h
++++ b/include/soc/bcm2835/raspberrypi-firmware.h
+@@ -42,6 +42,7 @@ enum rpi_firmware_property_tag {
+ RPI_FIRMWARE_PROPERTY_END = 0,
+ RPI_FIRMWARE_GET_FIRMWARE_REVISION = 0x00000001,
+ RPI_FIRMWARE_GET_FIRMWARE_VARIANT = 0x00000002,
++ RPI_FIRMWARE_GET_FIRMWARE_HASH = 0x00000003,
+
+ RPI_FIRMWARE_SET_CURSOR_INFO = 0x00008010,
+ RPI_FIRMWARE_SET_CURSOR_STATE = 0x00008011,