David Brownell
7c393679c0
JTAG: fix autoprobe failure.
...
Fix bug noted by Øyvind: terminate the IR length autoscan when
the IR is too long, or otherwise broken.
Signed-off-by: David Brownell <dbrownell@users.sourceforge.net >
2009-11-16 16:36:03 -08:00
David Brownell
a7c04a0e49
JTAG: no LOG_WARNING() for taps without IDCODE
...
Signed-off-by: David Brownell <dbrownell@users.sourceforge.net >
2009-11-16 15:18:55 -08:00
Zachary T Welch
dc1685ca25
move ARRAY_SIZE macro to types.h
...
The ARRAY_SIZE macro was defined in several target files, so move it
to types.h.
This patch also removes two other identical macros: DIM (from jtag.h)
and asizeof (from arm11.h).
2009-11-16 09:58:11 -08:00
Zachary T Welch
0535a92456
remove TAP_SCAN_BYTES macro
...
Use DIV_ROUND_UP(n, 8) instead of TAP_SCAN_BYTES macro.
2009-11-16 09:58:11 -08:00
Zachary T Welch
a94748ec6d
rename CEIL as DIV_ROUND_UP
...
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-16 09:58:11 -08:00
Zachary T Welch
d7a0dfa4dc
cleanup jtag minidrivers
...
Remove two vestigial externs from our JTAG minidriver source files.
Also, removes many extra blank lines from the minidummy driver.
2009-11-16 05:30:51 -08:00
Zachary T Welch
f30136603e
arm-jtag-ew,jlink: switch to COMMAND_HANDLER
...
These drivers were overlooked during the recent upgrade. Convert them,
moving their registration routines to eliminate their declarations.
2009-11-15 09:12:44 -08:00
Zachary T Welch
6731968873
rlink: fix overzealous sed
...
Fix an instance where my cleanup when awry.
2009-11-15 09:11:29 -08:00
Ferdinand Postema
ab3bdfb2cb
compile with cygwin (32-bit)
...
Changed some printf format strings..
[dbrownell@users.sourceforge.net: shrink lines, fix indents]
Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
2009-11-14 02:22:37 -08:00
Zachary T Welch
ef746e27c5
command_t -> struct command
...
Remove misleading typedef and redundant suffix from struct command.
2009-11-13 13:30:50 -08:00
Zachary T Welch
98723c4ecd
command_context_t -> struct command_context
...
Remove misleading typedef and redundant suffix from struct command_context.
2009-11-13 13:25:47 -08:00
Zachary T Welch
d16968e24f
remove rlink structure typedefs
...
Remove useless typedefs from the rlink driver. Improve whitespace.
2009-11-13 12:19:39 -08:00
Zachary T Welch
0f1163e823
target_t -> struct target
...
Remove misleading typedef and redundant suffix from struct target.
2009-11-13 11:58:14 -08:00
Zachary T Welch
246068fd89
jtag_command_t -> struct jtag_command
...
Remove useless typedef from struct jtag_command.
2009-11-13 11:58:05 -08:00
Zachary T Welch
1053c32d9e
jtag_command_container_t -> union jtag_command_container
...
Remove misleading typedef from union jtag_container.
2009-11-13 11:58:05 -08:00
Zachary T Welch
22b220ad7f
sleep_command_t -> struct sleep_command
...
Remove misleading typedef from struct sleep_command.
2009-11-13 11:58:05 -08:00
Zachary T Welch
cf2e402d71
end_state_command_t -> struct end_state_command
...
Remove misleading typedef from struct end_state_command.
2009-11-13 11:58:05 -08:00
Zachary T Welch
8cc8c0544f
reset_command_t -> struct reset_command
...
Remove misleading typedef from struct reset_command.
2009-11-13 11:58:05 -08:00
Zachary T Welch
2fecae46f6
stableclocks_command_t -> struct stableclocks_command
...
Remove misleading typedef from struct stableclocks_command.
2009-11-13 11:58:05 -08:00
Zachary T Welch
5f6d8ecf8c
runtest_command_t -> struct runtest_command
...
Remove misleading typedef from struct runtest_command.
2009-11-13 11:58:05 -08:00
Zachary T Welch
c07f0600ff
pathmove_command_t -> struct pathmove_command
...
Remove misleading typedef from struct pathmove_command.
2009-11-13 11:58:05 -08:00
Zachary T Welch
af3f4a0bbe
statemove_command_t -> struct statemove_command
...
Remove misleading typedef from struct statemove_command.
2009-11-13 11:58:05 -08:00
Zachary T Welch
e11c5a3b42
cmd_queue_page_t -> struct cmd_queue_page
...
Remove misleading typedef from struct cmd_queue_page.
2009-11-13 11:58:05 -08:00
Zachary T Welch
2ddeec9db5
scan_command_t -> struct scan_command
...
Remove misleading typedef on struct scan_command.
2009-11-13 11:58:05 -08:00
Zachary T Welch
4a29f8e21d
more vsllink typedef cleanup
...
Remove useless typedef for struct insert_insignification_operation.
2009-11-13 11:58:05 -08:00
Zachary T Welch
7c0ba75eae
vsllink_jtag_t -> struct vsllink
...
Remove misleading typedef and redundant suffix.
2009-11-13 11:58:05 -08:00
Zachary T Welch
ffc77b61dd
presto_t -> struct presto
...
Remove useless typedef.
2009-11-13 11:58:05 -08:00
Zachary T Welch
a3f1c87eb7
ft2232_device_t -> struct ft2232_device
...
Remove misleading typedef from ft2232_device; it was barely used.
2009-11-13 11:58:05 -08:00
Zachary T Welch
4bc155398e
jlink_jtag_t -> struct jlink
...
Remove misleading typedef and redundant suffix.
2009-11-13 11:58:05 -08:00
Zachary T Welch
9036fdd589
cable_t -> struct cable
...
Remove useless typedef and redundant suffix from parport struct cable.
2009-11-13 11:58:05 -08:00
Zachary T Welch
e1c26950c0
pending_scan_result_t -> struct pending_scan_result
...
Remove misleading typedef from struct struct pending_scan_result.
Future patches need to remove these duplicated types and code.
2009-11-13 11:58:04 -08:00
Zachary T Welch
8bbb279c28
armjtagew_jtag_t -> struct armjtagew
...
Remove useless typedef and redundant suffix from struct armjtatew_jtag.
2009-11-13 11:58:04 -08:00
Zachary T Welch
5874d5f2ea
use struct jtag_tap_event_action
...
Remove useless typedef and redundant suffix from jtag_tap_event_action.
2009-11-13 11:58:04 -08:00
Zachary T Welch
363d72a484
jtag_event_callback_t -> struct jtag_event_callback
...
Remove useless typedef and redundant suffix from jtag_event_callback.
Add documentation for the structure.
2009-11-13 11:58:04 -08:00
Zachary T Welch
9f535f9af7
jtag_interface_t -> struct jtag_interface
...
Remove useless typedef and redundant suffix from struct jtag_interface.
2009-11-13 11:58:04 -08:00
Zachary T Welch
bee796b5b0
bitbang_interface_t -> struct bitbang_interface
...
Removes another useless typedef and suffix.
2009-11-13 11:58:04 -08:00
Zachary T Welch
c20b779b89
bitq_interface_t -> struct biq_interface
...
Remove useless typedef and redundant suffix.
2009-11-13 11:58:04 -08:00
Zachary T Welch
ff3150922b
encapsulate bitq_state structure
...
Move the bitq_state structure from the header to source file, as it
is used internally.
Also removes its silly typedef.
2009-11-13 11:58:04 -08:00
Zachary T Welch
d0809ac060
scan_field_t -> struct scan_field
...
Remove useless structure typedef.
2009-11-13 11:58:04 -08:00
Zachary T Welch
42ef503d37
jtag_tap_t -> struct jtag_tap
...
Search and destroy the jtag_tap_t typedef. This also cleans up a
layering violation, removing the declaration from types.h.
2009-11-13 11:58:04 -08:00
Zachary T Welch
d22270e0ed
command_handler_t: make argc unsigned
...
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-13 10:55:27 -08:00
Zachary T Welch
a585bdf726
add CMD_NAME macro for command handlers
...
By introducing the CMD_NAME macro, this parameter may be integrated
as args[-1] in command.[ch], without touching any other call sites.
2009-11-13 10:55:00 -08:00
Zachary T Welch
5b6df55a1e
use CALL_COMMAND_HANDLER instead of direct calls
...
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-13 10:51:46 -08:00
Zachary T Welch
63a26b421b
use COMMAND_HELPER for command helper functions
...
Define the numerous helpers that inherit command handler parameters
using the COMMAND_HELPER macro.
2009-11-13 10:51:45 -08:00
Zachary T Welch
cfc4d5c6b7
use COMMAND_HANDLER macro to define all commands
2009-11-13 10:51:45 -08:00
Jonas Horberg
de735d375b
parport: add support for the jtag_khz command.
...
Add the khz and speed_div functions to the parport interface driver.
Add the parport_toggling_time function that tells the parport driver
how long (in nanoseconds) it takes for the hardware to toggle TCK.
[dbrownell@users.sourceforge.net: tweak doc for clarity, mention
multimeter, and whitespace fixes]
Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
2009-11-12 12:39:37 -08:00
Zachary T Welch
5e1b500b17
fix 'jtag interface' behavior
...
Without this patch, running "openocd -c 'jtag interface'" segfaults.
Now, it returns the string "undefined" when the interface is unset.
2009-11-11 14:04:06 -08:00
Zachary T Welch
8d6dcb9d39
jtag: remove useless declarations
...
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-09 21:39:28 -08:00
David Brownell
d70d9634bf
finish removing deprecated/obsolete commands
...
It's been about a year since these were deprecated and, in most
cases, removed. There's no point in carrying that documentation,
or backwards compatibility for "jtag_device" and "jtag_speed",
around forever. (Or a few remnants of obsolete code...)
Removed a few obsolete uses of "jtag_speed":
- The Calao stuff hasn't worked since July 2008. (Those Atmel
targets need to work with a 32KHz core clock after reset until
board-specific init-reset code sets up the PLL and enables a
faster JTAg clock.)
- Parport speed controls don't actually work (tops out at about
1 MHz on typical HW).
- In general, speed controls need to live in board.cfg files (or
sometimes target.cfg files), not interface.cfg ...
Signed-off-by: David Brownell <dbrownell@users.sourceforge.net >
2009-11-09 13:16:32 -08:00
Zachary T Welch
5e9d18f027
src/jtag: remove 'extern' and wrap headers.
...
Removes the 'extern' keyword from function declarations.
Wraps long prototypes to fit into 80 columns.
Fixes documentation for jtag_tap_s::{,has}idcode fields.
2009-11-09 09:44:33 -08:00