summaryrefslogtreecommitdiffstats
path: root/external/meta-updater-raspberrypi/recipes-bsp/u-boot/files/0001-board-raspberrypi-add-serial-and-revision-to-the-dev.patch
diff options
context:
space:
mode:
Diffstat (limited to 'external/meta-updater-raspberrypi/recipes-bsp/u-boot/files/0001-board-raspberrypi-add-serial-and-revision-to-the-dev.patch')
-rw-r--r--external/meta-updater-raspberrypi/recipes-bsp/u-boot/files/0001-board-raspberrypi-add-serial-and-revision-to-the-dev.patch24
1 files changed, 11 insertions, 13 deletions
diff --git a/external/meta-updater-raspberrypi/recipes-bsp/u-boot/files/0001-board-raspberrypi-add-serial-and-revision-to-the-dev.patch b/external/meta-updater-raspberrypi/recipes-bsp/u-boot/files/0001-board-raspberrypi-add-serial-and-revision-to-the-dev.patch
index 44774c0e..73f6e2d9 100644
--- a/external/meta-updater-raspberrypi/recipes-bsp/u-boot/files/0001-board-raspberrypi-add-serial-and-revision-to-the-dev.patch
+++ b/external/meta-updater-raspberrypi/recipes-bsp/u-boot/files/0001-board-raspberrypi-add-serial-and-revision-to-the-dev.patch
@@ -1,8 +1,7 @@
-From 86cc911aaa958fedf2ea9cb04b4af17f5357815d Mon Sep 17 00:00:00 2001
+From fb48900977dbbfc6f921822abc6728b6075efc4f Mon Sep 17 00:00:00 2001
From: Anton Gerasimov <anton.gerasimov@here.com>
Date: Fri, 1 Feb 2019 14:39:48 +0100
-Subject: [PATCH] board: raspberrypi: add serial and revision to the device
- tree
+Subject: [PATCH] board: raspberrypi: add serial and revision to device tree
Raspberry Pi bootloader adds this node to fdt, but if u-boot script
doesn't reuse the tree provided by it, this information is lost.
@@ -10,31 +9,33 @@ doesn't reuse the tree provided by it, this information is lost.
Revision and serial are displayed in /proc/cpuinfo after boot.
Signed-off-by: Anton Gerasimov <anton.gerasimov@here.com>
+Signed-off-by: Patrick Vacek <patrick.vacek@here.com>
+
---
board/raspberrypi/rpi/rpi.c | 31 +++++++++++++++++++++++++++++--
1 file changed, 29 insertions(+), 2 deletions(-)
diff --git a/board/raspberrypi/rpi/rpi.c b/board/raspberrypi/rpi/rpi.c
-index 35f5939552..114178397e 100644
+index e367ba3092..d70e07f0a6 100644
--- a/board/raspberrypi/rpi/rpi.c
+++ b/board/raspberrypi/rpi/rpi.c
-@@ -241,6 +241,8 @@ static uint32_t rev_scheme;
+@@ -252,6 +252,8 @@ static uint32_t rev_scheme;
static uint32_t rev_type;
static const struct rpi_model *model;
+uint64_t serial;
+
- #ifdef CONFIG_ARM64
- static struct mm_region bcm2837_mem_map[] = {
- {
+ int dram_init(void)
+ {
+ ALLOC_CACHE_ALIGN_BUFFER(struct msg_get_arm_mem, msg, 1);
@@ -384,8 +386,8 @@ static void set_serial_number(void)
return;
}
-- snprintf(serial_string, sizeof(serial_string), "%016" PRIx64,
+- snprintf(serial_string, sizeof(serial_string), "%016llx",
- msg->get_board_serial.body.resp.serial);
+ serial = msg->get_board_serial.body.resp.serial;
-+ snprintf(serial_string, sizeof(serial_string), "%016" PRIx64, serial);
++ snprintf(serial_string, sizeof(serial_string), "%016llx", serial);
env_set("serial#", serial_string);
}
@@ -77,6 +78,3 @@ index 35f5939552..114178397e 100644
#ifdef CONFIG_EFI_LOADER
/* Reserve the spin table */
efi_add_memory_map(0, 1, EFI_RESERVED_MEMORY_TYPE, 0);
---
-2.17.1
-