summaryrefslogtreecommitdiff
path: root/src/target/dsp563xx_once.h
diff options
context:
space:
mode:
authormkdorg@users.sourceforge.net <mkdorg@users.sourceforge.net>2009-12-15 18:30:59 +0100
committerØyvind Harboe <oyvind.harboe@zylin.com>2009-12-15 18:38:52 +0100
commit646ce814b4fb678b7d8d341afe0694c266112426 (patch)
treef47236c7e4e51f5125635bd562ba153bafac8544 /src/target/dsp563xx_once.h
parent4639366947427da6face9cb6954b6603eb2e2fd3 (diff)
downloadopenocd+libswd-646ce814b4fb678b7d8d341afe0694c266112426.tar.gz
openocd+libswd-646ce814b4fb678b7d8d341afe0694c266112426.tar.bz2
openocd+libswd-646ce814b4fb678b7d8d341afe0694c266112426.tar.xz
openocd+libswd-646ce814b4fb678b7d8d341afe0694c266112426.zip
target: add basic dsp563xx support
Diffstat (limited to 'src/target/dsp563xx_once.h')
-rw-r--r--src/target/dsp563xx_once.h81
1 files changed, 81 insertions, 0 deletions
diff --git a/src/target/dsp563xx_once.h b/src/target/dsp563xx_once.h
new file mode 100644
index 00000000..871f6228
--- /dev/null
+++ b/src/target/dsp563xx_once.h
@@ -0,0 +1,81 @@
+/***************************************************************************
+ * Copyright (C) 2009 by Mathias Kuester *
+ * mkdorg@users.sourceforge.net *
+ * *
+ * 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, write to the *
+ * Free Software Foundation, Inc., *
+ * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *
+ ***************************************************************************/
+#ifndef DSP563XX_ONCE_H
+#define DSP563XX_ONCE_H
+
+#include <jtag/jtag.h>
+
+#define DSP563XX_ONCE_OCR_EX (1<<5)
+#define DSP563XX_ONCE_OCR_GO (1<<6)
+#define DSP563XX_ONCE_OCR_RW (1<<7)
+
+#define DSP563XX_ONCE_OSCR_OS1 (1<<7)
+#define DSP563XX_ONCE_OSCR_OS0 (1<<6)
+#define DSP563XX_ONCE_OSCR_HIT (1<<5)
+#define DSP563XX_ONCE_OSCR_TO (1<<4)
+#define DSP563XX_ONCE_OSCR_MBO (1<<3)
+#define DSP563XX_ONCE_OSCR_SWO (1<<2)
+#define DSP563XX_ONCE_OSCR_IME (1<<1)
+#define DSP563XX_ONCE_OSCR_TME (1<<0)
+
+#define DSP563XX_ONCE_OSCR_NORMAL_M (0)
+#define DSP563XX_ONCE_OSCR_STOPWAIT_M (DSP563XX_ONCE_OSCR_OS0)
+#define DSP563XX_ONCE_OSCR_BUSY_M (DSP563XX_ONCE_OSCR_OS1)
+#define DSP563XX_ONCE_OSCR_DEBUG_M (DSP563XX_ONCE_OSCR_OS0|DSP563XX_ONCE_OSCR_OS1)
+
+#define DSP563XX_ONCE_OSCR 0x000 /* status/ctrl reg. */
+#define DSP563XX_ONCE_OMBC 0x001 /* memory breakp. reg. */
+#define DSP563XX_ONCE_OBCR 0x002 /* breakp. ctrl reg */
+#define DSP563XX_ONCE_OMLR0 0x005 /* memory limit reg */
+#define DSP563XX_ONCE_OMLR1 0x006 /* memory limit reg */
+#define DSP563XX_ONCE_OGDBR 0x009 /* gdb reg */
+#define DSP563XX_ONCE_OPDBR 0x00A /* pdb reg */
+#define DSP563XX_ONCE_OPILR 0x00B /* pil reg */
+#define DSP563XX_ONCE_PDBGOTO 0x00C /* pdb to go reg */
+#define DSP563XX_ONCE_OTC 0x00D /* trace cnt */
+#define DSP563XX_ONCE_TAGB 0x00E /* tags buffer */
+#define DSP563XX_ONCE_OPABFR 0x00F /* pab fetch reg */
+#define DSP563XX_ONCE_OPABDR 0x010 /* pab decode reg */
+#define DSP563XX_ONCE_OPABEX 0x011 /* pab exec reg */
+#define DSP563XX_ONCE_OPABEX 0x011 /* trace buffer/inc ptr */
+#define DSP563XX_ONCE_NOREG 0x01F /* no register selected */
+
+/** single word instruction */
+int dsp563xx_once_ir_exec(struct jtag_tap *tap, uint8_t instr, uint8_t rw,
+ uint8_t go, uint8_t ex);
+/** single word instruction */
+int dsp563xx_once_ir_exec_nq(struct jtag_tap *tap, uint8_t instr, uint8_t rw,
+ uint8_t go, uint8_t ex);
+/** once read register */
+int dsp563xx_once_reg_read(struct jtag_tap *tap, uint8_t reg, uint32_t * data);
+/** once write register */
+int dsp563xx_once_reg_write(struct jtag_tap *tap, uint8_t reg, uint32_t data);
+/** single word instruction */
+int dsp563xx_once_execute_sw_ir(struct jtag_tap *tap, uint32_t opcode);
+/** double word instruction */
+int dsp563xx_once_execute_dw_ir(struct jtag_tap *tap, uint32_t opcode,
+ uint32_t operand);
+/** single word instruction */
+int dsp563xx_once_execute_sw_ir_nq(struct jtag_tap *tap, uint32_t opcode);
+/** double word instruction */
+int dsp563xx_once_execute_dw_ir_nq(struct jtag_tap *tap, uint32_t opcode,
+ uint32_t operand);
+
+#endif /* DSP563XX_ONCE_H */