flash/nor/stm32l4x: Remove redundant error messages
[openocd.git] / src / target / arc_jtag.h
blobc2dc7b7ef934a0d6f0b97900d5e301bb231fb5a7
1 /* SPDX-License-Identifier: GPL-2.0-or-later */
3 /***************************************************************************
4 * Copyright (C) 2013-2014,2019-2020 Synopsys, Inc. *
5 * Frank Dols <frank.dols@synopsys.com> *
6 * Mischa Jonker <mischa.jonker@synopsys.com> *
7 * Anton Kolesov <anton.kolesov@synopsys.com> *
8 * Evgeniy Didin <didin@synopsys.com> *
9 ***************************************************************************/
11 #ifndef OPENOCD_TARGET_ARC_JTAG_H
12 #define OPENOCD_TARGET_ARC_JTAG_H
14 #define ARC_TRANSACTION_CMD_REG 0x9 /* Command to perform */
15 #define ARC_TRANSACTION_CMD_REG_LENGTH 4
17 /* Jtag status register, value is placed in IR to read jtag status register */
18 #define ARC_JTAG_STATUS_REG 0x8
19 #define ARC_JTAG_ADDRESS_REG 0xA /* SoC address to access */
20 #define ARC_JTAG_DATA_REG 0xB /* Data read/written from SoC */
22 /* Jtag status register field */
23 #define ARC_JTAG_STAT_RU 0x10
25 /* ARC Jtag transactions */
26 #define ARC_JTAG_WRITE_TO_MEMORY 0x0
27 #define ARC_JTAG_WRITE_TO_CORE_REG 0x1
28 #define ARC_JTAG_WRITE_TO_AUX_REG 0x2
29 #define ARC_JTAG_CMD_NOP 0x3
30 #define ARC_JTAG_READ_FROM_MEMORY 0x4
31 #define ARC_JTAG_READ_FROM_CORE_REG 0x5
32 #define ARC_JTAG_READ_FROM_AUX_REG 0x6
34 #define ARC_JTAG_CORE_REG 0x0
35 #define ARC_JTAG_AUX_REG 0x1
38 struct arc_jtag {
39 struct jtag_tap *tap;
40 uint32_t cur_trans;
43 /* ----- Exported JTAG functions ------------------------------------------- */
45 int arc_jtag_startup(struct arc_jtag *jtag_info);
46 int arc_jtag_status(struct arc_jtag *const jtag_info, uint32_t *const value);
48 int arc_jtag_write_core_reg(struct arc_jtag *jtag_info, uint32_t *addr,
49 uint32_t count, const uint32_t *buffer);
50 int arc_jtag_read_core_reg(struct arc_jtag *jtag_info, uint32_t *addr,
51 uint32_t count, uint32_t *buffer);
52 int arc_jtag_write_core_reg_one(struct arc_jtag *jtag_info, uint32_t addr,
53 const uint32_t buffer);
54 int arc_jtag_read_core_reg_one(struct arc_jtag *jtag_info, uint32_t addr,
55 uint32_t *buffer);
57 int arc_jtag_write_aux_reg(struct arc_jtag *jtag_info, uint32_t *addr,
58 uint32_t count, const uint32_t *buffer);
59 int arc_jtag_write_aux_reg_one(struct arc_jtag *jtag_info, uint32_t addr,
60 uint32_t value);
61 int arc_jtag_read_aux_reg(struct arc_jtag *jtag_info, uint32_t *addr,
62 uint32_t count, uint32_t *buffer);
63 int arc_jtag_read_aux_reg_one(struct arc_jtag *jtag_info, uint32_t addr,
64 uint32_t *value);
66 int arc_jtag_write_memory(struct arc_jtag *jtag_info, uint32_t addr,
67 uint32_t count, const uint32_t *buffer);
68 int arc_jtag_read_memory(struct arc_jtag *jtag_info, uint32_t addr,
69 uint32_t count, uint32_t *buffer, bool slow_memory);
70 #endif /* OPENOCD_TARGET_ARC_JTAG_H */