aboutsummaryrefslogtreecommitdiff
path: root/src/jtag/ft2232.c
AgeCommit message (Collapse)AuthorFilesLines
2009-12-02move jtag drivers to src/jtag/driversZachary T Welch1-4021/+0
Moves JTAG interface drivers to src/jtag/drivers/, Adds src/jtag/drivers/Makefile.am. Builds libocdjtagdrivers.la. Flattens the rlink driver files into the drivers/ directory, adding the 'rlink_' prefix or '.rlink' suffix as appropriate.
2009-11-25use ARRAY_SIZE macroZachary T Welch1-2/+2
Search and destroy lingering cases where the ARRAY_SIZE macro should be used to convey more intrinsic meaning in the OpenOCD code.
2009-11-24remove register_callbacks from jtag interfaceZachary T Welch1-7/+1
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.
2009-11-24ft2232: use register_commands()Zachary T Welch1-18/+41
Use register_commands() with a command registration array.
2009-11-24use COMMAND_REGISTER macroZachary T Welch1-5/+5
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 'args' to CMD_ARGVZachary T Welch1-7/+7
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 Welch1-10/+10
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-7/+7
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-14compile with cygwin (32-bit)Ferdinand Postema1-2/+2
Changed some printf format strings.. [dbrownell@users.sourceforge.net: shrink lines, fix indents] Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
2009-11-13command_context_t -> struct command_contextZachary T Welch1-1/+1
Remove misleading typedef and redundant suffix from struct command_context.
2009-11-13jtag_command_t -> struct jtag_commandZachary T Welch1-14/+14
Remove useless typedef from struct jtag_command.
2009-11-13scan_command_t -> struct scan_commandZachary T Welch1-1/+1
Remove misleading typedef on struct scan_command.
2009-11-13ft2232_device_t -> struct ft2232_deviceZachary T Welch1-6/+5
Remove misleading typedef from ft2232_device; it was barely used.
2009-11-13jtag_interface_t -> struct jtag_interfaceZachary T Welch1-1/+1
Remove useless typedef and redundant suffix from struct jtag_interface.
2009-11-13command_handler_t: make argc unsignedZachary T Welch1-3/+2
The number of command arguments will always be 0 or more, so use the right type in handlers. This has a cascading effect up through the layers, but the new COMMAND_HANDLER macros prevented total chaos.
2009-11-13use COMMAND_HANDLER macro to define all commandsZachary T Welch1-5/+5
2009-11-09jtag: remove useless declarationsZachary T Welch1-42/+35
Contrary to my previous assessment, some opportunities to remove forward declarations were overlooked. Remove them by moving the definitions of the command registration and interface structure to the end of files.
2009-11-05Improve jtag command argument parsing.Zachary T Welch1-6/+2
2009-11-04ft2232: cleanupDavid Brownell1-110/+97
Previous patch somehow made GCC lose some of its cookies; work around, zero-init that struct. Clean up code from the previous patch. Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
2009-11-04JTAG: support KT-LINK adapterKrzysztof Kajstura1-0/+131
Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
2009-11-01FT2232: increase read retry countsDimitar Dimitrov1-8/+26
This change is necessary to debug AT91SAM9260 on my PC with a FT2232H dongle. Signed-off-by: Dimitar Dimitrov <dinuxbg@gmail.com> Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
2009-10-27Signalyzer: H2 and H4 supportOleg Seiljus1-0/+809
This patch includes partial support for these new JTAG adapters. More complete support will require updates to the libftdi code, for EEPROM access. [dbrownell@users.sourceforge.net: fix whitespace, linelen, etc ] Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
2009-10-26ft2232: less noise with _DEBUG_JTAG_IO_David Brownell1-1/+0
Don't log "Yes, I'm *still* in TAP_IDLE" every seven runtest clocks.
2009-10-07Remove much #ifdeffery around _DEBUG_JTAG_IO_ usage.dbrownell1-24/+21
Have DEBUG_JTAG_IO() always trigger necessary warnings. git-svn-id: svn://svn.berlios.de/openocd/trunk@2822 b42882b7-edfa-0310-969c-e2dbd0fdcd60
2009-09-28if srst pulls trst, then set state to TAP_RESET. oharboe1-3/+11
git-svn-id: svn://svn.berlios.de/openocd/trunk@2767 b42882b7-edfa-0310-969c-e2dbd0fdcd60
2009-09-27Update FT2232 driver so that it reliably enters TAP_RESET.dbrownell1-2/+10
When the OpenOCD server starts up it records its state as TAP_RESET, even though it could be anything. Then when it starts to examine the scan chain, it calls jtag_add_tlr() which sees it doesn't have any work to do, and so it does nothing. This can make the next operations fail because they start from the wrong TAP state... Instead of caring about the current recorded state, always enter TAP_RESET by forcing five clocks with TMS high. (NOTE: it seems most other JTAG adapter drivers have this same bug.) git-svn-id: svn://svn.berlios.de/openocd/trunk@2763 b42882b7-edfa-0310-969c-e2dbd0fdcd60
2009-09-19Style cleanup for the updated ft2232_add_pathmove().dbrownell1-15/+18
Indentation, whitespace, line lengths. git-svn-id: svn://svn.berlios.de/openocd/trunk@2731 b42882b7-edfa-0310-969c-e2dbd0fdcd60
2009-09-17michal smulski <michal.smulski@ooma.com> fix regression in ↵oharboe1-18/+30
jtag_add_pathmove() which broke arm11 in r1825. Other uses of jtag_add_pathmove are svn + xsvf + xscale... git-svn-id: svn://svn.berlios.de/openocd/trunk@2722 b42882b7-edfa-0310-969c-e2dbd0fdcd60
2009-08-20- remove enable-ft2232-highspeed configure option, high speed ftdi support ↵ntfreak1-12/+19
is now detected during the configure stage - warning now issued if high speed ftdi device found and openocd was built using an old driver git-svn-id: svn://svn.berlios.de/openocd/trunk@2599 b42882b7-edfa-0310-969c-e2dbd0fdcd60
2009-08-19Jonas Horberg [jhorberg@sauer-danfoss.com]:ntfreak1-1/+1
Fix small typo in ftd2xx type detection git-svn-id: svn://svn.berlios.de/openocd/trunk@2597 b42882b7-edfa-0310-969c-e2dbd0fdcd60
2009-08-18Jonas Horberg [jhorberg@sauer-danfoss.com]ntfreak1-159/+148
https://lists.berlios.de/pipermail/openocd-development/2009-August/009939.html 1. It can only be built with the FTD2XX driver. libftdi supports FT2232H/FT4232H since version 0.16 2. A speed value of 0 is used as a RTCK request indicator. This clashes with the valid clock division value 0 that provide the highest fixed clock frequency. 3. The ft2232_speed_div function return the maximum selectable frequency (30MHz) when RTCK is activated. It should return 0. 4. The ft2232_khz function return ERROR_OK when RTCK is requested even for devices lacking RTCK support. It should return ERROR_FAIL so the upper driver layers can detect this and try to fallback to a fixed frequency. 5. FT2232H/FT4232H have a backward compatibility function that divide the clock by 5 to get the same frequency range as FT2232D. There is no code that disable this functionality. I can not find anything about if this is enabled or disabled by default. I think it is safest to actively disable it. git-svn-id: svn://svn.berlios.de/openocd/trunk@2591 b42882b7-edfa-0310-969c-e2dbd0fdcd60
2009-07-02Fix FTD2XX build for CygWin.zwelch1-1/+1
git-svn-id: svn://svn.berlios.de/openocd/trunk@2454 b42882b7-edfa-0310-969c-e2dbd0fdcd60
2009-06-30Marcel Jost <marcel.jost@bfh.ch>:zwelch1-0/+10
This patch adds support for the Luminary Micro LM3S9B90 target and LM3S9B92 Evaluation Kit. These kits include a new ft2232 adapter, the Luminary In-Circuit Debug Interface (ICDI) Board, so this is added as a new ft2232 layout called "luminary_icdi". git-svn-id: svn://svn.berlios.de/openocd/trunk@2429 b42882b7-edfa-0310-969c-e2dbd0fdcd60
2009-06-23Remove whitespace at end of lines, step 2.zwelch1-11/+11
- Replace '\s*$' with ''. git-svn-id: svn://svn.berlios.de/openocd/trunk@2380 b42882b7-edfa-0310-969c-e2dbd0fdcd60
2009-06-23Remove whitespace that occurs before ')'.zwelch1-1/+1
- Replace '[ \t]*[)]' with ')'. git-svn-id: svn://svn.berlios.de/openocd/trunk@2377 b42882b7-edfa-0310-969c-e2dbd0fdcd60
2009-06-23Remove whitespace that occurs after '('.zwelch1-1/+1
- Replace '([ \t]*' with '('. git-svn-id: svn://svn.berlios.de/openocd/trunk@2376 b42882b7-edfa-0310-969c-e2dbd0fdcd60
2009-06-23- Fixes '[<>]' whitespacezwelch1-1/+1
- Replace ')\([<>]\)(' with ') \1 ('. - Replace ')\([<>]\)\(\w\)' with ') \1 \2'. - Replace '\(\w\)\([<>]\)(' with '\1 \2 ('. - Replace '\(\w\)\([<>]\)\(\w\)' with '\1 \2 \3'. git-svn-id: svn://svn.berlios.de/openocd/trunk@2375 b42882b7-edfa-0310-969c-e2dbd0fdcd60
2009-06-23- Fixes '+' whitespacezwelch1-1/+1
- Replace ')\(+\)(' with ') \1 ('. - Replace ')\(+\)\(\w\)' with ') \1 \2'. - Replace '\(\w\)\(+\)(' with '\1 \2 ('. - Replace '\(\w\)\(+\)\(\w\)' with '\1 \2 \3'. git-svn-id: svn://svn.berlios.de/openocd/trunk@2373 b42882b7-edfa-0310-969c-e2dbd0fdcd60
2009-06-23- Fixes '=' whitespacezwelch1-24/+24
- Replace ')\(=\)\(\w\)' with ') \1 \2'. - Replace '\(\w\)\(=\)(' with '\1 \2 ('. - Replace '\(\w\)\(=\)\(\w\)' with '\1 \2 \3'. git-svn-id: svn://svn.berlios.de/openocd/trunk@2372 b42882b7-edfa-0310-969c-e2dbd0fdcd60
2009-06-23- Fixes '==' whitespacezwelch1-4/+4
- Replace ')\(==\)\(\w\)' with ') \1 \2'. - Replace '\(\w\)\(==\)\(\w\)' with '\1 \2 \3'. git-svn-id: svn://svn.berlios.de/openocd/trunk@2371 b42882b7-edfa-0310-969c-e2dbd0fdcd60
2009-06-23- Fixes '<<' whitespacezwelch1-2/+2
- Replace ')\(<<\)\(\w\)' with ') \1 \2'. - Replace '\(\w\)\(<<\)(' with '\1 \2 ('. - Replace '\(\w\)\(<<\)\(\w\)' with '\1 \2 \3'. git-svn-id: svn://svn.berlios.de/openocd/trunk@2370 b42882b7-edfa-0310-969c-e2dbd0fdcd60
2009-06-23- Fixes '!=' whitespacezwelch1-1/+1
- Replace ')\(!=\)\(\w\)' with ') \1 \2'. - Replace '\(\w\)\(!=\)(' with '\1 \2 ('. - Replace '\(\w\)\(!=\)\(\w\)' with '\1 \2 \3'. git-svn-id: svn://svn.berlios.de/openocd/trunk@2363 b42882b7-edfa-0310-969c-e2dbd0fdcd60
2009-06-19printf() warning fixes due to uint32_t change-overduane1-6/+17
git-svn-id: svn://svn.berlios.de/openocd/trunk@2293 b42882b7-edfa-0310-969c-e2dbd0fdcd60
2009-06-18Finish transforming 'u32' to 'uint32_t'.zwelch1-21/+21
- Replace '\([^_]\)u32' with '\1uint32_t'. - Replace '^u32' with 'uint32_t'. git-svn-id: svn://svn.berlios.de/openocd/trunk@2281 b42882b7-edfa-0310-969c-e2dbd0fdcd60
2009-06-18Transform 'u16' to 'uint16_t'zwelch1-4/+4
- Replace '\([^_]\)u16' with '\1uint16_t'. - Replace '^u16' with 'uint16_t'. git-svn-id: svn://svn.berlios.de/openocd/trunk@2277 b42882b7-edfa-0310-969c-e2dbd0fdcd60
2009-06-18Transform 'u8' to 'uint8_t'zwelch1-43/+43
- Replace '\([^_]\)u8' with '\1uint8_t'. - Replace '^u8' with 'uint8_t'. git-svn-id: svn://svn.berlios.de/openocd/trunk@2276 b42882b7-edfa-0310-969c-e2dbd0fdcd60
2009-06-12Improve VID/PID command argument handling in FTDI driver:zwelch1-7/+13
- Bug fix: Return a syntax error when less than two arguments are given. - Bug fix: Use parse_u16 helper to ensure vales are parsed properly. - Simplify loop termination logic by ensuring argc is always even. - Move loop induction variable declaration to where it is used. git-svn-id: svn://svn.berlios.de/openocd/trunk@2215 b42882b7-edfa-0310-969c-e2dbd0fdcd60
2009-06-09Encapsulate jtag_reset_config using accessors:zwelch1-0/+9
- Update handle_reset_config_command in tcl.c to use new helpers. - Replace direct accesses in JTAG interface and target drivers. git-svn-id: svn://svn.berlios.de/openocd/trunk@2161 b42882b7-edfa-0310-969c-e2dbd0fdcd60
2009-06-09Add get and set accessors for jtag_speed:zwelch1-1/+1
- Setter calls the interface driver callback to improve core encapsulation. - Use getter in standard JTAG interface drivers and ZY1000 minidriver. git-svn-id: svn://svn.berlios.de/openocd/trunk@2159 b42882b7-edfa-0310-969c-e2dbd0fdcd60
2009-06-04David Brownell <david-b@pacbell.net>:zwelch1-259/+259
Remove pernicious whitespace from ft2232 driver; as usual, end-of-line noise, but here also much line-internal stuff. git-svn-id: svn://svn.berlios.de/openocd/trunk@2038 b42882b7-edfa-0310-969c-e2dbd0fdcd60