mirror of
https://github.com/openwrt/openwrt.git
synced 2024-12-26 08:51:13 +00:00
7d7aa2fd92
This change makes the names of Broadcom targets consistent by using the common notation based on SoC/CPU ID (which is used internally anyway), bcmXXXX instead of brcmXXXX. This is even used for target TITLE in make menuconfig already, only the short target name used brcm so far. Despite, since subtargets range from bcm2708 to bcm2711, it seems appropriate to use bcm27xx instead of bcm2708 (again, as already done for BOARDNAME). This also renames the packages brcm2708-userland and brcm2708-gpu-fw. Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de> Acked-by: Álvaro Fernández Rojas <noltari@gmail.com>
80 lines
2.6 KiB
Diff
80 lines
2.6 KiB
Diff
From dfd66230d2d538e7f290436d2952124d6eadeb3d 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>
|
|
---
|
|
drivers/firmware/raspberrypi.c | 32 +++++++++++++++++-----
|
|
include/soc/bcm2835/raspberrypi-firmware.h | 1 +
|
|
2 files changed, 26 insertions(+), 7 deletions(-)
|
|
|
|
--- a/drivers/firmware/raspberrypi.c
|
|
+++ b/drivers/firmware/raspberrypi.c
|
|
@@ -227,21 +227,39 @@ static const struct attribute_group rpi_
|
|
static void
|
|
rpi_firmware_print_firmware_revision(struct rpi_firmware *fw)
|
|
{
|
|
+ static const char * const variant_strs[] = {
|
|
+ "unknown",
|
|
+ "start",
|
|
+ "start_x",
|
|
+ "start_db",
|
|
+ "start_cd",
|
|
+ };
|
|
+ const char *variant_str = "cmd unsupported";
|
|
u32 packet;
|
|
+ u32 variant;
|
|
+ struct tm tm;
|
|
int ret = rpi_firmware_property(fw,
|
|
RPI_FIRMWARE_GET_FIRMWARE_REVISION,
|
|
&packet, sizeof(packet));
|
|
|
|
- if (ret == 0) {
|
|
- struct tm tm;
|
|
+ if (ret)
|
|
+ return;
|
|
|
|
- time64_to_tm(packet, 0, &tm);
|
|
+ ret = rpi_firmware_property(fw, RPI_FIRMWARE_GET_FIRMWARE_VARIANT,
|
|
+ &variant, sizeof(variant));
|
|
|
|
- dev_info(fw->cl.dev,
|
|
- "Attached to firmware from %04ld-%02d-%02d %02d:%02d\n",
|
|
- tm.tm_year + 1900, tm.tm_mon + 1, tm.tm_mday,
|
|
- tm.tm_hour, tm.tm_min);
|
|
+ if (!ret) {
|
|
+ if (variant >= ARRAY_SIZE(variant_strs))
|
|
+ variant = 0;
|
|
+ variant_str = variant_strs[variant];
|
|
}
|
|
+
|
|
+ time64_to_tm(packet, 0, &tm);
|
|
+
|
|
+ dev_info(fw->cl.dev,
|
|
+ "Attached to firmware from %04ld-%02d-%02d %02d:%02d, variant %s\n",
|
|
+ tm.tm_year + 1900, tm.tm_mon + 1, tm.tm_mday, tm.tm_hour,
|
|
+ tm.tm_min, variant_str);
|
|
}
|
|
|
|
static void
|
|
--- a/include/soc/bcm2835/raspberrypi-firmware.h
|
|
+++ b/include/soc/bcm2835/raspberrypi-firmware.h
|
|
@@ -41,6 +41,7 @@ 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_SET_CURSOR_INFO = 0x00008010,
|
|
RPI_FIRMWARE_SET_CURSOR_STATE = 0x00008011,
|