Commit Graph

114 Commits

Author SHA1 Message Date
Andreas Fritiofson 63fa73169b Retire jtag_add_dr_out
The out only version of jtag_add_dr_scan smells like a bogus optimization
that complicates the minidriver API for questionable gain.

The function was only used by four old ARM targets. Rewrite the callers
to use the generic function and remove all implementations.

Change-Id: I13b643687ee8ed6bc9b6336e7096c34f40ea96af
Signed-off-by: Andreas Fritiofson <andreas.fritiofson@gmail.com>
Reviewed-on: http://openocd.zylin.com/1801
Tested-by: jenkins
Reviewed-by: Spencer Oliver <spen@spen-soft.co.uk>
2014-01-20 13:28:26 +00:00
Spencer Oliver 08d4411b59 update files to correct FSF address
Change-Id: I429f7fd51f77b0e7c86d7a7f110ca31afd76c173
Signed-off-by: Spencer Oliver <spen@spen-soft.co.uk>
Reviewed-on: http://openocd.zylin.com/1426
Tested-by: jenkins
Reviewed-by: Paul Fertser <fercerpav@gmail.com>
2013-06-05 19:52:42 +00:00
Bill Traynor 6a1236a7ac zy1000: fixed link to Zylin ZY1000 JTAG Probe
This patch fixes the link to the Zylin ZY1000 JTAG Probe webpage.
The ZY1000 product line was acquired by Ultimate Solutions, Inc. in May 2011.

Change-Id: If68cd45a0c47aa20b2e4bb62939b2c505c8c8c2e
Signed-off-by: Bill Traynor <wmat@alphatroop.com>
Signed-off-by: Øyvind Harboe <oyvind.harboe@zylin.com>
Reviewed-on: http://openocd.zylin.com/571
Tested-by: jenkins
Reviewed-by: Peter Stuge <peter@stuge.se>
Reviewed-by: Spencer Oliver <spen@spen-soft.co.uk>
2012-04-18 22:07:15 +00:00
Øyvind Harboe 39650e2273 ecosboard: delete bit-rotted eCos code
Change-Id: Iff7943eb9da3f41dcc45492acd0f36cf63b3497f
Signed-off-by: Øyvind Harboe <oyvind.harboe@zylin.com>
Reviewed-on: http://openocd.zylin.com/503
Reviewed-by: Øyvind Harboe <oyvindharboe@gmail.com>
Tested-by: jenkins
2012-03-13 19:11:11 +00:00
Spencer Oliver de0130a0aa build: cleanup src/jtag/drivers directory
Change-Id: I99c08ec0132d5a15250050e718310f1ddd9fe546
Signed-off-by: Spencer Oliver <spen@spen-soft.co.uk>
Reviewed-on: http://openocd.zylin.com/425
Tested-by: jenkins
2012-02-06 10:59:07 +00:00
Øyvind Harboe 4668bd264c retire ERROR_INVALID_ARGUMENTS and replace with ERROR_COMMAND_SYNTAX_ERROR
Change-Id: I6dee51e1fab1944085391f274a343cdb9014c7a4
Signed-off-by: Øyvind Harboe <oyvind.harboe@zylin.com>
Reviewed-on: http://openocd.zylin.com/300
Tested-by: jenkins
Reviewed-by: Øyvind Harboe <oyvindharboe@gmail.com>
Reviewed-by: Spencer Oliver <spen@spen-soft.co.uk>
2012-01-04 17:13:46 +00:00
Øyvind Harboe 230f0e9dc6 zy1000: fix crash in JTAG over TCP/IP
disable asynchronous callbacks and reads as minidriver requires
reads and callbacks to be synchronous.

Could possibly be fixed by some design work.

Change-Id: I7ca79a551085b2e8ba6928e1762d1baed6e95d4b
Signed-off-by: Øyvind Harboe <oyvind.harboe@zylin.com>
Reviewed-on: http://openocd.zylin.com/260
Tested-by: jenkins
Reviewed-by: Øyvind Harboe <oyvindharboe@gmail.com>
Tested-by: Øyvind Harboe <oyvindharboe@gmail.com>
2011-12-13 19:00:45 +00:00
Jonas Hörberg e3f3f60a02 adapter speed: require init script setting and centralize activation from drivers to core.c
Signed-off-by: Jonas Hörberg <jhorberg@sauer-danfoss.com>
2011-05-01 00:38:04 +02:00
Øyvind Harboe 2615bf4398 types: write memory now uses const
Signed-off-by: Øyvind Harboe <oyvind.harboe@zylin.com>
2011-04-01 08:59:07 +02:00
Øyvind Harboe ec2b8d71ac zy1000: fix bug in ir scan handling
set cur_instr to BYPASS as optimisation code will
rely on checking the cached value.

