2018-05-07 06:58:06 +09:00
|
|
|
/* SPDX-License-Identifier: GPL-2.0+ */
|
2015-01-15 18:01:51 +09: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-02 04:40:46 +09:00
|
|
|
#define PAYLOAD_ARG_CNT 5
|
|
|
|
|
2017-07-25 15:21:36 +09:00
|
|
|
#define ZYNQMP_CSU_SILICON_VER_MASK 0xF
|
2018-02-28 16:56:53 +09:00
|
|
|
#define KEY_PTR_LEN 32
|
2017-07-25 15:21:36 +09:00
|
|
|
|
2018-05-31 18:40:23 +09: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 21:14:47 +09:00
|
|
|
#define ZYNQMP_FPGA_BIT_NS 5
|
|
|
|
|
2018-05-31 18:40:23 +09:00
|
|
|
#define ZYNQMP_FPGA_AUTH_DDR 1
|
|
|
|
|
2017-07-25 15:21:36 +09:00
|
|
|
enum {
|
|
|
|
IDCODE,
|
|
|
|
VERSION,
|
2017-08-22 21:58:53 +09:00
|
|
|
IDCODE2,
|
2017-07-25 15:21:36 +09:00
|
|
|
};
|
|
|
|
|
|
|
|
enum {
|
|
|
|
ZYNQMP_SILICON_V1,
|
|
|
|
ZYNQMP_SILICON_V2,
|
|
|
|
ZYNQMP_SILICON_V3,
|
|
|
|
ZYNQMP_SILICON_V4,
|
|
|
|
};
|
|
|
|
|
2017-07-13 22:31:09 +09:00
|
|
|
enum {
|
|
|
|
TCM_LOCK,
|
|
|
|
TCM_SPLIT,
|
|
|
|
};
|
|
|
|
|
2019-09-27 19:36:56 +09:00
|
|
|
struct zynqmp_ipi_msg {
|
|
|
|
size_t len;
|
|
|
|
u32 *buf;
|
|
|
|
};
|
|
|
|
|
2017-07-31 17:37:09 +09:00
|
|
|
int zynq_board_read_rom_ethaddr(unsigned char *ethaddr);
|
2015-01-15 18:01:51 +09:00
|
|
|
unsigned int zynqmp_get_silicon_version(void);
|
|
|
|
|
2017-01-09 18:05:16 +09:00
|
|
|
void handoff_setup(void);
|
|
|
|
|
2017-02-02 04:40:46 +09: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 22:31:09 +09:00
|
|
|
void initialize_tcm(bool mode);
|
2018-04-20 16:00:40 +09:00
|
|
|
void mem_map_fill(void);
|
2017-07-25 15:21:38 +09:00
|
|
|
int chip_id(unsigned char id);
|
2018-10-05 18:39:05 +09:00
|
|
|
#if defined(CONFIG_SYS_MEM_RSVD_FOR_MMU) || defined(CONFIG_DEFINE_TCM_OCM_MMAP)
|
|
|
|
void tcm_init(u8 mode);
|
|
|
|
#endif
|
2017-07-25 15:21:38 +09:00
|
|
|
|
2019-05-22 01:06:43 +09:00
|
|
|
void zynqmp_pmufw_load_config_object(const void *cfg_obj, size_t size);
|
|
|
|
|
2015-01-15 18:01:51 +09:00
|
|
|
#endif /* _ASM_ARCH_SYS_PROTO_H */
|