1. 03 Mar, 2010 2 commits
    • David Brownell's avatar
      ADIv5: use new dap_run() operation · 24b1426a
      David Brownell authored
      Make ADIv5 use one of the new transport-neutral interfaces: call
      dap_run(), not jtagdp_transaction_endcheck().
      Also, make that old interface private; and bugfix some of its call
      sites to handle the fault returns, instead of ignoring them.
      Signed-off-by: default avatarDavid Brownell <dbrownell@users.sourceforge.net>
    • David Brownell's avatar
      ARM: start abstracting ADIv5 transports (JTAG/SWD) · db6c9946
      David Brownell authored
      To support both JTAG and SWD, ADIv5 needs DAP operations which are
      transport-neutral, instead being of JTAG-specific.  This patch:
       - Defines such a transport-neutral interface, abstracting access
         to DP and AP registers through a conceptual queue of operations.
       - Builds the first implementation of such a transport with the existing
         JTAG-specific code.
      In contrast to the current JTAG-only interface, the interface adds
      support for two previously-missing (and unused) DAP operations:
       - aborting the current AP transaction (untested);
       - reading the IDCODE register (tested) ... required for SWD init.
      The choice of transports may be fixed at the chip, board, or JTAG/SWD
      adapter level.  Or if all the relevant hardware supports both transport
      options, the choice may be made at runtime, This patch provides basic
      infrastructure to support whichever choice is made.
      The current "JTAG-only" transport choice policy will necessarily continue
      for now, until SWD support becomes available in OpenOCD.  Later patches
      start phasing out JTAG-specific calls in favor of transport-neutral calls.
      Signed-off-by: default avatarDavid Brownell <dbrownell@users.sourceforge.net>
  2. 27 Feb, 2010 1 commit
  3. 21 Feb, 2010 2 commits
    • David Brownell's avatar
      ADIv5: remove ATOMIC/COMPOSITE interface mode · 3b68a708
      David Brownell authored
      This removes context-sensitivity from the programming interface and makes
      it possible to know what a block of code does without needing to know the
      previous history (specifically, the DAP's "trans_mode" setting).
      The mode was only set to ATOMIC briefly after DAP initialization, making
      this patch be primarily cleanup; almost everything depends on COMPOSITE.
      The transactions which shouldn't have been queued were already properly
      flushing the queue.
      Signed-off-by: default avatarDavid Brownell <dbrownell@users.sourceforge.net>
    • David Brownell's avatar
      ADIv5 clean up AP selection and register caching · 249263d2
      David Brownell authored
      Handling of AP (and AP register bank) selection, and cached AP
      registers, is pretty loose ... start tightening it:
       - It's "AP bank" select support ... there are no DP banks.  Rename.
         + dap_dp_bankselect() becomes dap_ap_bankselect()
         + "dp_select_value" struct field becomes "ap_bank_value"
       - Remove duplicate AP cache init paths ... only use dap_ap_select(),
       and don't make Cortex (A8 or M3) cores roll their own code.
       - For dap_ap_bankselect(), pass up any fault code from writing
       the SELECT register.  (Nothing yet checks those codes.)
       - Add various bits of Doxygen
      Signed-off-by: default avatarDavid Brownell <dbrownell@users.sourceforge.net>
  4. 07 Feb, 2010 1 commit
    • David Brownell's avatar
      ADIv5: doxygen · 6f262b69
      David Brownell authored
      Provide doxygen for many of the public ADIv5 interfaces (i.e. the ones
      called from Cortex core support code).
      Add FIXMEs (and a TODO) to help resolve implementation issues which
      became more apparent when trying to document this code:
       - Error-prone context-sensitivity (queued/nonqueued) in many procedures.
       - Procedures that lie by ignoring errors and wrongly claiming success.
      Also, there was no point in a return from dap_ap_select(); it can't fail,
      and no caller checks its return status.  Clean that up, make it void.
      Signed-off-by: default avatarDavid Brownell <dbrownell@users.sourceforge.net>
  5. 29 Jan, 2010 1 commit
    • David Brownell's avatar
      ADIv5: cleanup, rename swjdp_transaction_endcheck() · 3d3128a8
      David Brownell authored
      Make messages reference "DAP" if they're actually transport-agnostic, or
      "JTAG-DP" when they're JTAG-specific.  Saying SWJ-DP is often wrong (on
      most Cortex-A8 chips) and is confusing even if correct (since we don't
      yet support SWD).
      Rename a JTAG-specific routine to jtagdp_transaction_endcheck() to highlight
      that it's JTAG-specific, and that identify DAP clients undesirably depending
      on JTAG.  (They will all need to change for SWD support.)
      Shrink a few overlong lines of code.  Copy a comment from code removed
      in a previous patch (for the ARMv7-M "dap baseaddr" command).
      Signed-off-by: default avatarDavid Brownell <dbrownell@users.sourceforge.net>
  6. 21 Jan, 2010 1 commit
  7. 05 Jan, 2010 1 commit
  8. 02 Jan, 2010 3 commits
    • David Brownell's avatar
      ARM: ADIv5 JTAG symbol cleanup · 4ed5b450
      David Brownell authored
      Rename DAP_IR_* as JTAG_DP_* since those symbols are specifically
      for JTAG-DP (or SWJ-DP in JTAG mode), and won't work with SWD.
      Define the JTAG ABORT and IDCODE instructions for completeness;
      add a comment about where to (someday) use ABORT.
      Fix messaging which assumes everything is an SWJ-DP; say "JTAG-DP"
      instead, it's at least more appropriate for all JTAG transports.
      Shrink the affected lines.
      Signed-off-by: default avatarDavid Brownell <dbrownell@users.sourceforge.net>
    • David Brownell's avatar
      ARM: ADIv5 export cleanup · 6105f2bc
      David Brownell authored
      Make some private functions "static".  Remove their public declarations,
      and what is now an obviously unused function.  Shrinks this object's size
      (about 5% on x86_64) while making the code's scope easier to understand.
      Shrink the affected lines.
      Signed-off-by: default avatarDavid Brownell <dbrownell@users.sourceforge.net>
    • David Brownell's avatar
      ARM: ADIv5 symbol and comment cleanup · e60c164c
      David Brownell authored
      Instead of magic numbers, use their AP_REG_* constants.  Rename
      the ROM address symbol as BASE to match ARM's documentation.
      Comment various other symbols in the header; add some missing ones.
      Remove an unused struct.  Add some doxygen for stuff including the
      DAP structure and initialization.
      Signed-off-by: default avatarDavid Brownell <dbrownell@users.sourceforge.net>
  9. 13 Dec, 2009 1 commit
  10. 03 Dec, 2009 1 commit
  11. 16 Nov, 2009 2 commits
  12. 13 Nov, 2009 5 commits
  13. 09 Nov, 2009 1 commit
  14. 16 Jul, 2009 1 commit
    • zwelch's avatar
      Magnus Lundin <lundin@mlu.mine.nu>, Oyvind Harboe <oyvind.harboe@zylin.com>,... · 1af6b72f
      zwelch authored
      Magnus Lundin <lundin@mlu.mine.nu>, Oyvind Harboe <oyvind.harboe@zylin.com>, David Brownell <david-b@pacbell.net>:
      Move the dap command handler implementations to arm_adi_v5.c,
      leaving just thin wrappers in armv7m.c.  There should be no
      change in functionality here.  (From Magnus.)
      Minor style cleanup:  whitespace, line length, etc.  Update spec
      references to use docs which are currently available.  (From Dave.)
      git-svn-id: svn://svn.berlios.de/openocd/trunk@2544 b42882b7-edfa-0310-969c-e2dbd0fdcd60
  15. 23 Jun, 2009 3 commits
  16. 18 Jun, 2009 2 commits
  17. 04 Jun, 2009 1 commit
  18. 02 Jun, 2009 1 commit
    • ntfreak's avatar
      - change signature for adi_jtag_dp_scan and adi_jtag_dp_scan_u32 to use... · 7dc29156
      ntfreak authored
      - change signature for adi_jtag_dp_scan and adi_jtag_dp_scan_u32 to use swjdp_common_t *swjdp instead of arm_jtag_t *jtag_info
      - change SWJDP_IR/DR_APACC to DAP_IR/DR_APACC to conform with ARM_ADI docs.
      - add swjdp->memaccess_tck field and code for extra tck clocks before accessing memory bus
      - Set default memaccess value to 8 for Cortex-M3.
      - Add dap memaccess command.
      - document all armv7 dap cmds.
      - Original patch submitted by Magnus Lundin [lundin@mlu.mine.nu].
      git-svn-id: svn://svn.berlios.de/openocd/trunk@2005 b42882b7-edfa-0310-969c-e2dbd0fdcd60
  19. 27 Apr, 2009 2 commits
  20. 13 Dec, 2008 1 commit
  21. 20 Sep, 2008 1 commit
  22. 11 Mar, 2008 1 commit
  23. 02 Mar, 2008 1 commit
  24. 24 Jun, 2007 1 commit
  25. 14 Jun, 2007 1 commit