u-boot/board/renesas/rcar-common
Geert Uytterhoeven 33aca1c868 ARM: renesas: Propagate RPC-IF enablement to subsequent software
As the Renesas Reduced Pin Count Interface may be locked by TF-A, it is
disabled by default[1].  When unlocked, TF-A passes a DT fragment to
enable it, which is applied to the U-Boot DT[2].

Unlike the memory layout, the RPC-IF enablement is not propagated to
subsequent software.  Hence e.g. Linux cannot know if the RPC-IF is
locked or not, and will lock-up when trying to access the RPC-IF when
locked.

Fix this by checking if the RPC-IF is enabled in the TF-A DT fragment, and
setting the status of the RPC-IF device node in the target DT, if
present, to "okay".  Do this only when a "flash" subnode is found, to
avoid errors in subsequent software when the RPC-IF is not intended to
be used.

Note that this requires the status of the RPC-IF node to be set to
"disabled" in the target DT, just like in the U-Boot DT.

[1] commit 3d5f45c95c ("ARM: dts: rmobile: Disable RPC HF by
    default")
[2] commit 361377dbdb ("ARM: rmobile: Merge prior-stage firmware
    DT fragment into U-Boot DT on Gen3")

Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
2022-09-02 13:25:01 +02:00
..
common.c ARM: renesas: Propagate RPC-IF enablement to subsequent software 2022-09-02 13:25:01 +02:00
gen3-spl.c reset: Remove addr parameter from reset_cpu() 2021-03-02 14:03:02 -05:00