mirror of
https://github.com/ARM-software/arm-trusted-firmware.git
synced 2025-04-27 07:15:20 +00:00
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: Marek Vasut <marek.vasut+renesas@gmail.com> Change-Id: Id93c4573ab1c62cf13fa5a803dc5818584a2c13a
This commit is contained in:
parent
f95d551217
commit
12c75c8886
1 changed files with 30 additions and 0 deletions
|
@ -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)
|
static void bl2_add_dram_entry(uint64_t start, uint64_t size)
|
||||||
{
|
{
|
||||||
char nodename[32] = { 0 };
|
char nodename[32] = { 0 };
|
||||||
|
@ -1010,6 +1037,9 @@ lcm_state:
|
||||||
/* Add platform compatible string */
|
/* Add platform compatible string */
|
||||||
bl2_populate_compatible_string(fdt);
|
bl2_populate_compatible_string(fdt);
|
||||||
|
|
||||||
|
/* Enable RPC if unlocked */
|
||||||
|
bl2_add_rpc_node();
|
||||||
|
|
||||||
/* Print DRAM layout */
|
/* Print DRAM layout */
|
||||||
bl2_advertise_dram_size(product);
|
bl2_advertise_dram_size(product);
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue