1 From 9abde0ff52268580501b3120629f3c92f0e5d589 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] 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,