Signed-off-by: Øyvind Harboe <oyvind.harboe@zylin.com>
2011-03-21 13:47:02 +01:00
Øyvind Harboe a343570195 zy1000: removed JTAG master TCP/IP server
Move ZY1000 OpenOCD driver more in the direction of being
a client to simplify code.

Signed-off-by: Øyvind Harboe <oyvind.harboe@zylin.com>
2011-03-21 08:11:03 +01:00
Øyvind Harboe 558f760ff0 zy1000: add code to check that SRST asserts
Signed-off-by: Øyvind Harboe <oyvind.harboe@zylin.com>
2011-03-18 13:29:24 +01:00
Øyvind Harboe 9eeb02c165 zy1000: switch to pthread
pthreads work under Linux and eCos.

Signed-off-by: Øyvind Harboe <oyvind.harboe@zylin.com>
2011-03-15 10:36:17 +01:00
Øyvind Harboe 2321bb3c42 zy1000: fix JTAG over TCP/IP performance problem
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>
2011-03-15 10:36:16 +01:00
Øyvind Harboe 4da640563b zy1000: fix incorrect usage of jtag_sleep()
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>
2011-03-15 10:36:16 +01:00
Øyvind Harboe 689c244389 zy1000: reduce memory usage for fw upgrade fn
Signed-off-by: Øyvind Harboe <oyvind.harboe@zylin.com>
2011-03-15 09:52:37 +01:00
Øyvind Harboe 740b9e25b4 jtag: getting the JTAG speed can fail
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>
2010-12-08 08:43:52 +01:00
Øyvind Harboe 6468c593c7 zy1000: fix non-JTAG master build
Signed-off-by: Øyvind Harboe <oyvind.harboe@zylin.com>
2010-09-26 20:38:29 +02:00
Øyvind Harboe 61780558e1 zy1000: add support for Linux host
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-09-20 20:45:16 +02:00
Øyvind Harboe 1dbb7ba472 zy1000: remove obsolete debug code
Obsolete code clutter

Signed-off-by: Øyvind Harboe <oyvind.harboe@zylin.com>
2010-09-20 13:08:16 +02:00
Øyvind Harboe c49d4c9f7f zy1000: use correct base clock when calculating speed divisor
revc uses 60MHz and revb 64MHz, use this in calculations.

Signed-off-by: Øyvind Harboe <oyvind.harboe@zylin.com>
2010-08-02 22:22:03 +02:00
Øyvind Harboe 4e27305ed5 zy1000: print out khz correctly in response to setting JTAG speed
Calculate printout based on same core routines.

Signed-off-by: Øyvind Harboe <oyvind.harboe@zylin.com>
2010-08-02 22:22:02 +02:00
Øyvind Harboe 495ef923ef debug-feature: jtagtcpip, improve jtag performance
postpone callbacks until jtag execute queue time.

Signed-off-by: Øyvind Harboe <oyvind.harboe@zylin.com>
2010-07-18 16:33:02 +02:00
Øyvind Harboe d16f9259c2 fix warnings
Signed-off-by: Øyvind Harboe <oyvind.harboe@zylin.com>
2010-07-16 16:03:32 +02:00
Øyvind Harboe 9cbf0723d5 debug-feature: jtagtcpip, reduce performance impact of ping times
queue read back of data

Signed-off-by: Øyvind Harboe <oyvind.harboe@zylin.com>
2010-07-16 16:03:25 +02:00
Øyvind Harboe 01b2a3091a debug feature: jtagtcpip, improve performance
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-16 12:18:59 +02:00
Øyvind Harboe bb588bdaec debug feature: jtagtcpip, improved performance
only check error flag when rclk is actually enabled.

