aboutsummaryrefslogtreecommitdiff
path: root/src/jtag/zy1000/zy1000.c
AgeCommit message (Collapse)Author
2010-09-26zy1000: fix non-JTAG master buildØyvind Harboe
Signed-off-by: Øyvind Harboe <oyvind.harboe@zylin.com>
2010-09-20zy1000: add support for Linux hostØyvind Harboe
used /dev/mem and mmem() to memory map JTAG registers into user space and used new configure options to exclude eCos specific code. Signed-off-by: Øyvind Harboe <oyvind.harboe@zylin.com>
2010-08-02zy1000: use correct base clock when calculating speed divisorØyvind Harboe
revc uses 60MHz and revb 64MHz, use this in calculations. Signed-off-by: Øyvind Harboe <oyvind.harboe@zylin.com>
2010-08-02zy1000: print out khz correctly in response to setting JTAG speedØyvind Harboe
Calculate printout based on same core routines. Signed-off-by: Øyvind Harboe <oyvind.harboe@zylin.com>
2010-07-18debug-feature: jtagtcpip, improve jtag performanceØyvind Harboe
postpone callbacks until jtag execute queue time. Signed-off-by: Øyvind Harboe <oyvind.harboe@zylin.com>
2010-07-16fix warningsØyvind Harboe
Signed-off-by: Øyvind Harboe <oyvind.harboe@zylin.com>
2010-07-16debug-feature: jtagtcpip, reduce performance impact of ping timesØyvind Harboe
queue read back of data Signed-off-by: Øyvind Harboe <oyvind.harboe@zylin.com>
2010-07-16debug feature: jtagtcpip, improve performanceØyvind Harboe
waiting for ZY1000 fifo to idle is now queued as an asynchronous command. This radically improves performance when waitIdle() is interspersed with writes as no readback is required over TCP/IP. Signed-off-by: Øyvind Harboe <oyvind.harboe@zylin.com>
2010-07-16debug feature: jtagtcpip, improved performanceØyvind Harboe
only check error flag when rclk is actually enabled. Signed-off-by: Øyvind Harboe <oyvind.harboe@zylin.com>
2010-06-17zy1000: fix arm11 optimisationØyvind Harboe
copy & paste error + added FIFO throttling to work around lockup bug in FPGA. The arm11 optimisation was introduced post v0.4.0, so this is not a regression compared to previous release. Signed-off-by: Øyvind Harboe <oyvind.harboe@zylin.com>
2010-06-15zy1000: -Wshadow warning fixØyvind Harboe
Signed-off-by: Øyvind Harboe <oyvind.harboe@zylin.com>
2010-06-08zy1000: fix optimisation gaffeØyvind Harboe
DCC optimisation was broken on targets w/multiple TAP's. Signed-off-by: Øyvind Harboe <oyvind.harboe@zylin.com>
2010-06-08zy1000: added watchdog serverØyvind Harboe
Signed-off-by: Øyvind Harboe <oyvind.harboe@zylin.com>
2010-05-18zy1000: fix false positive warning about unitialized local variableØyvind Harboe
Signed-off-by: Øyvind Harboe <oyvind.harboe@zylin.com>
2010-05-05zy1000: fix tcl command to read power dropout statusØyvind Harboe
Signed-off-by: Øyvind Harboe <oyvind.harboe@zylin.com>
2010-05-05zy1000: fix keep_alive() bugØyvind Harboe
introduced in latest commit. Should have held off merging that commit. Sigh.... Signed-off-by: Øyvind Harboe <oyvind.harboe@zylin.com>
2010-05-04zy1000: wait for srst to deassertØyvind Harboe
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>
2010-03-25zy1000: dev toolØyvind Harboe
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>
2010-03-25zy1000: allow it to build on linux host for testing purposesØyvind Harboe
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>
2010-03-22zy1000: fix optimisaion bug in dcc writesØyvind Harboe
Introduced & corrected since 0.4. Signed-off-by: Øyvind Harboe <oyvind.harboe@zylin.com>
2010-03-19zy1000: clean up jtag_add_xx_scan fn'sØyvind Harboe
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>
2010-03-19zy1000: fix bug in end state of DCC writesØyvind Harboe
Introduced in latest commits, found by code inspection & GCC warning. Signed-off-by: Øyvind Harboe <oyvind.harboe@zylin.com>
2010-03-19jtag: remove jtag_get_end_state()'s that should be unecessaryØyvind Harboe
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>
2010-03-17zy1000: tweak the DCC inner loop a tiny bitØyvind Harboe
Uses FIFO a bit more efficiently now. Signed-off-by: Øyvind Harboe <oyvind.harboe@zylin.com>
2010-03-08zy1000: embedded ice dcc tweakØyvind Harboe
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>
2010-03-08jtag: simplify jtag_add_plain_ir/dr_scanØyvind Harboe
These fn's now clearly just clock out/in bits. No mystical fields are involved. Signed-off-by: Øyvind Harboe <oyvind.harboe@zylin.com>
2010-03-08jtag: jtag_add_ir_scan() now takes a single fieldØyvind Harboe
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>
2010-03-08jtag: retire tap fieldØyvind Harboe
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>
2010-03-01zy1000: faster jtag_add_ir_scan()Øyvind Harboe
Faster and simpler. Signed-off-by: Øyvind Harboe <oyvind.harboe@zylin.com>
2010-03-01zy1000: arm11 load is now fasterØyvind Harboe
290kBytes/s @ 8MHz, no need to inline jtag_tap_next_enabled(). Signed-off-by: Øyvind Harboe <oyvind.harboe@zylin.com>
2010-03-01zy1000: add jtag_add_tms_seq supportØyvind Harboe
Signed-off-by: Øyvind Harboe <oyvind.harboe@zylin.com>
2010-02-27interface: define TMS sequence commandDavid Brownell
For support of SWD we need to be able to clock out special bit sequences over TMS or SWDIO. Create this as a generic operation, not yet called by anything, which is split as usual into: - upper level abstraction ... here, jtag_add_tms_seq(); - midlayer implementation logic hooking that to the lowlevel code; - lowlevel minidriver operation ... here, interface_add_tms_seq(); - message type for request queue, here JTAG_TMS. This is done slightly differently than other operations: there's a flag saying whether the interface driver supports this request. (In fact a flag *word* so upper layers can learn about other capabilities too ... for example, supporting SWD operations.) That approach (flag) lets this method *eventually* be used to eliminate pathmove() and statemove() support from most adapter drivers, by moving all that logic into the mid-layer and increasing uniformity between the various drivers. (Which will in turn reduce subtle bugginess.) Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
2010-02-22arm11: improve performance using minidriver hookØyvind Harboe
zy1000 performance for GDB load went from 100kBytes/s to 300kBytes/s @ 8 MHz by implementing the inner loop of unack arm11 memory writes directly on top of the hw fifo. Profiling info: 78.57 0.77 0.77 arm11_run_instr_data_to_core_noack_inner 5.10 0.82 0.05 memcpy 4.08 0.86 0.04 jtag_tap_next_enabled 3.06 0.89 0.03 gdb_input Signed-off-by: Øyvind Harboe <oyvind.harboe@zylin.com>
2010-02-22arm11: allow minidrivers to implement inner loop of memory writesØyvind Harboe
This allows minidrivers to e.g. hardware accelerate memory writes. Same trick as is used for arm7/9 dcc writes. Added error propagation for memory transfer failures in code rearrangement. Also the JTAG end state is not updated until after the memory write run is complete. Signed-off-by: Øyvind Harboe <oyvind.harboe@zylin.com>
2010-02-22zy1000: jtag_add_dr_scan() performance improvementØyvind Harboe
Reduce overhead in jtag_add_dr_scan() a bit. Signed-off-by: Øyvind Harboe <oyvind.harboe@zylin.com>
2010-01-19zy1000: flush jtag buffer before changing speedØyvind Harboe
It is conceivable that there could be commands in the queue when a speed change request comes in. Flush the hw queue before changing speed. Not observed, found by inspection. Signed-off-by: Øyvind Harboe <oyvind.harboe@zylin.com>
2010-01-11zy1000: reset bugfixØyvind Harboe
flush JTAG FIFO before reset. Fixes RCLK problems observed w/lpc2148, but really fixes a wider range of problems. Signed-off-by: Øyvind Harboe <oyvind.harboe@zylin.com>
2010-01-09ZY1000 help/usage fixupsDavid Brownell
The usual: same EBNF as in the User's Guide, full sentence helptext, function names *are* their addresses. Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
2009-12-30zy1000: firmware upgrade fixes for revcØyvind Harboe
Use ecos firmwareutil upgrade utilities Signed-off-by: Øyvind Harboe <oyvind.harboe@zylin.com>
2009-12-10zy1000: revc FPGA now worksØyvind Harboe
remove kludge code. Signed-off-by: Øyvind Harboe <oyvind.harboe@zylin.com>
2009-12-08zy1000: some background info on the zy1000 file.Øyvind Harboe
Signed-off-by: Øyvind Harboe <oyvind.harboe@zylin.com>
2009-12-03change #include "embeddedice.h" to <target/embeddedice.h>Zachary T Welch
Changes from the flat namespace to heirarchical one. Instead of writing: #include "embeddedice.h" the following form should be used. #include <target/embeddedice.h> The exception is from .c files in the same directory.
2009-12-03change #include "minidriver.h" to <jtag/minidriver.h>Zachary T Welch
Changes from the flat namespace to heirarchical one. Instead of writing: #include "minidriver.h" the following form should be used. #include <jtag/minidriver.h> The exception is from .c files in the same directory.
2009-12-03change #include "interface.h" to <jtag/interface.h>Zachary T Welch
Changes from the flat namespace to heirarchical one. Instead of writing: #include "interface.h" the following form should be used. #include <jtag/interface.h> The exception is from .c files in the same directory.
2009-12-01zy1000: keep up with latest changes to command handlingØyvind Harboe
Keep up with Jim Tcl interpreter creation cleanup. Signed-off-by: Øyvind Harboe <oyvind.harboe@zylin.com>
2009-11-30zy1000: keep up with changes to command structureØyvind Harboe
Add missing COMMAND_REGISTRATION_DONE. For now the command syntax for zy1000 needs to be compatible across 0.3/0.4, the world outside OpenOCD interfaces to zy1000 using the old syntax. Post 0.4 release(0.4.1 even) I'll switch to subcommand scheme. Switch to subcommands post 0.3 lifecycle. Signed-off-by: Øyvind Harboe <oyvind.harboe@zylin.com>
2009-11-27zy1000: keep up with new command registration stuffØyvind Harboe
jim and classic style commands are both supported. Signed-off-by: Øyvind Harboe <oyvind.harboe@zylin.com>
2009-11-24use COMMAND_REGISTER macroZachary T Welch
Replaces direct calls to register_command() with a macro, to allow its parameters to be changed and callers updated in phases.
2009-11-22zy1000: fix breakage in command parsing code for power commandØyvind Harboe
Signed-off-by: Øyvind Harboe <oyvind.harboe@zylin.com>
2009-11-18fix zy1000 command handlerZachary T Welch
Rewrite ZY1000 power command handler to use new macros, simplify logic. Remove unused port command handler declaration.