You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

82 lines
4.0 KiB

  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. * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *
  19. ***************************************************************************/
  20. #ifndef DSP563XX_ONCE_H
  21. #define DSP563XX_ONCE_H
  22. #include <jtag/jtag.h>
  23. #define DSP563XX_ONCE_OCR_EX (1<<5)
  24. #define DSP563XX_ONCE_OCR_GO (1<<6)
  25. #define DSP563XX_ONCE_OCR_RW (1<<7)
  26. #define DSP563XX_ONCE_OSCR_OS1 (1<<7)
  27. #define DSP563XX_ONCE_OSCR_OS0 (1<<6)
  28. #define DSP563XX_ONCE_OSCR_HIT (1<<5)
  29. #define DSP563XX_ONCE_OSCR_TO (1<<4)
  30. #define DSP563XX_ONCE_OSCR_MBO (1<<3)
  31. #define DSP563XX_ONCE_OSCR_SWO (1<<2)
  32. #define DSP563XX_ONCE_OSCR_IME (1<<1)
  33. #define DSP563XX_ONCE_OSCR_TME (1<<0)
  34. #define DSP563XX_ONCE_OSCR_NORMAL_M (0)
  35. #define DSP563XX_ONCE_OSCR_STOPWAIT_M (DSP563XX_ONCE_OSCR_OS0)
  36. #define DSP563XX_ONCE_OSCR_BUSY_M (DSP563XX_ONCE_OSCR_OS1)
  37. #define DSP563XX_ONCE_OSCR_DEBUG_M (DSP563XX_ONCE_OSCR_OS0|DSP563XX_ONCE_OSCR_OS1)
  38. #define DSP563XX_ONCE_OSCR 0x000 /* status/ctrl reg. */
  39. #define DSP563XX_ONCE_OMBC 0x001 /* memory breakp. reg. */
  40. #define DSP563XX_ONCE_OBCR 0x002 /* breakp. ctrl reg */
  41. #define DSP563XX_ONCE_OMLR0 0x005 /* memory limit reg */
  42. #define DSP563XX_ONCE_OMLR1 0x006 /* memory limit reg */
  43. #define DSP563XX_ONCE_OGDBR 0x009 /* gdb reg */
  44. #define DSP563XX_ONCE_OPDBR 0x00A /* pdb reg */
  45. #define DSP563XX_ONCE_OPILR 0x00B /* pil reg */
  46. #define DSP563XX_ONCE_PDBGOTO 0x00C /* pdb to go reg */
  47. #define DSP563XX_ONCE_OTC 0x00D /* trace cnt */
  48. #define DSP563XX_ONCE_TAGB 0x00E /* tags buffer */
  49. #define DSP563XX_ONCE_OPABFR 0x00F /* pab fetch reg */
  50. #define DSP563XX_ONCE_OPABDR 0x010 /* pab decode reg */
  51. #define DSP563XX_ONCE_OPABEX 0x011 /* pab exec reg */
  52. #define DSP563XX_ONCE_OPABEX 0x011 /* trace buffer/inc ptr */
  53. #define DSP563XX_ONCE_NOREG 0x01F /* no register selected */
  54. /** single word instruction */
  55. int dsp563xx_once_ir_exec(struct jtag_tap *tap, uint8_t instr, uint8_t rw,
  56. uint8_t go, uint8_t ex);
  57. /** single word instruction */
  58. int dsp563xx_once_ir_exec_nq(struct jtag_tap *tap, uint8_t instr, uint8_t rw,
  59. uint8_t go, uint8_t ex);
  60. /** once read register */
  61. int dsp563xx_once_reg_read(struct jtag_tap *tap, uint8_t reg, uint32_t * data);
  62. /** once write register */
  63. int dsp563xx_once_reg_write(struct jtag_tap *tap, uint8_t reg, uint32_t data);
  64. /** single word instruction */
  65. int dsp563xx_once_execute_sw_ir(struct jtag_tap *tap, uint32_t opcode);
  66. /** double word instruction */
  67. int dsp563xx_once_execute_dw_ir(struct jtag_tap *tap, uint32_t opcode,
  68. uint32_t operand);
  69. /** single word instruction */
  70. int dsp563xx_once_execute_sw_ir_nq(struct jtag_tap *tap, uint32_t opcode);
  71. /** double word instruction */
  72. int dsp563xx_once_execute_dw_ir_nq(struct jtag_tap *tap, uint32_t opcode,
  73. uint32_t operand);
  74. #endif /* DSP563XX_ONCE_H */