Signed-off-by: Øyvind Harboe <oyvind.harboe@zylin.com>
2010-07-16 12:18:35 +02:00
Øyvind Harboe 80eb7e2a78 zy1000: fix arm11 optimisation
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-17 12:17:12 +02:00
Øyvind Harboe 9161b5fc5c zy1000: -Wshadow warning fix
Signed-off-by: Øyvind Harboe <oyvind.harboe@zylin.com>
2010-06-15 23:02:46 +02:00
Øyvind Harboe c634680384 zy1000: fix optimisation gaffe
DCC optimisation was broken on targets w/multiple TAP's.

Signed-off-by: Øyvind Harboe <oyvind.harboe@zylin.com>
2010-06-08 10:50:48 +02:00
Øyvind Harboe f6236ade0e zy1000: added watchdog server
Signed-off-by: Øyvind Harboe <oyvind.harboe@zylin.com>
2010-06-08 10:50:48 +02:00
Øyvind Harboe e804a34a63 zy1000: fix false positive warning about unitialized local variable
Signed-off-by: Øyvind Harboe <oyvind.harboe@zylin.com>
2010-05-18 12:10:44 +02:00
Øyvind Harboe 2fba796e27 zy1000: fix tcl command to read power dropout status
Signed-off-by: Øyvind Harboe <oyvind.harboe@zylin.com>
2010-05-05 15:24:24 +02:00
Øyvind Harboe 812e21ac39 zy1000: fix keep_alive() bug
introduced in latest commit. Should have held off merging
that commit. Sigh....

Signed-off-by: Øyvind Harboe <oyvind.harboe@zylin.com>
2010-05-05 15:24:24 +02:00
Øyvind Harboe 32e647acf4 zy1000: wait for srst to deassert
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-05-04 09:11:15 +02:00
Øyvind Harboe ed81249129 zy1000: dev tool
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-25 20:46:34 +01:00
Øyvind Harboe e736468b0e zy1000: allow it to build on linux host for testing purposes
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-25 09:50:37 +01:00
Øyvind Harboe 721502f1d3 zy1000: fix optimisaion bug in dcc writes
Introduced & corrected since 0.4.

Signed-off-by: Øyvind Harboe <oyvind.harboe@zylin.com>
2010-03-22 08:28:19 +01:00
Øyvind Harboe 7373d1c342 zy1000: clean up jtag_add_xx_scan fn's
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-19 14:47:01 +01:00
Øyvind Harboe 03359b1680 zy1000: fix bug in end state of DCC writes
Introduced in latest commits, found by code inspection &
GCC warning.

Signed-off-by: Øyvind Harboe <oyvind.harboe@zylin.com>
2010-03-19 14:27:19 +01:00
Øyvind Harboe 8ce828dd38 jtag: remove jtag_get_end_state()'s that should be unecessary
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-19 08:31:44 +01:00
Øyvind Harboe 7e447043cd zy1000: tweak the DCC inner loop a tiny bit
Uses FIFO a bit more efficiently now.

Signed-off-by: Øyvind Harboe <oyvind.harboe@zylin.com>
2010-03-17 07:40:00 +01:00
Øyvind Harboe 7a5c9c2f4a zy1000: embedded ice dcc tweak
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-08 08:37:13 +01:00
Øyvind Harboe 50dc56a488 jtag: simplify jtag_add_plain_ir/dr_scan
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-08 08:12:26 +01:00
Øyvind Harboe 57d7743639 jtag: jtag_add_ir_scan() now takes a single field
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-08 08:12:25 +01:00
Øyvind Harboe e018c7c1d2 jtag: retire tap field
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-08 08:12:25 +01:00
Øyvind Harboe b1c00e5a4e zy1000: faster jtag_add_ir_scan()
Faster and simpler.

Signed-off-by: Øyvind Harboe <oyvind.harboe@zylin.com>
2010-03-01 15:41:49 +01:00
Øyvind Harboe 27401e4c80 zy1000: arm11 load is now faster
290kBytes/s @ 8MHz, no need to inline jtag_tap_next_enabled().

Signed-off-by: Øyvind Harboe <oyvind.harboe@zylin.com>
2010-03-01 15:27:12 +01:00
Øyvind Harboe afbf927663 zy1000: add jtag_add_tms_seq support
Signed-off-by: Øyvind Harboe <oyvind.harboe@zylin.com>
2010-03-01 13:36:03 +01:00
David Brownell a3245bd7cd interface: define TMS sequence command
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-27 00:12:38 -08:00