1 From 6a9b19e48f8503ca3ac0c4ef29f34d6b6a96dfac Mon Sep 17 00:00:00 2001
2 From: Dave Stevenson <dave.stevenson@raspberrypi.org>
3 Date: Thu, 10 Jan 2019 18:48:54 +0000
4 Subject: [PATCH 293/725] firmware: raspberrypi: Report the fw git hash during
7 The firmware can now report the git hash from which it was built
8 via the mailbox, so report it during probe.
10 Signed-off-by: Dave Stevenson <dave.stevenson@raspberrypi.org>
12 drivers/firmware/raspberrypi.c | 17 +++++++++++++++++
13 include/soc/bcm2835/raspberrypi-firmware.h | 1 +
14 2 files changed, 18 insertions(+)
16 --- a/drivers/firmware/raspberrypi.c
17 +++ b/drivers/firmware/raspberrypi.c
18 @@ -263,6 +263,22 @@ rpi_firmware_print_firmware_revision(str
22 +rpi_firmware_print_firmware_hash(struct rpi_firmware *fw)
25 + int ret = rpi_firmware_property(fw,
26 + RPI_FIRMWARE_GET_FIRMWARE_HASH,
27 + hash, sizeof(hash));
32 + dev_info(fw->cl.dev,
33 + "Firmware hash is %08x%08x%08x%08x%08x\n",
34 + hash[0], hash[1], hash[2], hash[3], hash[4]);
38 rpi_register_hwmon_driver(struct device *dev, struct rpi_firmware *fw)
41 @@ -308,6 +324,7 @@ static int rpi_firmware_probe(struct pla
44 rpi_firmware_print_firmware_revision(fw);
45 + rpi_firmware_print_firmware_hash(fw);
46 rpi_register_hwmon_driver(dev, fw);
49 --- a/include/soc/bcm2835/raspberrypi-firmware.h
50 +++ b/include/soc/bcm2835/raspberrypi-firmware.h
51 @@ -42,6 +42,7 @@ enum rpi_firmware_property_tag {
52 RPI_FIRMWARE_PROPERTY_END = 0,
53 RPI_FIRMWARE_GET_FIRMWARE_REVISION = 0x00000001,
54 RPI_FIRMWARE_GET_FIRMWARE_VARIANT = 0x00000002,
55 + RPI_FIRMWARE_GET_FIRMWARE_HASH = 0x00000003,
57 RPI_FIRMWARE_SET_CURSOR_INFO = 0x00008010,
58 RPI_FIRMWARE_SET_CURSOR_STATE = 0x00008011,