Ibai Erkiaga | 009ab7b | 2019-09-27 11:37:01 +0100 | [diff] [blame^] | 1 | /* SPDX-License-Identifier: GPL-2.0 */ |
| 2 | /* |
| 3 | * Xilinx Zynq MPSoC Firmware driver |
| 4 | * |
| 5 | * Copyright (C) 2018-2019 Xilinx, Inc. |
| 6 | */ |
| 7 | |
| 8 | #ifndef _ZYNQMP_FIRMWARE_H_ |
| 9 | #define _ZYNQMP_FIRMWARE_H_ |
| 10 | |
| 11 | enum pm_api_id { |
| 12 | PM_GET_API_VERSION = 1, |
| 13 | PM_SET_CONFIGURATION, |
| 14 | PM_SECURE_IMAGE = 45, |
| 15 | }; |
| 16 | |
| 17 | #define PM_SIP_SVC 0xc2000000 |
| 18 | #define ZYNQMP_SIP_SVC_GET_API_VERSION \ |
| 19 | (PM_SIP_SVC + PM_GET_API_VERSION) |
| 20 | #define ZYNQMP_SIP_SVC_PM_SECURE_IMG_LOAD \ |
| 21 | (PM_SIP_SVC + PM_SECURE_IMAGE) |
| 22 | |
| 23 | #define ZYNQMP_PM_VERSION_MAJOR 1 |
| 24 | #define ZYNQMP_PM_VERSION_MINOR 0 |
| 25 | #define ZYNQMP_PM_VERSION_MAJOR_SHIFT 16 |
| 26 | #define ZYNQMP_PM_VERSION_MINOR_MASK 0xFFFF |
| 27 | |
| 28 | #define ZYNQMP_PM_VERSION \ |
| 29 | ((ZYNQMP_PM_VERSION_MAJOR << ZYNQMP_PM_VERSION_MAJOR_SHIFT) | \ |
| 30 | ZYNQMP_PM_VERSION_MINOR) |
| 31 | |
| 32 | #define ZYNQMP_PM_VERSION_INVALID ~0 |
| 33 | |
| 34 | #define PMUFW_V1_0 ((1 << ZYNQMP_PM_VERSION_MAJOR_SHIFT) | 0) |
| 35 | |
| 36 | unsigned int zynqmp_firmware_version(void); |
| 37 | |
| 38 | #endif /* _ZYNQMP_FIRMWARE_H_ */ |