aboutsummaryrefslogtreecommitdiffstats
path: root/meta-agl-refhw-gen3/recipes-bsp/arm-trusted-firmware
diff options
context:
space:
mode:
Diffstat (limited to 'meta-agl-refhw-gen3/recipes-bsp/arm-trusted-firmware')
-rw-r--r--meta-agl-refhw-gen3/recipes-bsp/arm-trusted-firmware/arm-trusted-firmware_%.bbappend2
-rw-r--r--meta-agl-refhw-gen3/recipes-bsp/arm-trusted-firmware/files/0001-rcar_gen3-plat-Delete-FDT-function-calls.patch145
-rw-r--r--meta-agl-refhw-gen3/recipes-bsp/arm-trusted-firmware/files/0001-rcar_gen3-plat-Do-not-panic-on-unrecognized-boards.patch36
3 files changed, 37 insertions, 146 deletions
diff --git a/meta-agl-refhw-gen3/recipes-bsp/arm-trusted-firmware/arm-trusted-firmware_%.bbappend b/meta-agl-refhw-gen3/recipes-bsp/arm-trusted-firmware/arm-trusted-firmware_%.bbappend
index 038e0a4..b02096f 100644
--- a/meta-agl-refhw-gen3/recipes-bsp/arm-trusted-firmware/arm-trusted-firmware_%.bbappend
+++ b/meta-agl-refhw-gen3/recipes-bsp/arm-trusted-firmware/arm-trusted-firmware_%.bbappend
@@ -1,6 +1,6 @@
FILESEXTRAPATHS_prepend := "${THISDIR}/files:"
-SRC_URI_append_rcar-gen3 = " file://0001-rcar_gen3-plat-Delete-FDT-function-calls.patch"
+SRC_URI_append_rcar-gen3 = " file://0001-rcar_gen3-plat-Do-not-panic-on-unrecognized-boards.patch"
# Apply the patch AGL applies for all rcar3 in meta-agl-bsp when
# building the standalone agl-refhw-h3 machine.
diff --git a/meta-agl-refhw-gen3/recipes-bsp/arm-trusted-firmware/files/0001-rcar_gen3-plat-Delete-FDT-function-calls.patch b/meta-agl-refhw-gen3/recipes-bsp/arm-trusted-firmware/files/0001-rcar_gen3-plat-Delete-FDT-function-calls.patch
deleted file mode 100644
index 067bbb2..0000000
--- a/meta-agl-refhw-gen3/recipes-bsp/arm-trusted-firmware/files/0001-rcar_gen3-plat-Delete-FDT-function-calls.patch
+++ /dev/null
@@ -1,145 +0,0 @@
-From a8e6139af9a307cc30d2e804819da963e419f017 Mon Sep 17 00:00:00 2001
-From: Toshiyuki Ogasahara <toshiyuki.ogasahara.bo@hitachi.com>
-Date: Tue, 15 Dec 2020 18:23:32 +0900
-Subject: [PATCH] rcar_gen3: plat: Delete FDT function calls
-
-Since U-boot configures the device tree, the FDT function call by
-BL31 is removed.
-
-Signed-off-by: Toshiyuki Ogasahara <toshiyuki.ogasahara.bo@hitachi.com>
-Signed-off-by: Yoshifumi Hosoya <yoshifumi.hosoya.wj@renesas.com>
----
- plat/renesas/rcar/bl2_plat_setup.c | 27 +++++++++++++++++++--------
- 1 file changed, 19 insertions(+), 8 deletions(-)
-
-diff --git a/plat/renesas/rcar/bl2_plat_setup.c b/plat/renesas/rcar/bl2_plat_setup.c
-index 24a13c7f7..59a72b5bb 100644
---- a/plat/renesas/rcar/bl2_plat_setup.c
-+++ b/plat/renesas/rcar/bl2_plat_setup.c
-@@ -110,6 +110,7 @@ static meminfo_t bl2_tzram_layout __aligned(CACHE_WRITEBACK_GRANULE);
-
- /* FDT with DRAM configuration */
- uint64_t fdt_blob[PAGE_SIZE_4KB / sizeof(uint64_t)];
-+#if 0
- static void *fdt = (void *)fdt_blob;
-
- static void unsigned_num_print(unsigned long long int unum, unsigned int radix,
-@@ -133,7 +134,7 @@ static void unsigned_num_print(unsigned long long int unum, unsigned int radix,
- while (--i >= 0)
- *string++ = num_buf[i];
- }
--
-+#endif
- #if (RCAR_LOSSY_ENABLE == 1)
- typedef struct bl2_lossy_info {
- uint32_t magic;
-@@ -145,6 +146,7 @@ static void bl2_lossy_gen_fdt(uint32_t no, uint64_t start_addr,
- uint64_t end_addr, uint32_t format,
- uint32_t enable, int fcnlnode)
- {
-+#if 0
- const uint64_t fcnlsize = cpu_to_fdt64(end_addr - start_addr);
- char nodename[40] = { 0 };
- int ret, node;
-@@ -199,6 +201,7 @@ static void bl2_lossy_gen_fdt(uint32_t no, uint64_t start_addr,
- NOTICE("BL2: Cannot add FCNL formats prop (ret=%i)\n", ret);
- panic();
- }
-+#endif
- }
-
- static void bl2_lossy_setting(uint32_t no, uint64_t start_addr,
-@@ -449,6 +452,7 @@ struct meminfo *bl2_plat_sec_mem_layout(void)
- return &bl2_tzram_layout;
- }
-
-+#if 0
- static void bl2_populate_compatible_string(void *dt)
- {
- uint32_t board_type;
-@@ -537,13 +541,17 @@ static void bl2_populate_compatible_string(void *dt)
- panic();
- }
- }
-+#endif
-
- static void bl2_advertise_dram_entries(uint64_t dram_config[8])
- {
-+#if 0
- char nodename[32] = { 0 };
-- uint64_t start, size;
- uint64_t fdtsize;
-- int ret, node, chan;
-+ int ret, node;
-+#endif
-+ uint64_t start, size;
-+ int chan;
-
- for (chan = 0; chan < 4; chan++) {
- start = dram_config[2 * chan];
-@@ -556,7 +564,7 @@ static void bl2_advertise_dram_entries(uint64_t dram_config[8])
- (size >> 30) ? : size >> 20,
- (size >> 30) ? "G" : "M");
- }
--
-+#if 0
- /*
- * We add the DT nodes in reverse order here. The fdt_add_subnode()
- * adds the DT node before the first existing DT node, so we have
-@@ -604,6 +612,7 @@ static void bl2_advertise_dram_entries(uint64_t dram_config[8])
- err:
- NOTICE("BL2: Cannot add memory node to FDT (ret=%i)\n", ret);
- panic();
-+#endif
- }
-
- static void bl2_advertise_dram_size(uint32_t product)
-@@ -927,7 +936,7 @@ lcm_state:
- }
- rcar_qos_init();
- }
--
-+#if 0
- /* Set up FDT */
- ret = fdt_create_empty_tree(fdt, sizeof(fdt_blob));
- if (ret) {
-@@ -937,7 +946,7 @@ lcm_state:
-
- /* Add platform compatible string */
- bl2_populate_compatible_string(fdt);
--
-+#endif
- /* Print DRAM layout */
- bl2_advertise_dram_size(product);
-
-@@ -989,14 +998,14 @@ lcm_state:
- }
- #if (RCAR_LOSSY_ENABLE == 1)
- NOTICE("BL2: Lossy Decomp areas\n");
--
-+#if 0
- fcnlnode = fdt_add_subnode(fdt, 0, "reserved-memory");
- if (fcnlnode < 0) {
- NOTICE("BL2: Cannot create reserved mem node (ret=%i)\n",
- fcnlnode);
- panic();
- }
--
-+#endif
- bl2_lossy_setting(0, LOSSY_ST_ADDR0, LOSSY_END_ADDR0,
- LOSSY_FMT0, LOSSY_ENA_DIS0, fcnlnode);
- bl2_lossy_setting(1, LOSSY_ST_ADDR1, LOSSY_END_ADDR1,
-@@ -1005,8 +1014,10 @@ lcm_state:
- LOSSY_FMT2, LOSSY_ENA_DIS2, fcnlnode);
- #endif
-
-+#if 0
- fdt_pack(fdt);
- NOTICE("BL2: FDT at %p\n", fdt);
-+#endif
-
- if (boot_dev == MODEMR_BOOT_DEV_EMMC_25X1 ||
- boot_dev == MODEMR_BOOT_DEV_EMMC_50X8)
---
-2.30.2
-
diff --git a/meta-agl-refhw-gen3/recipes-bsp/arm-trusted-firmware/files/0001-rcar_gen3-plat-Do-not-panic-on-unrecognized-boards.patch b/meta-agl-refhw-gen3/recipes-bsp/arm-trusted-firmware/files/0001-rcar_gen3-plat-Do-not-panic-on-unrecognized-boards.patch
new file mode 100644
index 0000000..4b51f37
--- /dev/null
+++ b/meta-agl-refhw-gen3/recipes-bsp/arm-trusted-firmware/files/0001-rcar_gen3-plat-Do-not-panic-on-unrecognized-boards.patch
@@ -0,0 +1,36 @@
+From 61ffc5ec5ad1755d5d22b4386f8ad027bb59e1d5 Mon Sep 17 00:00:00 2001
+From: Scott Murray <scott.murray@konsulko.com>
+Date: Tue, 5 Oct 2021 12:10:23 -0400
+Subject: [PATCH] rcar_gen3: plat: Do not panic on unrecognized boards
+
+Replace the panic in bl2_populate_compatible_string with just putting
+"unknown" into the compatible string for the FDT. This allows us to
+boot on the AGL reference hardware where the board type seems
+unavailable.
+
+Upstream-Status: Inappropriate [board specific usecase]
+
+Signed-off-by: Scott Murray <scott.murray@konsulko.com>
+---
+ plat/renesas/rcar/bl2_plat_setup.c | 5 +++--
+ 1 file changed, 3 insertions(+), 2 deletions(-)
+
+diff --git a/plat/renesas/rcar/bl2_plat_setup.c b/plat/renesas/rcar/bl2_plat_setup.c
+index bf077c483..7fcc75a13 100644
+--- a/plat/renesas/rcar/bl2_plat_setup.c
++++ b/plat/renesas/rcar/bl2_plat_setup.c
+@@ -489,8 +489,9 @@ static void bl2_populate_compatible_string(void *dt)
+ "renesas,draak");
+ break;
+ default:
+- NOTICE("BL2: Cannot set compatible string, board unsupported\n");
+- panic();
++ ret = fdt_setprop_string(dt, 0, "compatible",
++ "renesas,unknown");
++ break;
+ }
+
+ if (ret < 0) {
+--
+2.31.1
+