2018-05-06 21:58:06 +00:00
|
|
|
/* SPDX-License-Identifier: GPL-2.0+ */
|
2015-01-15 09:01:51 +00:00
|
|
|
/*
|
|
|
|
* (C) Copyright 2014 - 2015 Xilinx, Inc.
|
|
|
|
* Michal Simek <michal.simek@xilinx.com>
|
|
|
|
*/
|
|
|
|
|
|
|
|
#ifndef _ASM_ARCH_SYS_PROTO_H
|
|
|
|
#define _ASM_ARCH_SYS_PROTO_H
|
|
|
|
|
2017-02-01 19:40:46 +00:00
|
|
|
#define PAYLOAD_ARG_CNT 5
|
|
|
|
|
2017-07-25 06:21:36 +00:00
|
|
|
#define ZYNQMP_CSU_SILICON_VER_MASK 0xF
|
2018-02-28 07:56:53 +00:00
|
|
|
#define ZYNQMP_SIP_SVC_PM_SECURE_IMG_LOAD 0xC200002D
|
|
|
|
#define KEY_PTR_LEN 32
|
2017-07-25 06:21:36 +00:00
|
|
|
|
2018-05-31 09:40:23 +00:00
|
|
|
#define ZYNQMP_FPGA_BIT_AUTH_DDR 1
|
|
|
|
#define ZYNQMP_FPGA_BIT_AUTH_OCM 2
|
|
|
|
#define ZYNQMP_FPGA_BIT_ENC_USR_KEY 3
|
|
|
|
#define ZYNQMP_FPGA_BIT_ENC_DEV_KEY 4
|
2018-03-01 12:14:47 +00:00
|
|
|
#define ZYNQMP_FPGA_BIT_NS 5
|
|
|
|
|
2018-05-31 09:40:23 +00:00
|
|
|
#define ZYNQMP_FPGA_AUTH_DDR 1
|
|
|
|
|
2018-08-21 10:14:48 +00:00
|
|
|
#define ZYNQMP_SIP_SVC_GET_API_VERSION 0xC2000001
|
|
|
|
|
|
|
|
#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)
|
|
|
|
|
2018-08-21 10:14:49 +00:00
|
|
|
#define ZYNQMP_PM_VERSION_INVALID ~0
|
|
|
|
|
2018-08-21 10:14:50 +00:00
|
|
|
#define PMUFW_V1_0 ((1 << ZYNQMP_PM_VERSION_MAJOR_SHIFT) | 0)
|
|
|
|
|
2017-07-25 06:21:36 +00:00
|
|
|
enum {
|
|
|
|
IDCODE,
|
|
|
|
VERSION,
|
2017-08-22 12:58:53 +00:00
|
|
|
IDCODE2,
|
2017-07-25 06:21:36 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
enum {
|
|
|
|
ZYNQMP_SILICON_V1,
|
|
|
|
ZYNQMP_SILICON_V2,
|
|
|
|
ZYNQMP_SILICON_V3,
|
|
|
|
ZYNQMP_SILICON_V4,
|
|
|
|
};
|
|
|
|
|
2017-07-13 13:31:09 +00:00
|
|
|
enum {
|
|
|
|
TCM_LOCK,
|
|
|
|
TCM_SPLIT,
|
|
|
|
};
|
|
|
|
|
2017-07-31 08:37:09 +00:00
|
|
|
int zynq_board_read_rom_ethaddr(unsigned char *ethaddr);
|
2015-01-15 09:01:51 +00:00
|
|
|
unsigned int zynqmp_get_silicon_version(void);
|
|
|
|
|
2017-01-09 09:05:16 +00:00
|
|
|
void handoff_setup(void);
|
|
|
|
|
2018-08-21 10:14:49 +00:00
|
|
|
unsigned int zynqmp_pmufw_version(void);
|
2017-02-01 19:40:46 +00:00
|
|
|
int zynqmp_mmio_write(const u32 address, const u32 mask, const u32 value);
|
|
|
|
int zynqmp_mmio_read(const u32 address, u32 *value);
|
|
|
|
int invoke_smc(u32 pm_api_id, u32 arg0, u32 arg1, u32 arg2, u32 arg3,
|
|
|
|
u32 *ret_payload);
|
|
|
|
|
2017-07-13 13:31:09 +00:00
|
|
|
void initialize_tcm(bool mode);
|
2018-04-20 07:00:40 +00:00
|
|
|
void mem_map_fill(void);
|
2017-07-25 06:21:38 +00:00
|
|
|
int chip_id(unsigned char id);
|
|
|
|
|
2015-01-15 09:01:51 +00:00
|
|
|
#endif /* _ASM_ARCH_SYS_PROTO_H */
|