summaryrefslogtreecommitdiff
path: root/src/jtag
Commit message (Collapse)AuthorAgeFilesLines
* jtag: factor init into 'jtag init'Zachary T Welch2009-12-021-0/+23
| | | | | Adds 'jtag init' command handler, which can be called as part of a fine-grained 'init' process.
* zy1000: keep up with latest changes to command handlingØyvind Harboe2009-12-011-1/+1
| | | | | | Keep up with Jim Tcl interpreter creation cleanup. Signed-off-by: Øyvind Harboe <oyvind.harboe@zylin.com>
* do not extern 'interp' from command.cZachary T Welch2009-11-301-1/+1
| | | | | Adds 'interp' field to command_context, chasing the few remaining references to the global variable outside of the command module.
* jtag: avoid using interp global variableZachary T Welch2009-11-302-6/+13
| | | | | Adds 'interp' field to jtag_tap_event_action structure to avoid using the global variable of same name.
* zy1000: keep up with changes to command structureØyvind Harboe2009-11-301-0/+1
| | | | | | | | | | | | | 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>
* split jim_newtap_cmd into piecesZachary T Welch2009-11-281-70/+94
| | | | | Moves the ID and IR-related option parsing to static helpers, removing two levels of indent.
* improve jtag_tap_configureZachary T Welch2009-11-281-77/+88
| | | | | | | Splits bulk of the jtag_tap_configure into jtag_tap_configure_event, removing three or four levels of indentation in the process. The resulting code was stylistically improved in other ways, but it should be functionally identical.
* improve jtag_tap_handle_event indentationZachary T Welch2009-11-281-23/+30
| | | | Use 'continue' to reduce identation levels and superfluous logic.
* begin moving JTAG jim handlers/helpersZachary T Welch2009-11-281-227/+236
| | | | | | | Moves the tertiary jim handlers and required static helpers to the top of tcl.c, defining them in a new registration array that is chained in both the top-level context and under the jtag command. The top-level commands can be removed at some point in the future to reduce clutter.
* split jim_jtag_command into multiple handlersZachary T Welch2009-11-281-180/+212
| | | | | | | | | Explodes the 'jtag' into separate command handlers, which are easier to understand and extend. Makes the code much easier to understand, though further simplifications are possible. This patch tries to minimize the noise when viewed with 'git diff -w'. Gives these commands improved built-in help and usage information.
* zy1000: keep up with new command registration stuffØyvind Harboe2009-11-271-42/+46
| | | | | | jim and classic style commands are both supported. Signed-off-by: Øyvind Harboe <oyvind.harboe@zylin.com>
* update minidummy interface driver command handlingZachary T Welch2009-11-271-1/+1
| | | | | Changes the interface definition field reference from register_commands to commands, which allows the module to compile.
* minidummy: fix compilation errorØyvind Harboe2009-11-271-2/+2
| | | | | | during refactoring a search and replace error crept in Signed-off-by: Øyvind Harboe <oyvind.harboe@zylin.com>
* use ARRAY_SIZE macroZachary T Welch2009-11-253-4/+4
| | | | | Search and destroy lingering cases where the ARRAY_SIZE macro should be used to convey more intrinsic meaning in the OpenOCD code.
* improve command handling examplesZachary T Welch2009-11-251-0/+14
| | | | | | Removes hello and foo commands from top-level registration. Instead, the dummy interface driver and faux flash driver have been augmented to register these commands as sub-commands.
* add jim_handler to command_registrationZachary T Welch2009-11-241-16/+27
| | | | | | Adding jim_handler field to command_registration allows removing the register_jim helper. All command registrations now go through the register_command{,s}() functions.
* remove register_callbacks from jtag interfaceZachary T Welch2009-11-2412-112/+33
| | | | | | | | Changes the jtag_interface->register_callbacks field to a list of commands to be registered. Changes callback to invocation of register_commands() with that command registration list. Removes all JTAG interface driver register_command callback functions, which the previous commits had converted into identical calls.
* vsllink: use register_commands()Zachary T Welch2009-11-241-20/+35
| | | | Use register_commands() with command registration array.
* jtag: use register_commands()Zachary T Welch2009-11-241-67/+119
| | | | Use register commands with command registration array.
* presto: use register_commands()Zachary T Welch2009-11-241-3/+12
| | | | Use register_commands() with command registration array.
* parport: use register_commands()Zachary T Welch2009-11-241-20/+37
| | | | Use register_commands() with a command registration array.
* jlink: use register_commands()Zachary T Welch2009-11-241-8/+18
| | | | Use register_commands() with command registration array.
* gw16012: use register_commands()Zachary T Welch2009-11-241-5/+12
| | | | Use register_commands() with command registration array.
* ft2232: use register_commands()Zachary T Welch2009-11-241-18/+41
| | | | Use register_commands() with a command registration array.
* at91rm9200: use register_commands()Zachary T Welch2009-11-241-3/+10
| | | | | | | Use register_commands() with command registration array. --- This module was broken by previous changes, but no one has complained. Are there still users for this modules?
* arm-jtag-ew: use register_commands()Zachary T Welch2009-11-241-4/+11
| | | | Uses register_commands() with command registration array.
* amt_jtagaccel: use register_commands()Zachary T Welch2009-11-241-8/+19
| | | | Use register_commands() with command_registration array.
* use COMMAND_REGISTER macroZachary T Welch2009-11-2411-40/+40
| | | | | Replaces direct calls to register_command() with a macro, to allow its parameters to be changed and callers updated in phases.
* improve startup tcl scriptsZachary T Welch2009-11-241-0/+15
| | | | | Fix a couple of layering violations missed in the last round. Add missing comment headers.
* jlink: rewrite to use jtag_usb_openZachary T Welch2009-11-241-61/+15
| | | | Rewrite jlink_usb_open to use jtag_usb_open helper.
* jlink: remove superfluous indentationZachary T Welch2009-11-241-52/+55
| | | | | Rewrite logic to remove indentation in jlink_usb_open, in prep for further surgery.
* rlink: use jtag_usb_open helperZachary T Welch2009-11-241-82/+49
| | | | | | | Rewrite rlink_init routine to use jtag_usb_open helper. Eliminates some spurious calls to exit(). Wraps a tremendously long line of comment to fit 80 columns too.
* rlink: eliminate spurious indentationZachary T Welch2009-11-241-55/+54
| | | | Rework rlink_init to use less indentation. Best viewed with diff -w.
* vsllink: rewrite to use jtag_usb_openZachary T Welch2009-11-241-54/+30
| | | | | | Rewrite vsllink_usb_open to use jtag_usb_open helper. Eliminates spurious calls to exit().
* usbprog: use jtag_usb_openZachary T Welch2009-11-241-30/+13
| | | | Rewrite usbprob_jtag_open to use jtag_usb_open helper.
* arm-jtag-ew: use jtag_usb_openZachary T Welch2009-11-241-36/+17
| | | | Rewrite armjtagwe_usb_open to use jtag_usb_open.
* add jtag/usb_common.[ch] filesZachary T Welch2009-11-243-1/+97
| | | | | | | | Begins to consolidate code used by several USB JTAG interfaces. This first patch provides the required build system changes and a common jtag_usb_open routine, which will replace the guts for probing the busses and devices for possible VID/PID matches. The following patches convert each driver to use it.
* zy1000: fix breakage in command parsing code for power commandØyvind Harboe2009-11-221-1/+1
| | | | Signed-off-by: Øyvind Harboe <oyvind.harboe@zylin.com>
* jtag: remove useless forward declarationsZachary T Welch2009-11-215-140/+76
| | | | | Removes some more useless forward declarations from a few JTAG drivers. Moves interface and bit-bang structure defitions below their callbacks.
* allow jtag interfaces to lack commandsZachary T Welch2009-11-211-2/+5
| | | | | Allow JTAG interface drivers to skip registering an register_commands callback when it will just be empty.
* fix zy1000 command handlerZachary T Welch2009-11-181-13/+11
| | | | | | Rewrite ZY1000 power command handler to use new macros, simplify logic. Remove unused port command handler declaration.
* use COMMAND_PARSE_ENABLE macro where appropriateZachary T Welch2009-11-181-12/+6
| | | | | | | | Updates all command parsing of simple "enable" and "disable" arguments. A few case in the tree use a tri-state or extended arguments, which cannot use this simple macro. Simlifies the xscale icache/dcache command handler logic.
* use COMMAND_PARSE_ON_OFF where appropriateZachary T Welch2009-11-182-17/+5
| | | | Updates all command parsing of "on" and "off" arguments.
* split startup.tcl file across modulesZachary T Welch2009-11-182-0/+43
| | | | | | | Moves definitions for each layer into their own file, eliminating layering violations in the built-in TCL code. Updates src/Makefile.am rules to include all files in the final startup.tcl input file, and others Makefile.am rules to distribute the new files in our packages.
* command_handler: change 'cmd_ctx' to CMD_CTXZachary T Welch2009-11-175-28/+28
| | | | Convert all command handler 'cmd_ctx' parameter usage with CMD_CTX.
* command_handler: change 'args' to CMD_ARGVZachary T Welch2009-11-179-76/+76
| | | | | This patch converts all instances of 'args' in COMMAND_HANDLER routines to use CMD_ARGV macro.
* command_handler: change to 'argc' to CMD_ARGCZachary T Welch2009-11-179-56/+56
| | | | | This patch converts all instances of 'argc' in COMMAND_HANDLER routines to use CMD_ARGC.
* jtag_registers: Avalon bridge flushing tweaksØyvind Harboe2009-11-171-1/+12
| | | | | | | | | | The code is now much more explicit. It flushes every N writes. For now flush every time, but tinkering with the bridge FIFO size and how often we flush clearly points in the direction of the Avalon write FIFO full being the culprit. Signed-off-by: Øyvind Harboe <oyvind.harboe@zylin.com>
* zy1000: add version command to print FPGA version and timestampsØyvind Harboe2009-11-171-2/+29
| | | | Signed-off-by: Øyvind Harboe <oyvind.harboe@zylin.com>
* zy1000: fix bug when running on non-arm CPUØyvind Harboe2009-11-171-1/+8
| | | | | | | Shifting by more than 32 is undefined for 32 bit integers according to the C standard. Robust solution is conditional code. Signed-off-by: Øyvind Harboe <oyvind.harboe@zylin.com>