Commit 12c75c88 authored by Marek Vasut's avatar Marek Vasut
Browse files

feat(plat/rcar3): emit RPC status to DT fragment if RPC unlocked


In case the RCAR_RPC_HYPERFLASH_LOCKED is 0, emit DT node /soc/rpc@ee200000
with property status = "okay" into the DT fragment passed to subsequent
software, to indicate the RPC is unlocked.
Signed-off-by: default avatarMarek Vasut <marek.vasut+renesas@gmail.com>
Change-Id: Id93c4573ab1c62cf13fa5a803dc5818584a2c13a
parent f95d5512
No related merge requests found
Showing with 30 additions and 0 deletions
+30 -0
......@@ -565,6 +565,33 @@ static void bl2_populate_compatible_string(void *dt)
}
}
static void bl2_add_rpc_node(void)
{
#if (RCAR_RPC_HYPERFLASH_LOCKED == 0)
int ret, node;
node = ret = fdt_add_subnode(fdt, 0, "soc");
if (ret < 0) {
goto err;
}
node = ret = fdt_add_subnode(fdt, node, "rpc@ee200000");
if (ret < 0) {
goto err;
}
ret = fdt_setprop_string(fdt, node, "status", "okay");
if (ret < 0) {
goto err;
}
return;
err:
NOTICE("BL2: Cannot add RPC node to FDT (ret=%i)\n", ret);
panic();
#endif
}
static void bl2_add_dram_entry(uint64_t start, uint64_t size)
{
char nodename[32] = { 0 };
......@@ -1010,6 +1037,9 @@ lcm_state:
/* Add platform compatible string */
bl2_populate_compatible_string(fdt);
/* Enable RPC if unlocked */
bl2_add_rpc_node();
/* Print DRAM layout */
bl2_advertise_dram_size(product);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment