diff options
| author | Prasad Kummari <[email protected]> | 2025-02-19 17:23:01 +0530 |
|---|---|---|
| committer | Michal Simek <[email protected]> | 2025-04-16 13:42:06 +0200 |
| commit | 926a72ba0438806a341cfe3a90683bc02d904e55 (patch) | |
| tree | db9a124b41b26b069553a655859a422e6ce60fa9 /include | |
| parent | 931d96b594e029ecde46475ca355da2efb3035b1 (diff) | |
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 <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Michal Simek <[email protected]>
Diffstat (limited to 'include')
| -rw-r--r-- | include/zynqmp_firmware.h | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/include/zynqmp_firmware.h b/include/zynqmp_firmware.h index 73198a6a6ea..e7275f72fac 100644 --- a/include/zynqmp_firmware.h +++ b/include/zynqmp_firmware.h @@ -457,6 +457,7 @@ int zynqmp_pm_is_function_supported(const u32 api_id, const u32 id); int zynqmp_mmio_read(const u32 address, u32 *value); int zynqmp_mmio_write(const u32 address, const u32 mask, const u32 value); int zynqmp_pm_feature(const u32 api_id); +u32 zynqmp_pm_get_bootmode_reg(void); /* Type of Config Object */ #define PM_CONFIG_OBJECT_TYPE_BASE 0x1U @@ -500,4 +501,7 @@ struct zynqmp_ipi_msg { u32 *buf; }; +#define CRP_BOOT_MODE_REG_NODE 0x30000001 +#define CRP_BOOT_MODE_REG_OFFSET 0x200 + #endif /* _ZYNQMP_FIRMWARE_H_ */ |
