xilinx: versal: add firmware access to CRP Boot mode register
authorPrasad Kummari <prasad.kummari@amd.com>
Wed, 19 Feb 2025 11:53:01 +0000 (17:23 +0530)
committerMichal Simek <michal.simek@amd.com>
Wed, 16 Apr 2025 11:42:06 +0000 (13:42 +0200)
commit926a72ba0438806a341cfe3a90683bc02d904e55
treedb9a124b41b26b069553a655859a422e6ce60fa9
parent931d96b594e029ecde46475ca355da2efb3035b1
xilinx: versal: add firmware access to CRP Boot mode register

Added extended support for retrieving the boot mode register
via the firmware interface, which is preferred when U-Boot
runs in EL2 and cannot directly access CRP registers via raw
reads. Ideally, all secure registers should be accessed via
xilinx_pm_request(). Introduced the secure zynqmp_pm_get_bootmode_reg()
call, which uses xilinx_pm_request() to read the boot mode register.

When CONFIG_ZYNQMP_FIRMWARE is enabled, the secure
zynqmp_pm_get_bootmode_reg() call is used; otherwise,
direct raw reads are performed in the case of mini U-Boot.

Signed-off-by: Prasad Kummari <prasad.kummari@amd.com>
Link: https://lore.kernel.org/r/20250219115301.3661036-1-prasad.kummari@amd.com
Signed-off-by: Michal Simek <michal.simek@amd.com>
board/xilinx/versal-net/board.c
board/xilinx/versal/board.c
drivers/firmware/firmware-zynqmp.c
include/zynqmp_firmware.h