mirror of
https://github.com/coolsnowwolf/lede.git
synced 2025-04-16 14:23:38 +00:00

* kernel: bump 5.10 to 5.10.65 Manually refreshed: generic/pending-5.10/800-bcma-get-SoC-device-struct-copy-its-DMA-params-to-th.patch bcm27xx/patches-5.10/950-0053-firmware-bcm2835-Support-ARCH_BCM270x.patch bcm27xx/patches-5.10/950-0087-firmware-raspberrypi-Add-backward-compatible-get_thr.patch Signed-off-by: Rui Salvaterra <rsalvaterra@gmail.com> * kernel: bump 5.10 to 5.10.66 No patches refreshed. Signed-off-by: Rui Salvaterra <rsalvaterra@gmail.com> * kernel: bump 5.10 to 5.10.67 Deleted (upstreamed): bcm27xx/patches-5.10/950-0312-vc4_hdmi-Set-HD_CTL_WHOLSMP-and-HD_CTL_CHALIGN_SET.patch Signed-off-by: Rui Salvaterra <rsalvaterra@gmail.com> * kernel: bump 5.10 to 5.10.68 Deleted (upstreamed): generic/backport-5.10/610-v5.13-02-netfilter-Fix-fall-through-warnings-for-Clang.patch generic/backport-5.10/792-v5.15-0001-net-dsa-b53-Fix-calculating-number-of-switch-ports.patch generic/backport-5.10/792-v5.15-0002-net-dsa-b53-Set-correct-number-of-ports-in-the-DSA-s.patch generic/backport-5.10/792-v5.15-0003-net-dsa-b53-Fix-IMP-port-setup-on-BCM5301x.patch generic/backport-5.10/840-0001-PCI-of-Don-t-fail-devm_pci_alloc_host_bridge-on-miss.patch generic/backport-5.10/840-0002-PCI-iproc-Fix-BCMA-probe-resource-handling.patch generic/pending-5.10/498-mtd-mtdconcat-select-readwrite-function.patch Signed-off-by: Rui Salvaterra <rsalvaterra@gmail.com> * kernel: bump 5.10 to 5.10.69 Patches automatically refreshed. Signed-off-by: Rui Salvaterra <rsalvaterra@gmail.com> * kernel: bump 5.10 to 5.10.70 Deleted (upstreamed): bcm53xx/patches-5.10/181-Revert-USB-bcma-Add-a-check-for-devm_gpiod_get.patch Signed-off-by: Rui Salvaterra <rsalvaterra@gmail.com> Co-authored-by: Rui Salvaterra <rsalvaterra@gmail.com>
102 lines
3.2 KiB
Diff
102 lines
3.2 KiB
Diff
From ab759f3138e5ea798e93003e6ce0ffe66ac2970f Mon Sep 17 00:00:00 2001
|
|
From: Dave Stevenson <dave.stevenson@raspberrypi.org>
|
|
Date: Thu, 10 Jan 2019 17:58:06 +0000
|
|
Subject: [PATCH] firmware: raspberrypi: Report the fw variant during
|
|
probe
|
|
|
|
The driver already reported the firmware build date during probe.
|
|
The mailbox calls have been extended to also report the variant
|
|
1 = standard start.elf
|
|
2 = start_x.elf (includes camera stack)
|
|
3 = start_db.elf (includes assert logging)
|
|
4 = start_cd.elf (cutdown version for smallest memory footprint).
|
|
Log the variant during probe.
|
|
|
|
Signed-off-by: Dave Stevenson <dave.stevenson@raspberrypi.org>
|
|
|
|
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 | 40 +++++++++++++++++++++-
|
|
include/soc/bcm2835/raspberrypi-firmware.h | 2 ++
|
|
2 files changed, 41 insertions(+), 1 deletion(-)
|
|
|
|
--- a/drivers/firmware/raspberrypi.c
|
|
+++ b/drivers/firmware/raspberrypi.c
|
|
@@ -234,6 +234,15 @@ rpi_firmware_print_firmware_revision(str
|
|
{
|
|
time64_t date_and_time;
|
|
u32 packet;
|
|
+ static const char * const variant_strs[] = {
|
|
+ "unknown",
|
|
+ "start",
|
|
+ "start_x",
|
|
+ "start_db",
|
|
+ "start_cd",
|
|
+ };
|
|
+ const char *variant_str = "cmd unsupported";
|
|
+ u32 variant;
|
|
int ret = rpi_firmware_property(fw,
|
|
RPI_FIRMWARE_GET_FIRMWARE_REVISION,
|
|
&packet, sizeof(packet));
|
|
@@ -243,7 +252,35 @@ rpi_firmware_print_firmware_revision(str
|
|
|
|
/* This is not compatible with y2038 */
|
|
date_and_time = packet;
|
|
- dev_info(fw->cl.dev, "Attached to firmware from %ptT\n", &date_and_time);
|
|
+
|
|
+ ret = rpi_firmware_property(fw, RPI_FIRMWARE_GET_FIRMWARE_VARIANT,
|
|
+ &variant, sizeof(variant));
|
|
+
|
|
+ if (!ret) {
|
|
+ if (variant >= ARRAY_SIZE(variant_strs))
|
|
+ variant = 0;
|
|
+ variant_str = variant_strs[variant];
|
|
+ }
|
|
+
|
|
+ dev_info(fw->cl.dev,
|
|
+ "Attached to firmware from %ptT, variant %s\n",
|
|
+ &date_and_time, variant_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
|
|
@@ -332,6 +369,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);
|
|
rpi_register_clk_driver(dev);
|
|
|
|
--- a/include/soc/bcm2835/raspberrypi-firmware.h
|
|
+++ b/include/soc/bcm2835/raspberrypi-firmware.h
|
|
@@ -38,6 +38,8 @@ struct rpi_firmware_property_tag_header
|
|
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,
|