aboutsummaryrefslogtreecommitdiff
path: root/src/pld
AgeCommit message (Collapse)AuthorFilesLines
2019-05-14helper/command: change prototype of command_print/command_print_samelineAntonio Borneo2-8/+8
To prepare for handling TCL return values consistently, all calls to command_print/command_print_sameline should switch to CMD as first parameter. Change prototype of command_print() and command_print_sameline() to pass CMD instead of CMD_CTX. Since the first parameter is currently not used, the change can be done though scripts without manual coding. This patch is created using the command: sed -i PATTERN $(find src/ doc/ -type f) with all the following patters: 's/\(command_print(cmd\)->ctx,/\1,/' 's/\(command_print(CMD\)_CTX,/\1,/' 's/\(command_print(struct command_\)context \*context,/\1invocation *cmd,/' 's/\(command_print_sameline(cmd\)->ctx,/\1,/' 's/\(command_print_sameline(CMD\)_CTX,/\1,/' 's/\(command_print_sameline(struct command_\)context \*context,/\1invocation *cmd,/' This change is inspired by http://openocd.zylin.com/1815 from Paul Fertser but is now done through scripting. Change-Id: I3386d8f96cdc477e7a2308dd18269de3bed04385 Signed-off-by: Antonio Borneo <borneo.antonio@gmail.com> Signed-off-by: Paul Fertser <fercerpav@gmail.com> Reviewed-on: http://openocd.zylin.com/5081 Tested-by: jenkins Reviewed-by: Tomas Vanek <vanekt@fbl.cz>
2019-04-07Set empty usage field for commands that do not need parametersAntonio Borneo1-0/+1
The missing field causes runtime debug message BUG: command '%s' does not have the '.usage' field filled out While there, fix some minor typo in the help messages: s/deasert/deassert/ s/Deasert/Deassert/ Change-Id: If3dd18265cda103ca0d05609f67f4ca58e7cbb27 Signed-off-by: Antonio Borneo <borneo.antonio@gmail.com> Reviewed-on: http://openocd.zylin.com/5024 Tested-by: jenkins Reviewed-by: Tomas Vanek <vanekt@fbl.cz>
2016-12-08Convert to non-recursive makeAndreas Fritiofson1-8/+8
Change-Id: I11f8bc8553957e2ff083c09e72e16881e4d3bb6f Signed-off-by: Andreas Fritiofson <andreas.fritiofson@gmail.com> Reviewed-on: http://openocd.zylin.com/3865 Tested-by: jenkins Reviewed-by: Paul Fertser <fercerpav@gmail.com>
2016-05-24Make #include guard naming consistentMarc Schink3-9/+9
Change-Id: Ie13e8af0bb74ed290f811dcad64ad06c9d8cb4fa Signed-off-by: Marc Schink <openocd-dev@marcschink.de> Reviewed-on: http://openocd.zylin.com/2956 Tested-by: jenkins Reviewed-by: Andreas Fritiofson <andreas.fritiofson@gmail.com>
2016-05-24Remove FSF address from GPL noticesMarc Schink6-18/+6
Also make GPL notices consistent according to: https://www.gnu.org/licenses/gpl-howto.html Change-Id: I84c9df40a774958a7ed91460c5d931cfab9f45ba Signed-off-by: Marc Schink <openocd-dev@marcschink.de> Reviewed-on: http://openocd.zylin.com/3488 Tested-by: jenkins Reviewed-by: Andreas Färber <afaerber@suse.de> Reviewed-by: Freddie Chopin <freddie.chopin@gmail.com> Reviewed-by: Andreas Fritiofson <andreas.fritiofson@gmail.com>
2015-08-06cpld/virtex2: allow JSTART to be disabledRobert Jordens2-5/+12
This adds an option to disable the use of the JSTART instruction when loading bitstreams to xilinx fpgas. JSTART apparently prevents configuration if the startup clock is not set to the jtag clock in the bitstream. xc3sprog is omitting JSTART for all devices. Problems with loading a bitstream that does not have StartupClk:JTAGClk are described here: http://www.xilinx.com/support/answers/56151.html Change-Id: I8137c0bae05a8c3c6f8e2611869f70a770d1651d Signed-off-by: Robert Jordens <jordens@gmail.com> Reviewed-on: http://openocd.zylin.com/2860 Tested-by: jenkins Reviewed-by: Spencer Oliver <spen@spen-soft.co.uk>
2013-06-05update files to correct FSF addressSpencer Oliver6-6/+6
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>
2012-05-21build: add helper/types.h to config.hSpencer Oliver1-2/+0
this header is used in numerous files and adding to config.h simplifies its use globally. Change-Id: Id724a9950b90504721233022c7fb5768e9bc5548 Signed-off-by: Spencer Oliver <spen@spen-soft.co.uk> Reviewed-on: http://openocd.zylin.com/649 Tested-by: jenkins Reviewed-by: Xiaofan <xiaofanc@gmail.com>
2012-02-06build: cleanup src/pld directorySpencer Oliver6-120/+84
Change-Id: I9edb027c76e5d7fe21d557a11e6a9691fa581e86 Signed-off-by: Spencer Oliver <spen@spen-soft.co.uk> Reviewed-on: http://openocd.zylin.com/408 Tested-by: jenkins
2012-01-18cmd: add missing usage varsSpencer Oliver2-0/+3
we should have caught them all - hopefully. Change-Id: I35435317fccaf5ad0216244d69f76db6857bb582 Signed-off-by: Spencer Oliver <spen@spen-soft.co.uk> Reviewed-on: http://openocd.zylin.com/381 Tested-by: jenkins Reviewed-by: Øyvind Harboe <oyvindharboe@gmail.com>
2012-01-04Change return value on error.Mathias K2-8/+4
On wrong parameters a error is signalized to the calling function. Change-Id: I484443fdb39938e20382edc9246d5ec546a5c960 Signed-off-by: Mathias K <kesmtp@freenet.de> Signed-off-by: Øyvind Harboe <oyvind.harboe@zylin.com> Reviewed-on: http://openocd.zylin.com/282 Tested-by: jenkins Reviewed-by: Øyvind Harboe <oyvindharboe@gmail.com>
2012-01-04retire ERROR_INVALID_ARGUMENTS and replace with ERROR_COMMAND_SYNTAX_ERRORØyvind Harboe1-1/+1
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>
2011-06-04Fix "unused variable" warnings (errors) detected with GCC 4.7.0 - trivial fixesFreddie Chopin1-3/+0
2010-12-29warnings: use more 'const' for char *Øyvind Harboe1-1/+1
Signed-off-by: Øyvind Harboe <oyvind.harboe@zylin.com>
2010-11-18build: add common.mkSpencer Oliver1-3/+1
Rather than specifying common makefile variables move them all to a common.mk. Signed-off-by: Spencer Oliver <ntfreak@users.sourceforge.net>
2010-09-20warnings: fix alignment warningsØyvind Harboe1-1/+1
These warnings are for architectures that do not support non-aligned word access. Signed-off-by: Øyvind Harboe <oyvind.harboe@zylin.com>
2010-04-10PLD: review scope of functionsAntonio Borneo2-3/+2
Add "static" qualifier to private functions. Signed-off-by: Antonio Borneo <borneo.antonio@gmail.com>
2010-03-20jtag: move towards making out_value constØyvind Harboe1-3/+4
These were relatively straightforward fixes which are backwards compatible. Signed-off-by: Øyvind Harboe <oyvind.harboe@zylin.com>
2010-03-19jtag: retire jtag_get/set_end_state()Øyvind Harboe1-2/+0
Voila! This get rids of mysteries about what what state the TAP is in. Signed-off-by: Øyvind Harboe <oyvind.harboe@zylin.com>
2010-03-18jtag: cut down on usage of unintended modification of global end stateØyvind Harboe1-6/+6
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>
2010-03-08jtag: jtag_add_ir_scan() now takes a single fieldØyvind Harboe1-1/+1
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 Harboe1-8/+4
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-01-08PLD: usage/help updatesDavid Brownell2-12/+13
Make "usage" messages use the same EBNF as the User's Guide; no angle brackets. Improve and correct various helptexts. Don't use "&function"; a function's name is its address. Remove a couple instances of pointless whitespace, shrink a few overlong lines. Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
2009-12-08build: add build/src to include pathØyvind Harboe1-1/+2
This allows including generated include files. Signed-off-by: Øyvind Harboe <oyvind.harboe@zylin.com>
2009-12-03remove tertiary include pathsZachary T Welch1-4/+1
With all #include directives converted, we only need to have the top-level src/ directory in the search path.
2009-12-03change #include "jtag.h" to <jtag/jtag.h>Zachary T Welch1-1/+1
Changes from the flat namespace to heirarchical one. Instead of writing: #include "jtag.h" the following form should be used. #include <jtag/jtag.h> The exception is from .c files in the same directory.
2009-12-03change #include "types.h" to <helper/types.h>Zachary T Welch1-1/+1
Changes from the flat namespace to heirarchical one. Instead of writing: #include "types.h" the following form should be used. #include <helper/types.h> The exception is from .c files in the same directory.
2009-12-03change #include "time_support.h" to <helper/time_support.h>Zachary T Welch1-1/+1
Changes from the flat namespace to heirarchical one. Instead of writing: #include "time_support.h" the following form should be used. #include <helper/time_support.h> The exception is from .c files in the same directory.
2009-12-03change #include "log.h" to <helper/log.h>Zachary T Welch2-2/+2
Changes from the flat namespace to heirarchical one. Instead of writing: #include "log.h" the following form should be used. #include <helper/log.h> The exception is from .c files in the same directory.
2009-12-03change #include "command.h" to <helper/command.h>Zachary T Welch1-1/+1
Changes from the flat namespace to heirarchical one. Instead of writing: #include "command.h" the following form should be used. #include <helper/command.h> The exception is from .c files in the same directory.
2009-12-03allow #include directives to use module nameZachary T Welch1-0/+1
Includes the src directory in the search path, so header files may be migrated from: #include "foo.h" to #include <module/foo.h> which is more conducive for installation.
2009-12-02pld: factor init to 'pld init'Zachary T Welch1-0/+23
Split PLD initialization into 'pld init', which gets called from 'init'.
2009-11-24pld: use static registration instead of callbackZachary T Welch3-12/+12
Remove register_callbacks from pld_device structure, using an array of command_registration records instead.
2009-11-24pld: use register_commands()Zachary T Welch2-22/+60
Updates core PLD and virtex2 commands to use register_commands().
2009-11-24use COMMAND_REGISTER macroZachary T Welch2-6/+6
Replaces direct calls to register_command() with a macro, to allow its parameters to be changed and callers updated in phases.
2009-11-17command_handler: change 'cmd_ctx' to CMD_CTXZachary T Welch2-11/+11
Convert all command handler 'cmd_ctx' parameter usage with CMD_CTX.
2009-11-17command_handler: change 'args' to CMD_ARGVZachary T Welch2-13/+13
This patch converts all instances of 'args' in COMMAND_HANDLER routines to use CMD_ARGV macro.
2009-11-17command_handler: change to 'argc' to CMD_ARGCZachary T Welch2-4/+4
This patch converts all instances of 'argc' in COMMAND_HANDLER routines to use CMD_ARGC.
2009-11-16rename CEIL as DIV_ROUND_UPZachary T Welch1-1/+1
Improves the name of this macro, moves it to types.h, and adds a block of Doxygen comments to describe what it does.
2009-11-13command_t -> struct commandZachary T Welch2-2/+2
Remove misleading typedef and redundant suffix from struct command.
2009-11-13command_context_t -> struct command_contextZachary T Welch3-6/+6
Remove misleading typedef and redundant suffix from struct command_context.
2009-11-13pld_device_t -> struct pld_deviceZachary T Welch3-19/+19
Remove misleading typedef and redundant suffix from struct pld_device.
2009-11-13virtex2_pld_device_t -> struct virtex2_pld_deviceZachary T Welch2-8/+8
Remove misleading typedef and redundant suffix from struct virtex2_pld_device.
2009-11-13xilinx_bit_file_t -> struct xilinx_bit_fileZachary T Welch3-5/+5
Remove misleading typedef and redundant suffix from struct xilinx_bit_file.
2009-11-13pld_driver_t -> struct pld_driverZachary T Welch3-6/+6
Remove misleading typedef and redundant suffix from struct pld_driver.
2009-11-13scan_field_t -> struct scan_fieldZachary T Welch1-4/+4
Remove useless structure typedef.
2009-11-13jtag_tap_t -> struct jtag_tapZachary T Welch2-3/+3
Search and destroy the jtag_tap_t typedef. This also cleans up a layering violation, removing the declaration from types.h.
2009-11-13use CALL_COMMAND_HANDLER instead of direct callsZachary T Welch1-1/+2
By using CALL_COMMAND_HANDLER, parameters can be reordered, added, or even removed in inherited signatures, without requiring revisiting all of the various call sites.
2009-11-13add PLD_DEVICE_COMMAND_HANDLER macroZachary T Welch2-4/+9
Update virtex module to use abstracted PLD command handling.
2009-11-13use COMMAND_HANDLER macro to define all commandsZachary T Welch2-8/+4