summaryrefslogtreecommitdiff
path: root/src/jtag
Commit message (Collapse)AuthorAgeFilesLines
* zy1000: -Wshadow warning fixØyvind Harboe2010-06-151-2/+2
| | | | Signed-off-by: Øyvind Harboe <oyvind.harboe@zylin.com>
* jtag: added mising headerThomas Koeller2010-06-101-0/+1
| | | | | | | Distributions created by 'make dist' were incomplete due to a missing header file. Signed-off-by: Thomas Koeller <thomas.koeller@baslerweb.com>
* zy1000: fix optimisation gaffeØyvind Harboe2010-06-081-7/+30
| | | | | | DCC optimisation was broken on targets w/multiple TAP's. Signed-off-by: Øyvind Harboe <oyvind.harboe@zylin.com>
* zy1000: added watchdog serverØyvind Harboe2010-06-081-1/+92
| | | | Signed-off-by: Øyvind Harboe <oyvind.harboe@zylin.com>
* jtag: rename JTAG_MOVESTATE to JTAG_TLR_RESETØyvind Harboe2010-06-0713-14/+21
| | | | | | | | | JTAG_MOVESTATE is misleading, this cmd is only used for reset. JTAG_PATHMOVE should be used otherwise. Signed-off-by: Øyvind Harboe <oyvind.harboe@zylin.com>
* zy1000: fix false positive warning about unitialized local variableØyvind Harboe2010-05-181-1/+1
| | | | Signed-off-by: Øyvind Harboe <oyvind.harboe@zylin.com>
* zy1000: fix tcl command to read power dropout statusØyvind Harboe2010-05-051-3/+2
| | | | Signed-off-by: Øyvind Harboe <oyvind.harboe@zylin.com>
* zy1000: fix keep_alive() bugØyvind Harboe2010-05-051-0/+2
| | | | | | | introduced in latest commit. Should have held off merging that commit. Sigh.... Signed-off-by: Øyvind Harboe <oyvind.harboe@zylin.com>
* command context: fix errors when running certain commands on startupØyvind Harboe2010-05-051-2/+2
| | | | | | | | | | | Various commands, e.g. "arm mcr xxxx" would fail if invoked upon startup since it there was no command context defined for the jim interpreter in that case. A Jim interpreter is now associated with a command context(telnet, gdb server's) or the default global command context. Signed-off-by: Øyvind Harboe <oyvind.harboe@zylin.com>
* zy1000: wait for srst to deassertØyvind Harboe2010-05-041-13/+27
| | | | | | | | make wait for srst deassert more long latency friendly (JTAG over TCP/IP), print actual time if it was more than 1ms. Signed-off-by: Øyvind Harboe <oyvind.harboe@zylin.com>
* adapter: allow adjusting srst assert withmichal smulski2010-04-241-0/+24
| | | | Signed-off-by: Øyvind Harboe <oyvind.harboe@zylin.com>
* JTAG/COMMANDS: review scope of functionsAntonio Borneo2010-04-102-2/+1
| | | | | | Add "static" qualifier to private functions. Signed-off-by: Antonio Borneo <borneo.antonio@gmail.com>
* buildfixDavid Brownell2010-04-031-1/+2
| | | | | | | | | | Without this, a system using gcc (GCC) 4.2.4 (Ubuntu 4.2.4-1ubuntu4) aborts builds after reporting: tcl.c: In function ‘handle_irscan_command’: tcl.c:1168: warning: passing argument 1 of ‘buf_set_u32’ discards qualifiers from pointer target type Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
* jtag/tcl.c cleanup -- split out "adapter.c"David Brownell2010-03-274-430/+466
| | | | | | | | | | | | Clean up the jtag/tcl.c file, which was one of the biggest and messiest ones in that directory. Do it by splitting out all the generic adapter commands to a separate "adapter.c" file (leaving the "tcl.c" file holding only JTAG utilities). Also rename the little-used "jtag interface" to "adapter_name", which should have been at least re-categorized earlier (it's not jtag-only). Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
* zy1000: dev toolØyvind Harboe2010-03-252-27/+340
| | | | | | | | | first cut peek/poke over tcp/ip, used for debug/research purposes only. Long term JTAG over TCP/IP might be an offshoot. The performance is usable for development/testing purposes. Signed-off-by: Øyvind Harboe <oyvind.harboe@zylin.com>
* zy1000: allow it to build on linux host for testing purposesØyvind Harboe2010-03-252-27/+45
| | | | | | | For testing and checking the build this can be useful, it doesn't have any practical application outside development. Signed-off-by: Øyvind Harboe <oyvind.harboe@zylin.com>
* FT2232 Messaaging fixDavid Brownell2010-03-241-1/+1
| | | | | | | The init cleanup patch overlooked a message which was wrongly specific to the "usbjtag" layout. Fix. Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
* zy1000: fix optimisaion bug in dcc writesØyvind Harboe2010-03-221-8/+2
| | | | | | Introduced & corrected since 0.4. Signed-off-by: Øyvind Harboe <oyvind.harboe@zylin.com>
* bitq: fix warning now that out_value is constØyvind Harboe2010-03-221-1/+1
| | | | | | | This was an easy one. Just add the missing "const" to a local variable definition. Signed-off-by: Øyvind Harboe <oyvind.harboe@zylin.com>
* ft2232 init mess cleanupDavid Brownell2010-03-211-60/+99
| | | | | | | | | | | | | | | | | | | | | | In the ft2232 driver, initialization for many layouts punts to a routine called usbjtag_init(), instead of a routine specific to each layout. That routine is a mess built around a "what type layout am I" core. That's a bad design ... in this case, especially so, since it bypasses the layout-specific dispatch which was just done, and obfuscates the initialization which is at least somewhat generic, instead of being specific to the "usbjtag" layout. Split and document out the generic parts of usbjtag_init(), and make the rest of those layouts have layout-specific init methods. Also, rename usbjtag_reset() ... that also was not specific to the "usbjtag" layout, and thus contributed to the previous code structure confusion. (Eventually, all layout-specific code (and method tables) should probably live in files specific to each layout. These changes will facilitate those and other cleanups to this driver.) Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
* jtag: make out_value constØyvind Harboe2010-03-212-10/+11
| | | | | | Tightens up the jtag_add_xxx_scan() API Signed-off-by: Øyvind Harboe <oyvind.harboe@zylin.com>
* FT2232 comment tweaksDavid Brownell2010-03-191-6/+18
| | | | | | | Note that the FT4232 chips have four channels not two, and Elaborate on uses of the additional channels. Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
* zy1000: clean up jtag_add_xx_scan fn'sØyvind Harboe2010-03-191-88/+67
| | | | | | | The implementation is now more straightforward as the scan_fields have been greatly simplified over time. Signed-off-by: Øyvind Harboe <oyvind.harboe@zylin.com>
* zy1000: fix bug in end state of DCC writesØyvind Harboe2010-03-191-2/+2
| | | | | | | Introduced in latest commits, found by code inspection & GCC warning. Signed-off-by: Øyvind Harboe <oyvind.harboe@zylin.com>
* jtag: retire jtag_get/set_end_state()Øyvind Harboe2010-03-192-40/+0
| | | | | | | Voila! This get rids of mysteries about what what state the TAP is in. Signed-off-by: Øyvind Harboe <oyvind.harboe@zylin.com>
* jtag: remove jtag_get_end_state()'s that should be unecessaryØyvind Harboe2010-03-191-1/+1
| | | | | | | | By a bit of code inspection it seems like all of these instances of jtag_get_end_state() can be unambigously replaced by constants. Signed-off-by: Øyvind Harboe <oyvind.harboe@zylin.com>
* jtag: cut down on usage of unintended modification of global end stateØyvind Harboe2010-03-182-4/+8
| | | | | | | | | | | | | jtag_get/set_end_state() is now deprecated. There were lots of places in the code where the end state was unintentionally modified. The big Q is whether there were any places where the intention was to modify the end state. 0.5 is a long way off, so we'll get a fair amount of testing. Signed-off-by: Øyvind Harboe <oyvind.harboe@zylin.com>
* zy1000: tweak the DCC inner loop a tiny bitØyvind Harboe2010-03-171-5/+8
| | | | | | Uses FIFO a bit more efficiently now. Signed-off-by: Øyvind Harboe <oyvind.harboe@zylin.com>
* bitbang: add jtag_add_tms_seq supportØyvind Harboe2010-03-166-0/+33
| | | | Signed-off-by: Øyvind Harboe <oyvind.harboe@zylin.com>
* move "reset_config" out of JTAG command groupDavid Brownell2010-03-151-11/+11
| | | | | | | | | | | | The SRST configuration options are not specific to JTAG, so this command may be needed with non-JTAG debug sessions. Just move the command to a different group. (The TRST options are, however, clearly JTAG-specific, but for compatibility, they're now left alone. The flags they control could later be disabled in non-JTAG sessions.) Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
* rename jtag_nsrst_assert_width as adapter_nsrst_assert_widthDavid Brownell2010-03-153-15/+17
| | | | | | | | | | | Globally rename "jtag_nsrst_assert_width" as "adapter_nsrst_assert_width", and move it out of the "jtag" command group ... it needs to be used with non-JTAG transports Includes a migration aid (in jtag/startup.tcl) so that old user scripts won't break. That aid should Sunset in about a year. Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
* rename jtag_nsrst_delay as adapter_nsrst_delayDavid Brownell2010-03-153-14/+15
| | | | | | | | | | | Globally rename "jtag_nsrst_delay" as "adapter_nsrst_delay", and move it out of the "jtag" command group ... it needs to be used with non-JTAG transports Includes a migration aid (in jtag/startup.tcl) so that old user scripts won't break. That aid should Sunset in about a year. Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
* rename jtag_khz as adapter_khzDavid Brownell2010-03-154-17/+27
| | | | | | | | | | | Globally rename "jtag_khz" as "adapter_khz", and move it out of the "jtag" command group ... it needs to be used with non-JTAG transports Includes a migration aid (in jtag/startup.tcl) so that old user scripts won't break. That aid should Sunset in about a year. (We may want to update it to include a nag message too.) Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
* FT2232: bulidfixSpencer Oliver2010-03-151-1/+1
| | | | | | Fix build issue with commit c23d4596d2239bdbba080499de837f53e0c89e59 Signed-off-by: Spencer Oliver <ntfreak@users.sourceforge.net>
* rename jtag_interface_{init,quit}()David Brownell2010-03-143-14/+17
| | | | | | | These routines apply to non-JTAG debug adapters too. To reduce confusion, give them better (non-misleading) names. Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
* FT2232: lookup and save layout just onceDavid Brownell2010-03-141-31/+39
| | | | | | | | | | | | | | Streamline use of the layout: have the "ft2232_layout" command look it up and save the result, instead of having a few different chunks of code looking it up later, and saving just its name (which is already part of the layout). This - is cleaner - reports errors sooner - facilitates earlier adapter-specific setup - removes unused "default to "usbjtag" logic Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
* versaloon cleanup patchDavid Brownell2010-03-111-321/+271
| | | | | | | | | | | | | Remove undesirable - backslashes at end-of-line; - initializations of BSS data to zero/NULL; - overlong lines (80+ characters) - whitespace issues - brackets around single-line statements And other minor issues reported by the Linux "checkpatch" utility Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
* New JTAG driver for Versaloonsimon qian2010-03-111-1072/+304
| | | | | | | | | | This patch greatly simplifies the Versaloon driver: - reducing the code size from more than 50K to less than 28K - adding support for IR/DR scan with unlimited size - using tap_get_tms_path and tap_get_tms_path_len. Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
* Add support for Bus Pirate as a JTAG adapter.Michal Demin2010-03-113-0/+978
| | | | | | | | This includes a driver and matching config file. This support needs to be enabled through the initial "configure" (use "--enable-buspirate"). Signed-off-by: Michal Demin <michaldemin@gmail.com> Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
* split "interface" commands from "jtag" onesDavid Brownell2010-03-112-5/+25
| | | | | | | | | | | | | | | | | | | | | | | | | We'll need to be able to work with debug adapter interfaces (drivers) even when they're not used for JTAG ... for example, while there are multi-transport drivers which support JTAG *and* several other transports (or just one more, like SWD) there are also adapters with more limited goals (and no JTAG support at all). Start decoupling the two concepts ("debug adapter driver", "jtag") by having two command groups, which initialize separately. This will help us support OpenOCD sessions using only non-JTAG transports, in which JTAG commands should not be registered. Update docs to mention that the JTAG, SVF, and XSVF commands won't work without a JTAG transport. Note that at least commands working with SRST are still inappropriately coupled to JTAG ... inappropriate because (a) SRST is not part of the JTAG standard, for all that many platforms (like ARM) expect it; and also (b) because they're used with non-JTAG debug and programming interfaces, too. They should perhaps become generic "interface" operations at some point. (Similarly with the clock rate to be used by a given adapter.) Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
* JLINK: user info message cleanupSpencer Oliver2010-03-101-29/+46
| | | | | | | - remove trailing LF's from user info messages. - split long lines. Signed-off-by: Spencer Oliver <ntfreak@users.sourceforge.net>
* zy1000: embedded ice dcc tweakØyvind Harboe2010-03-081-21/+48
| | | | | | | | | | How many bits to shift out before/after enabled tap not in bypass is calculated outside the loop. This is more of a demonstration of principle and to clarify code than a performance optimisation as such. Follows up a bit on the simplification work in jtag interface. Signed-off-by: Øyvind Harboe <oyvind.harboe@zylin.com>
* jtag: simplify jtag_add_plain_ir/dr_scanØyvind Harboe2010-03-086-64/+55
| | | | | | | These fn's now clearly just clock out/in bits. No mystical fields are involved. Signed-off-by: Øyvind Harboe <oyvind.harboe@zylin.com>
* jtag: jtag_add_ir_scan() now takes a single fieldØyvind Harboe2010-03-087-26/+35
| | | | | | | | In the code a single field was all that was ever used. Makes jtag_add_ir_scan() simpler and leaves more complicated stuff to jtag_add_plain_ir_scan(). Signed-off-by: Øyvind Harboe <oyvind.harboe@zylin.com>
* jtag: retire tap fieldØyvind Harboe2010-03-087-113/+52
| | | | | | | | | | | | | | | | | jtag_add_dr/ir_scan() now takes the tap as the first argument, rather than for each of the fields passed in. The code never exercised the path where there was more than one tap being scanned, who knows if it even worked. This simplifies the implementation and reduces clutter in the calling code. use jtag_add_ir/dr_plain_scan() for more fancy situations. Signed-off-by: Øyvind Harboe <oyvind.harboe@zylin.com>
* minidriver: fix arm11 compilation problemØyvind Harboe2010-03-051-0/+6
| | | | Signed-off-by: Øyvind Harboe <oyvind.harboe@zylin.com>
* zy1000: faster jtag_add_ir_scan()Øyvind Harboe2010-03-011-9/+3
| | | | | | Faster and simpler. Signed-off-by: Øyvind Harboe <oyvind.harboe@zylin.com>
* zy1000: arm11 load is now fasterØyvind Harboe2010-03-011-42/+71
| | | | | | 290kBytes/s @ 8MHz, no need to inline jtag_tap_next_enabled(). Signed-off-by: Øyvind Harboe <oyvind.harboe@zylin.com>
* zy1000: add jtag_add_tms_seq supportØyvind Harboe2010-03-011-20/+41
| | | | Signed-off-by: Øyvind Harboe <oyvind.harboe@zylin.com>
* jtag: the post TAP state is now passed to the driversØyvind Harboe2010-03-014-4/+5
| | | | | | | | | | after clocking out a tms sequence, then the TAP will be in some state. This state is now handed to the drivers. TAP_INVALID is a possible state after a TMS sequence if switching to SWD. Signed-off-by: Øyvind Harboe <oyvind.harboe@zylin.com>