mirror of
https://github.com/AsahiLinux/u-boot
synced 2024-11-10 23:24:38 +00:00
b6039aad2d
U-Boot running in EL3 can't use SMC that's why there is a need to talk to PMUFW directly via mailbox. The same logic is applied to all functions which need to talk to PMUFW that's why move this logic to separate function to avoid code duplication. Also SMC request ID can be composed from PM_SIP_SVC offset that's why ZYNQMP_SIP_SVC_GET_API_VERSION macro can be removed completely. Signed-off-by: Michal Simek <michal.simek@xilinx.com>
36 lines
886 B
C
36 lines
886 B
C
/* SPDX-License-Identifier: GPL-2.0 */
|
|
/*
|
|
* Xilinx Zynq MPSoC Firmware driver
|
|
*
|
|
* Copyright (C) 2018-2019 Xilinx, Inc.
|
|
*/
|
|
|
|
#ifndef _ZYNQMP_FIRMWARE_H_
|
|
#define _ZYNQMP_FIRMWARE_H_
|
|
|
|
enum pm_api_id {
|
|
PM_GET_API_VERSION = 1,
|
|
PM_SET_CONFIGURATION,
|
|
PM_SECURE_IMAGE = 45,
|
|
};
|
|
|
|
#define PM_SIP_SVC 0xc2000000
|
|
#define ZYNQMP_SIP_SVC_PM_SECURE_IMG_LOAD \
|
|
(PM_SIP_SVC + PM_SECURE_IMAGE)
|
|
|
|
#define ZYNQMP_PM_VERSION_MAJOR 1
|
|
#define ZYNQMP_PM_VERSION_MINOR 0
|
|
#define ZYNQMP_PM_VERSION_MAJOR_SHIFT 16
|
|
#define ZYNQMP_PM_VERSION_MINOR_MASK 0xFFFF
|
|
|
|
#define ZYNQMP_PM_VERSION \
|
|
((ZYNQMP_PM_VERSION_MAJOR << ZYNQMP_PM_VERSION_MAJOR_SHIFT) | \
|
|
ZYNQMP_PM_VERSION_MINOR)
|
|
|
|
#define ZYNQMP_PM_VERSION_INVALID ~0
|
|
|
|
#define PMUFW_V1_0 ((1 << ZYNQMP_PM_VERSION_MAJOR_SHIFT) | 0)
|
|
|
|
unsigned int zynqmp_firmware_version(void);
|
|
|
|
#endif /* _ZYNQMP_FIRMWARE_H_ */
|