summaryrefslogtreecommitdiff
path: root/src/jtag/zy1000
Commit message (Collapse)AuthorAgeFilesLines
* adapter speed: require init script setting and centralize activation from ↵Jonas Hörberg2011-05-011-5/+0
| | | | | | drivers to core.c Signed-off-by: Jonas Hörberg <jhorberg@sauer-danfoss.com>
* types: write memory now uses constØyvind Harboe2011-04-011-3/+3
| | | | Signed-off-by: Øyvind Harboe <oyvind.harboe@zylin.com>
* zy1000: fix bug in ir scan handlingØyvind Harboe2011-03-211-0/+5
| | | | | | | set cur_instr to BYPASS as optimisation code will rely on checking the cached value. Signed-off-by: Øyvind Harboe <oyvind.harboe@zylin.com>
* zy1000: removed JTAG master TCP/IP serverØyvind Harboe2011-03-211-125/+2
| | | | | | | Move ZY1000 OpenOCD driver more in the direction of being a client to simplify code. Signed-off-by: Øyvind Harboe <oyvind.harboe@zylin.com>
* zy1000: add code to check that SRST assertsØyvind Harboe2011-03-181-34/+42
| | | | Signed-off-by: Øyvind Harboe <oyvind.harboe@zylin.com>
* zy1000: switch to pthreadØyvind Harboe2011-03-151-11/+13
| | | | | | pthreads work under Linux and eCos. Signed-off-by: Øyvind Harboe <oyvind.harboe@zylin.com>
* zy1000: fix JTAG over TCP/IP performance problemØyvind Harboe2011-03-151-8/+11
| | | | | | | only flush write queue just before waiting for more data, rather than when fetching more data from the buffer. Signed-off-by: Øyvind Harboe <oyvind.harboe@zylin.com>
* zy1000: fix incorrect usage of jtag_sleep()Øyvind Harboe2011-03-151-1/+2
| | | | | | | | Found by inspection: the correct thing in the context is to use usleep() rather than jtag_sleep(). Relates to JTAG over TCP/IP only. Signed-off-by: Øyvind Harboe <oyvind.harboe@zylin.com>
* zy1000: reduce memory usage for fw upgrade fnØyvind Harboe2011-03-151-16/+2
| | | | Signed-off-by: Øyvind Harboe <oyvind.harboe@zylin.com>
* jtag: getting the JTAG speed can failØyvind Harboe2010-12-081-1/+5
| | | | | | | | | | | If the JTAG speed has not been set, then it has no defined value, add code to propagate the error. No change to actual behavior as no new failure paths have been introduced. This is a no-op patch to make subsequent patches smaller. Signed-off-by: Øyvind Harboe <oyvind.harboe@zylin.com>
* zy1000: fix non-JTAG master buildØyvind Harboe2010-09-261-1/+1
| | | | Signed-off-by: Øyvind Harboe <oyvind.harboe@zylin.com>
* zy1000: add support for Linux hostØyvind Harboe2010-09-202-6/+45
| | | | | | | | 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>
* zy1000: remove obsolete debug codeØyvind Harboe2010-09-201-7/+0
| | | | | | Obsolete code clutter Signed-off-by: Øyvind Harboe <oyvind.harboe@zylin.com>
* zy1000: use correct base clock when calculating speed divisorØyvind Harboe2010-08-021-4/+11
| | | | | | revc uses 60MHz and revb 64MHz, use this in calculations. Signed-off-by: Øyvind Harboe <oyvind.harboe@zylin.com>
* zy1000: print out khz correctly in response to setting JTAG speedØyvind Harboe2010-08-021-4/+33
| | | | | | Calculate printout based on same core routines. Signed-off-by: Øyvind Harboe <oyvind.harboe@zylin.com>
* debug-feature: jtagtcpip, improve jtag performanceØyvind Harboe2010-07-182-4/+76
| | | | | | postpone callbacks until jtag execute queue time. Signed-off-by: Øyvind Harboe <oyvind.harboe@zylin.com>
* fix warningsØyvind Harboe2010-07-161-2/+1
| | | | Signed-off-by: Øyvind Harboe <oyvind.harboe@zylin.com>
* debug-feature: jtagtcpip, reduce performance impact of ping timesØyvind Harboe2010-07-162-46/+103
| | | | | | queue read back of data Signed-off-by: Øyvind Harboe <oyvind.harboe@zylin.com>
* debug feature: jtagtcpip, improve performanceØyvind Harboe2010-07-162-0/+26
| | | | | | | | | 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>
* debug feature: jtagtcpip, improved performanceØyvind Harboe2010-07-161-9/+22
| | | | | | only check error flag when rclk is actually enabled. Signed-off-by: Øyvind Harboe <oyvind.harboe@zylin.com>
* zy1000: fix arm11 optimisationØyvind Harboe2010-06-171-79/+78
| | | | | | | | | | 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>
* zy1000: -Wshadow warning fixØyvind Harboe2010-06-151-2/+2
| | | | Signed-off-by: Øyvind Harboe <oyvind.harboe@zylin.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>
* 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>
* 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>
* 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>
* 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>
* 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: 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>
* 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>
* 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-081-4/+14
| | | | | | | 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-081-4/+2
| | | | | | | | 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-081-53/+19
| | | | | | | | | | | | | | | | | 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>
* 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>
* interface: define TMS sequence commandDavid Brownell2010-02-271-1/+10
| | | | | | | | | | | | | | | | | | | | | | | 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>
* arm11: improve performance using minidriver hookØyvind Harboe2010-02-221-3/+65
| | | | | | | | | | | | | | | | 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>
* arm11: allow minidrivers to implement inner loop of memory writesØyvind Harboe2010-02-221-0/+8
| | | | | | | | | | | | | | | 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>
* zy1000: jtag_add_dr_scan() performance improvementØyvind Harboe2010-02-221-8/+15
| | | | | | Reduce overhead in jtag_add_dr_scan() a bit. Signed-off-by: Øyvind Harboe <oyvind.harboe@zylin.com>
* zy1000: flush jtag buffer before changing speedØyvind Harboe2010-01-191-0/+3
| | | | | | | | | 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>
* zy1000: reset bugfixØyvind Harboe2010-01-111-1/+7
| | | | | | | 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>
* ZY1000 help/usage fixupsDavid Brownell2010-01-091-8/+11
| | | | | | | 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>
* zy1000: firmware upgrade fixes for revcØyvind Harboe2009-12-301-16/+45
| | | | | | Use ecos firmwareutil upgrade utilities Signed-off-by: Øyvind Harboe <oyvind.harboe@zylin.com>