2017-11-08 15:14:47 +00:00
|
|
|
/*
|
2017-11-10 08:47:28 +00:00
|
|
|
* (c) Copyright 2010-2014 Xilinx, Inc. All rights reserved.
|
|
|
|
* (c) Copyright 2016 Topic Embedded Products.
|
2017-11-08 15:14:47 +00:00
|
|
|
*
|
|
|
|
* SPDX-License-Identifier: GPL-2.0+
|
|
|
|
*/
|
|
|
|
|
|
|
|
#ifndef _ASM_ARCH_PS7_INIT_GPL_H
|
|
|
|
#define _ASM_ARCH_PS7_INIT_GPL_H
|
|
|
|
|
2017-11-10 08:47:28 +00:00
|
|
|
/* Opcode exit is 0 all the time */
|
|
|
|
#define OPCODE_EXIT 0U
|
|
|
|
#define OPCODE_MASKWRITE 0U
|
|
|
|
#define OPCODE_MASKPOLL 1U
|
|
|
|
#define OPCODE_MASKDELAY 2U
|
2017-11-10 10:03:47 +00:00
|
|
|
#define OPCODE_WRITE 3U
|
2017-11-10 08:47:28 +00:00
|
|
|
#define OPCODE_ADDRESS_MASK (~3U)
|
|
|
|
|
|
|
|
/* Sentinel */
|
|
|
|
#define EMIT_EXIT() OPCODE_EXIT
|
|
|
|
/* Opcode is in lower 2 bits of address, address is always 4-byte aligned */
|
|
|
|
#define EMIT_MASKWRITE(addr, mask, val) OPCODE_MASKWRITE | addr, mask, val
|
|
|
|
#define EMIT_MASKPOLL(addr, mask) OPCODE_MASKPOLL | addr, mask
|
|
|
|
#define EMIT_MASKDELAY(addr, mask) OPCODE_MASKDELAY | addr, mask
|
2017-11-10 10:03:47 +00:00
|
|
|
#define EMIT_WRITE(addr, val) OPCODE_WRITE | addr, val
|
2017-11-10 08:47:28 +00:00
|
|
|
|
|
|
|
/* Returns codes of ps7_init* */
|
|
|
|
#define PS7_INIT_SUCCESS (0)
|
|
|
|
#define PS7_INIT_CORRUPT (1)
|
|
|
|
#define PS7_INIT_TIMEOUT (2)
|
|
|
|
#define PS7_POLL_FAILED_DDR_INIT (3)
|
|
|
|
#define PS7_POLL_FAILED_DMA (4)
|
|
|
|
#define PS7_POLL_FAILED_PLL (5)
|
|
|
|
|
2017-11-10 10:06:02 +00:00
|
|
|
#define PCW_SILICON_VERSION_1 0
|
|
|
|
#define PCW_SILICON_VERSION_2 1
|
|
|
|
#define PCW_SILICON_VERSION_3 2
|
|
|
|
|
2017-11-08 15:14:47 +00:00
|
|
|
/* Called by spl.c */
|
|
|
|
int ps7_init(void);
|
|
|
|
int ps7_post_config(void);
|
|
|
|
|
2017-11-10 08:47:28 +00:00
|
|
|
/* Defined in ps7_init_common.c */
|
|
|
|
int ps7_config(unsigned long *ps7_config_init);
|
|
|
|
|
2017-11-10 10:06:02 +00:00
|
|
|
unsigned long ps7GetSiliconVersion(void);
|
|
|
|
|
2017-11-08 15:14:47 +00:00
|
|
|
#endif /* _ASM_ARCH_PS7_INIT_GPL_H */
|