aboutsummaryrefslogtreecommitdiff
path: root/src/target/qorivva.h
blob: 3a0a974dbd27729737771cd5b989e88f31015f8a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
/***************************************************************************
 *   Copyright (C) 2008 by Spencer Oliver                                  *
 *   spen@spen-soft.co.uk                                                  *
 *                                                                         *
 *   Copyright (C) 2008 by David T.L. Wong                                 *
 *                                                                         *
 *   Copyright (C) 2011 by Drasko DRASKOVIC                                *
 *   drasko.draskovic@gmail.com                                            *
 *                                                                         *
 *   This program is free software; you can redistribute it and/or modify  *
 *   it under the terms of the GNU General Public License as published by  *
 *   the Free Software Foundation; either version 2 of the License, or     *
 *   (at your option) any later version.                                   *
 *                                                                         *
 *   This program is distributed in the hope that it will be useful,       *
 *   but WITHOUT ANY WARRANTY; without even the implied warranty of        *
 *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the         *
 *   GNU General Public License for more details.                          *
 *                                                                         *
 *   You should have received a copy of the GNU General Public License     *
 *   along with this program.  If not, see <http://www.gnu.org/licenses/>. *
 ***************************************************************************/

#ifndef OPENOCD_TARGET_QORIVVA_H
#define OPENOCD_TARGET_QORIVVA_H

#include <jtag/jtag.h>
#include "target.h"
#include "target_type.h"

#define QORIVVA_COMMON_MAGIC	0x55AA50AF

/* tap instructions */
#define QORIVVA_INST_IDCODE				0x01
#define QORIVVA_INST_SAMPLE_PRELOAD		0x02
#define QORIVVA_INST_SAMPLE				0x03
#define QORIVVA_INST_EXTEST				0x04
#define QORIVVA_INST_ENABLE_JTAG_PASSWORD		0x07
#define QORIVVA_INST_HIGHZ				0x09
#define QORIVVA_INST_CLAMP				0x0C
#define QORIVVA_INST_ENABLE_CONTROL1	0x0E
#define QORIVVA_INST_AUX_TAP_NPC_0		0x21
#define QORIVVA_INST_AUX_TAP_NPC_1		0x22
#define QORIVVA_INST_AUX_TAP_MBIST		0x24
#define QORIVVA_INST_AUX_TAP_JDC		0x26
#define QORIVVA_INST_AUX_TAP_HSM		0x27
#define QORIVVA_INST_AUX_TAP_Z4A		0x28
#define QORIVVA_INST_AUX_TAP_Z4B		0x29
#define QORIVVA_INST_AUX_TAP_Z2			0x2A
#define QORIVVA_INST_AUX_TAP_NXMC		0x34
#define QORIVVA_INST_AUX_TAP_PARALLEL	0x3C
#define QORIVVA_INST_BYPASS				0xFF

struct qorivva_common {
	uint32_t common_magic;
	struct jtag_tap *tap;
	uint32_t idcode;
};

static inline struct qorivva_common *
target_to_qorivva(struct target *target)
{
	return target->arch_info;
}

//extern const struct command_registration qorivva_command_handlers[];

#endif /* OPENOCD_TARGET_QORIVVA_H */