target: constify structures
[openocd.git] / src / target / dsp563xx_once.h
1 /***************************************************************************
2 * Copyright (C) 2009 by Mathias Kuester *
3 * mkdorg@users.sourceforge.net *
4 * *
5 * This program is free software; you can redistribute it and/or modify *
6 * it under the terms of the GNU General Public License as published by *
7 * the Free Software Foundation; either version 2 of the License, or *
8 * (at your option) any later version. *
9 * *
10 * This program is distributed in the hope that it will be useful, *
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of *
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
13 * GNU General Public License for more details. *
14 * *
15 * You should have received a copy of the GNU General Public License *
16 * along with this program; if not, write to the *
17 * Free Software Foundation, Inc., *
18 * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. *
19 ***************************************************************************/
20
21 #ifndef DSP563XX_ONCE_H
22 #define DSP563XX_ONCE_H
23
24 #include <jtag/jtag.h>
25
26 #ifdef HAVE_CONFIG_H
27 #include "config.h"
28 #endif
29
30 #define DSP563XX_ONCE_OCR_EX (1<<5)
31 #define DSP563XX_ONCE_OCR_GO (1<<6)
32 #define DSP563XX_ONCE_OCR_RW (1<<7)
33
34 #define DSP563XX_ONCE_OSCR_OS1 (1<<7)
35 #define DSP563XX_ONCE_OSCR_OS0 (1<<6)
36 #define DSP563XX_ONCE_OSCR_HIT (1<<5)
37 #define DSP563XX_ONCE_OSCR_TO (1<<4)
38 #define DSP563XX_ONCE_OSCR_MBO (1<<3)
39 #define DSP563XX_ONCE_OSCR_SWO (1<<2)
40 #define DSP563XX_ONCE_OSCR_IME (1<<1)
41 #define DSP563XX_ONCE_OSCR_TME (1<<0)
42
43 #define DSP563XX_ONCE_OSCR_NORMAL_M (0)
44 #define DSP563XX_ONCE_OSCR_STOPWAIT_M (DSP563XX_ONCE_OSCR_OS0)
45 #define DSP563XX_ONCE_OSCR_BUSY_M (DSP563XX_ONCE_OSCR_OS1)
46 #define DSP563XX_ONCE_OSCR_DEBUG_M (DSP563XX_ONCE_OSCR_OS0|DSP563XX_ONCE_OSCR_OS1)
47
48 #define DSP563XX_ONCE_OSCR 0x000 /* status/ctrl reg. */
49 #define DSP563XX_ONCE_OMBC 0x001 /* memory breakp. reg. */
50 #define DSP563XX_ONCE_OBCR 0x002 /* breakp. ctrl reg */
51 #define DSP563XX_ONCE_OMLR0 0x005 /* memory limit reg */
52 #define DSP563XX_ONCE_OMLR1 0x006 /* memory limit reg */
53 #define DSP563XX_ONCE_OGDBR 0x009 /* gdb reg */
54 #define DSP563XX_ONCE_OPDBR 0x00A /* pdb reg */
55 #define DSP563XX_ONCE_OPILR 0x00B /* pil reg */
56 #define DSP563XX_ONCE_PDBGOTO 0x00C /* pdb to go reg */
57 #define DSP563XX_ONCE_OTC 0x00D /* trace cnt */
58 #define DSP563XX_ONCE_TAGB 0x00E /* tags buffer */
59 #define DSP563XX_ONCE_OPABFR 0x00F /* pab fetch reg */
60 #define DSP563XX_ONCE_OPABDR 0x010 /* pab decode reg */
61 #define DSP563XX_ONCE_OPABEX 0x011 /* pab exec reg */
62 #define DSP563XX_ONCE_OPABF11 0x012 /* trace buffer/inc ptr */
63 #define DSP563XX_ONCE_NOREG 0x01F /* no register selected */
64
65 struct once_reg {
66 const uint8_t num;
67 const uint8_t addr;
68 const uint8_t len;
69 const char *name;
70 uint32_t reg;
71 };
72
73 /** */
74 int dsp563xx_once_request_debug(struct jtag_tap *tap, int reset_state);
75 /** */
76 int dsp563xx_once_target_status(struct jtag_tap *tap);
77
78 /** once read registers */
79 int dsp563xx_once_read_register(struct jtag_tap *tap, int flush, struct once_reg *regs, int len);
80 /** once read register */
81 int dsp563xx_once_reg_read_ex(struct jtag_tap *tap, int flush, uint8_t reg, uint8_t len, uint32_t * data);
82 /** once read register */
83 int dsp563xx_once_reg_read(struct jtag_tap *tap, int flush, uint8_t reg, uint32_t * data);
84 /** once write register */
85 int dsp563xx_once_reg_write(struct jtag_tap *tap, int flush, uint8_t reg, uint32_t data);
86 /** single word instruction */
87 int dsp563xx_once_execute_sw_ir(struct jtag_tap *tap, int flush, uint32_t opcode);
88 /** double word instruction */
89 int dsp563xx_once_execute_dw_ir(struct jtag_tap *tap, int flush, uint32_t opcode, uint32_t operand);
90
91 #endif /* DSP563XX_ONCE_H */

Linking to existing account procedure

If you already have an account and want to add another login method you MUST first sign in with your existing account and then change URL to read https://review.openocd.org/login/?link to get to this page again but this time it'll work for linking. Thank you.

SSH host keys fingerprints

1024 SHA256:YKx8b7u5ZWdcbp7/4AeXNaqElP49m6QrwfXaqQGJAOk gerrit-code-review@openocd.zylin.com (DSA)
384 SHA256:jHIbSQa4REvwCFG4cq5LBlBLxmxSqelQPem/EXIrxjk gerrit-code-review@openocd.org (ECDSA)
521 SHA256:UAOPYkU9Fjtcao0Ul/Rrlnj/OsQvt+pgdYSZ4jOYdgs gerrit-code-review@openocd.org (ECDSA)
256 SHA256:A13M5QlnozFOvTllybRZH6vm7iSt0XLxbA48yfc2yfY gerrit-code-review@openocd.org (ECDSA)
256 SHA256:spYMBqEYoAOtK7yZBrcwE8ZpYt6b68Cfh9yEVetvbXg gerrit-code-review@openocd.org (ED25519)
+--[ED25519 256]--+
|=..              |
|+o..   .         |
|*.o   . .        |
|+B . . .         |
|Bo. = o S        |
|Oo.+ + =         |
|oB=.* = . o      |
| =+=.+   + E     |
|. .=o   . o      |
+----[SHA256]-----+
2048 SHA256:0Onrb7/PHjpo6iVZ7xQX2riKN83FJ3KGU0TvI0TaFG4 gerrit-code-review@openocd.zylin.com (RSA)