openocd.git
11 years agoARM: "armv4_5" command prefix becomes "arm"
David Brownell [Tue, 17 Nov 2009 00:36:09 +0000 (16:36 -0800)]
ARM: "armv4_5" command prefix becomes "arm"

Rename the "armv4_5" command prefix to straight "arm" so it makes
more sense for newer cores.  Add a simple compatibility script.

Make sure all the commands give the same "not an ARM" diagnostic
message (and fail properly) when called against non-ARM targets.

Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
11 years agoJTAG: fix autoprobe failure.
David Brownell [Tue, 17 Nov 2009 00:36:03 +0000 (16:36 -0800)]
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>
11 years agofileio: improve API types
Zachary T Welch [Fri, 13 Nov 2009 22:44:53 +0000 (14:44 -0800)]
fileio: improve API types

Use size_t instead of uint32_t when specifying file sizes.  Update all
consumers up through the layers to use size_t when required.  These
changes should be safe, but the higher-levels will need to be updated
further to receive the intended benefits (i.e. large file support).

Add error checking for fileio_read and file_write.  Previously, all
errors were being silently ignored, so this change might cause some
problems for some people in some cases.  However, it gives us the chance
to handle any errors that do occur at higher-levels, rather than burying
our heads in the sand.

11 years agostruct fileio: improve member types
Zachary T Welch [Fri, 13 Nov 2009 22:22:21 +0000 (14:22 -0800)]
struct fileio: improve member types

Add const keyword to file url and cast to free().

Make size an ssize_t and chase all format strings that use it.

11 years agohelper/log: improve API parameter types
Zachary T Welch [Sun, 15 Nov 2009 11:42:45 +0000 (03:42 -0800)]
helper/log: improve API parameter types

Uses unsigned type to pass line numbers.

Use uint64_t to pass sleep routines their milliseconds.  Updates sleep
routines to use this type and improve whitespace.

11 years agouse Jim_CmdProc in jim_register
Zachary T Welch [Sun, 15 Nov 2009 12:05:33 +0000 (04:05 -0800)]
use Jim_CmdProc in jim_register

The jim_register command just needed to use the type defined by jim.h.

11 years agoimprove constness of open_file_from_path
Zachary T Welch [Fri, 13 Nov 2009 22:21:56 +0000 (14:21 -0800)]
improve constness of open_file_from_path

11 years agomake command line options const
Zachary T Welch [Sun, 15 Nov 2009 11:53:19 +0000 (03:53 -0800)]
make command line options const

The getopt_long call allows a const struct option, so mark ours
const too.

11 years agoARM: standard disassembler uses Thumb2 entry
David Brownell [Mon, 16 Nov 2009 23:29:14 +0000 (15:29 -0800)]
ARM: standard disassembler uses Thumb2 entry

Tweak "standard" ARM disassembler diagnostics to fail if the target
is not "an ARM" (vs. not "an ARMV4/5"), so it makes more sense for
cores inheriting this as the "generic" disassembler.

Also, to use the Thumb2 entry instead of the original Thumb entry.
This makes it work better for both newer cores (which support those
added instructions) and for BL and BLX instructions on older cores.
(Those instructions are 32-bits, which requires curious state-aware
code to go through a 16-bit decode interface...)

Plus minor cleanups, notably to have fewer exit paths and to make
sure they all return failure codes.

Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
11 years agotarget: don't include "log.h" from "armv4_5.h"
David Brownell [Mon, 16 Nov 2009 23:27:40 +0000 (15:27 -0800)]
target: don't include "log.h" from "armv4_5.h"

No point in multiple includes, and that file doesn't
use its functions any more.

Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
11 years agoARM: move mode functions out of header
David Brownell [Mon, 16 Nov 2009 23:27:36 +0000 (15:27 -0800)]
ARM: move mode functions out of header

They're really too big to inline, at least for code that's
not in any performance-critical loops.

Also move the associated string table to the rodata section.

Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
11 years agoJTAG: no LOG_WARNING() for taps without IDCODE
David Brownell [Mon, 16 Nov 2009 23:18:55 +0000 (15:18 -0800)]
JTAG: no LOG_WARNING() for taps without IDCODE

Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
11 years agobinarybuffer: regression fix
David Brownell [Mon, 16 Nov 2009 22:50:07 +0000 (14:50 -0800)]
binarybuffer: regression fix

The "improve inline binarybuffer helpers" mis-handled bytes
with the high bit set; treat them as unsigned, not signed.

Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
11 years ago"types.h" doxygen fix
David Brownell [Mon, 16 Nov 2009 18:42:01 +0000 (10:42 -0800)]
"types.h" doxygen fix

Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
11 years agotarget: less implicit inclusion of "etm.h"
David Brownell [Mon, 16 Nov 2009 18:19:33 +0000 (10:19 -0800)]
target: less implicit inclusion of "etm.h"

Don't include it in more headers than necessary; just
use it in the few files that actually need it.

Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
11 years agomove ARRAY_SIZE macro to types.h
Zachary T Welch [Mon, 16 Nov 2009 11:29:30 +0000 (03:29 -0800)]
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).

11 years agoarmv7m: make core reg read/write use unsigned
Zachary T Welch [Mon, 16 Nov 2009 11:33:22 +0000 (03:33 -0800)]
armv7m: make core reg read/write use unsigned

Eliminate redundant check that gets covered by using unsigned type.
Created to eliminate noise from subsequent patches, but this kind of
conversion will be beneficial in similar ways throughout the tree.

11 years agoremove TAP_SCAN_BYTES macro
Zachary T Welch [Mon, 16 Nov 2009 11:12:45 +0000 (03:12 -0800)]
remove TAP_SCAN_BYTES macro

Use DIV_ROUND_UP(n, 8) instead of TAP_SCAN_BYTES macro.

11 years agorename CEIL as DIV_ROUND_UP
Zachary T Welch [Mon, 16 Nov 2009 10:53:57 +0000 (02:53 -0800)]
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.

11 years agomove container_of to types.h
Zachary T Welch [Mon, 16 Nov 2009 10:29:09 +0000 (02:29 -0800)]
move container_of to types.h

The container_of macro is useful as a general solution.  It belongs
in types.h, rather than target.h where it was introduced.  Requires
the offsetof macro, which comes from <stddef.h> (moved as well).

11 years agonand_command_get_device_by_num: make COMMAND_HELPER
Zachary T Welch [Sun, 15 Nov 2009 15:20:19 +0000 (07:20 -0800)]
nand_command_get_device_by_num: make COMMAND_HELPER

Use COMMAND_HELPER macro to define nand_command_get_device_by_num.
Use CALL_COMMAND_HANDLER to invoke it.

11 years agoflash_command_get_bank_by_num: make COMMAND_HELPER
Zachary T Welch [Sun, 15 Nov 2009 14:48:20 +0000 (06:48 -0800)]
flash_command_get_bank_by_num: make COMMAND_HELPER

Use COMMAND_HELPER macro to declare flash_command_get_bank_by_num.
This is required for COMMAND_PARSE_NUMBER macro.

11 years agocleanup jtag minidrivers
Zachary T Welch [Mon, 16 Nov 2009 12:29:45 +0000 (04:29 -0800)]
cleanup jtag minidrivers

Remove two vestigial externs from our JTAG minidriver source files.
Also, removes many extra blank lines from the minidummy driver.

11 years agoAdd 'nand verify' command
Zachary T Welch [Sun, 8 Nov 2009 05:20:45 +0000 (21:20 -0800)]
Add 'nand verify' command

Add the 'nand verify' command to perform a dump and fake-write
simultaneously, checking the read bits against those generated by the
write process.  Appropriate user documentation for this command has
been added to the user guide as well.

The algorithm presently makes a relatively naive comparison.  Some chips
that use ECC may not verify correctly using this implementation, but the
new documentation provides details about this limitation.

11 years agoAdd FILEIO_NONE access mode.
Zachary T Welch [Sun, 8 Nov 2009 06:37:39 +0000 (22:37 -0800)]
Add FILEIO_NONE access mode.

In some cases, the FILEIO_NONE access mode may be useful as a parameter
to indicate that file access should be disabled.  High-level routines can
use it to skip file access calls, as 'fileio_open' will fail presently
if called to open a file using this mode.

11 years agoUse nand_fileio_* in write/dump commands.
Zachary T Welch [Fri, 6 Nov 2009 03:45:24 +0000 (19:45 -0800)]
Use nand_fileio_* in write/dump commands.

This patch eliminates duplicated code in the the NAND 'dump' and 'write'
by using the new static helper functions.

These changes also fix a possible memory leak in nand dump command, in
the case that the dump file failed to open.

Overall, the changes should be functionally equivalent, but the
resulting code will be easier to improve and extend further.

11 years agoAdd nand_fileio_* helper APIs.
Zachary T Welch [Sun, 8 Nov 2009 10:06:34 +0000 (02:06 -0800)]
Add nand_fileio_* helper APIs.

This patch provides helpers APIs that will eliminate duplicated code in
the the NAND 'dump' and 'write' commands by factoring their common code
into static helper functions.  These helpers may be useful for creating
new commands, as shown in the final patch to 'verify' flash from a file.

Several previously unreported error conditions now generate messages and
propogate the return codes, such as when the file fails to open and bad
arguments are given.  These changes will fix a possible memory leak in
nand dump command, in the case that the dump file failed to open.

Overall, the changes should be functionally equivalent, but the
resulting code will be easier to improve and extend consistently.

11 years agobinarybuffer: add API documentation
Zachary T Welch [Mon, 16 Nov 2009 09:10:46 +0000 (01:10 -0800)]
binarybuffer: add API documentation

Adds Doxygen documentation for a number of the binarybuffer APIs,
including "unexpected" behavior exposed during review on the list.

11 years agoimprove inline binarybuffer helpers
Zachary T Welch [Sat, 14 Nov 2009 14:26:55 +0000 (06:26 -0800)]
improve inline binarybuffer helpers

Use void*, unsigned, and bool types with inline helpers.

11 years agoimprove buf_set_buf helper
Zachary T Welch [Sat, 14 Nov 2009 18:44:37 +0000 (10:44 -0800)]
improve buf_set_buf helper

Use void * and unsigned types for buffer and their sizes.
Allows it to be used with more than uint8_t * without casts.

11 years agoimprove buf_set_ones
Zachary T Welch [Sat, 14 Nov 2009 18:41:35 +0000 (10:41 -0800)]
improve buf_set_ones

Use memset instead of loop. Improve types, using void * and unsigned.

11 years agoimprove buf_cpy helper
Zachary T Welch [Sat, 14 Nov 2009 18:36:57 +0000 (10:36 -0800)]
improve buf_cpy helper

Use memcpy for bulk of copy, improve final byte handling.
Improve types by using void * for buffers and unsigned for size.

11 years agoimprove buf_cmp and buf_cmp_mask helpers
Zachary T Welch [Sat, 14 Nov 2009 18:27:34 +0000 (10:27 -0800)]
improve buf_cmp and buf_cmp_mask helpers

Rewrite buf_cmp to use memcpy for bulk of comparison.  Add static
helper to perform comparison of trailing byte, which uses another
static helper to perform a maksed comparison.  The masked comparison
helper is used by the buf_cmp_mask to simplify its loop.
Improve types to use void *, unsigned, and return bool.

11 years agoimprove str_to_buf and buf_to_str helpers
Zachary T Welch [Sat, 14 Nov 2009 18:14:04 +0000 (10:14 -0800)]
improve str_to_buf and buf_to_str helpers

Improve types: use void * and unsigned.  Move all variables to point of
first use.  Move radix guessing logic to new str_radix_guess helper.

11 years agobinarybuffer: move variables to point of first use
Zachary T Welch [Sat, 14 Nov 2009 16:19:24 +0000 (08:19 -0800)]
binarybuffer: move variables to point of first use

Reduce some noise from subsequent patches.

11 years agobinarybuffer: fix whitespace related issues
Zachary T Welch [Sat, 14 Nov 2009 16:10:22 +0000 (08:10 -0800)]
binarybuffer: fix whitespace related issues

Add inter-operator whitespace.  Improve existing documentation.

11 years ago#include "target.h" less wildly
David Brownell [Mon, 16 Nov 2009 08:35:24 +0000 (00:35 -0800)]
#include "target.h" less wildly

Don't include "target.h" from more headers than necessary.  This
avoids needless interdependencies and duplicated include paths.

Don't needlessly include it in source files, either.

Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
11 years agotarget: no implicit #includes of "register.h"
David Brownell [Mon, 16 Nov 2009 08:35:14 +0000 (00:35 -0800)]
target: no implicit #includes of "register.h"

Same deal:  "register.h" got needlessly included all over the
place because of being in a few widely included headers.

So take it out of the header files which included it, and put
it in files which use it ... reduce needless interdependencies.

Also, don't need that extra "types.h" inclusion.

Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
11 years agotarget: less implicit inclusion of "command.h"
David Brownell [Mon, 16 Nov 2009 08:35:11 +0000 (00:35 -0800)]
target: less implicit inclusion of "command.h"

Lots of files still include it, often through needless
duplicate inclusion of "log.h"; sigh.

This cleans up the inclusion graph a bunch, so there are
fewer inclusion paths, but it doesn't change much otherwise.

Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
11 years agotarget: don't implicitly include "algorithm.h"
David Brownell [Mon, 16 Nov 2009 08:35:05 +0000 (00:35 -0800)]
target: don't implicitly include "algorithm.h"

Most files in the tree seem to have ended up including this,
and *quite* needlessly ... only code implementing or using
downloadable algorithms actually needs these declarations.

So take it out of the header files which included it, and put
it in files which use it ... reduce needless interdependencies.

Also: "algorithm.h" doesn't need to include "types.h" again;
it already comes from a different header.

Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
11 years agotarget: don't implicitly include "breakpoint.h"
David Brownell [Mon, 16 Nov 2009 08:34:57 +0000 (00:34 -0800)]
target: don't implicitly include "breakpoint.h"

Most files in the tree seem to have ended up including this,
and *quite* needlessly ... only code implementing or using
breakpoints actually needs these declarations.

So take it out of the header files which included it, and put
it in files which use it ... reduce needless interdependencies.

Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
11 years agoARM11: use now-generic memory utils
David Brownell [Sun, 15 Nov 2009 18:35:47 +0000 (10:35 -0800)]
ARM11: use now-generic memory utils

Now the ARM11 cores can use the renamed arm_checksum_memory()
and arm_blank_check_memory() routines ... do so.

Sanity checked with "flash erase_check" of both NOR banks on an
OMAP2420 ... the algorithm code dumped four lines of of "poll"
status after each of almost 520 blocks (yes, *very* annoying) but
gave plausible results after producing that spam.

Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
11 years agoARM11: fixup method table
David Brownell [Sun, 15 Nov 2009 18:35:41 +0000 (10:35 -0800)]
ARM11: fixup method table

Three changes:  remove ARM11_HANDLER() in favor of normal structure
initialization syntax; fix goofy indentation in that structure; and
don't needlessly export arm11_register_commands(), it's only called
through that method table.

Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
11 years agoARM: memory utils aren't ARM7/ARM9 dependent
David Brownell [Sun, 15 Nov 2009 18:35:34 +0000 (10:35 -0800)]
ARM: memory utils aren't ARM7/ARM9 dependent

The arm7_9_checksum_memory() and arm7_9_blank_check_memory()
routines are not actually specific to the ARM7 and ARM9 core
generations ... they can work for any core which can run
algorithms using basic ARM (not Thumb) instructions.

Rename them; move the declarations to a more generic site;
likewise move the code (and tidy it a bit in the process).

NOTE:  the blank_check() method falsely returned a success
status (0) on one error path, when the algorithm failed.
Fixed this bug.

Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
11 years agotarget: make "examined" flag be per-target
David Brownell [Sun, 15 Nov 2009 18:35:25 +0000 (10:35 -0800)]
target: make "examined" flag be per-target

Previously this flag was stored in "target_type", so that for example
if there were two ARM7TDMI targets in a scan chain, both would claim
to have been examined although only the first one actually had its
examine() method called.

Move this state to where it should have been in the first place, and
hide a method that didn't need exposure ... the flag is write-once.

Provide some doxygen.  The examine() method is confusing, since it
isn't separating one-time setup from the after-each-reset stuff.  And
the ARM7/ARM9 version is, somewhat undesirably, not leaving the debug
state alone after reset ... probably more of an issue for trace setup
than for watchpoints and breakpoints.

Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
11 years agoarm-jtag-ew,jlink: switch to COMMAND_HANDLER
Zachary T Welch [Sun, 15 Nov 2009 17:12:44 +0000 (09:12 -0800)]
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.

11 years agorlink: fix overzealous sed
Zachary T Welch [Sun, 15 Nov 2009 17:11:29 +0000 (09:11 -0800)]
rlink: fix overzealous sed

Fix an instance where my cleanup when awry.

11 years agoremove unused arm_jtag_buf_to_* helpers
Zachary T Welch [Sat, 14 Nov 2009 14:48:30 +0000 (06:48 -0800)]
remove unused arm_jtag_buf_to_* helpers

Removes unused arm_jtag_buf_* helpers from arm_jtag.[ch].  These could
reappear if patches are provided to conver the tree to use them, but
this code should not be in the master tree until that series is ready.

11 years agoremove unused buf_to_u32_handler
Zachary T Welch [Sat, 14 Nov 2009 14:41:58 +0000 (06:41 -0800)]
remove unused buf_to_u32_handler

Purge an unused routine from the tree and remove a layering violation.
If this code is needed, it should reappear somwhere in src/jtag/,
where struct scan_field gets defined.

11 years agostruct scan_field_s -> struct scan_field
Zachary T Welch [Sat, 14 Nov 2009 14:30:02 +0000 (06:30 -0800)]
struct scan_field_s -> struct scan_field

Remove obsolete suffix from struct scan_field.  Somehow, these
definitions did not get updated but did not cause any errors.

11 years agoFix for md* commands, similar to mw*.
Krzysztof Dziuba [Sat, 14 Nov 2009 19:59:56 +0000 (20:59 +0100)]
Fix for md* commands, similar to mw*.

11 years agolpc2900.h -- remove from Makefile.am too
David Brownell [Sat, 14 Nov 2009 22:58:14 +0000 (14:58 -0800)]
lpc2900.h -- remove from Makefile.am too

Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
11 years agoflash: remove needless lpc2900.h header
David Brownell [Sat, 14 Nov 2009 22:53:19 +0000 (14:53 -0800)]
flash: remove needless lpc2900.h header

Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
11 years agoremove annoying $URL$ startup message
David Brownell [Sat, 14 Nov 2009 20:42:50 +0000 (12:42 -0800)]
remove annoying $URL$ startup message

It's completely unused; the obnoxious "DANGER!!!" comments
don't even explain what it was doing (shorthand SVN magic).

Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
11 years agoInvalid command syntax errors with MWW.
Dean Glazeski [Sat, 14 Nov 2009 18:39:08 +0000 (12:39 -0600)]
Invalid command syntax errors with MWW.

This fixes an issue due to the new command handler syntax caused by the mw handler playing with the args pointer before
using the CMD_NAME macro.  Fix is to move this call above the lines changing args.

11 years agoadd openocd.h for top-level declarations
Zachary T Welch [Sat, 14 Nov 2009 15:29:16 +0000 (07:29 -0800)]
add openocd.h for top-level declarations

Create src/openocd.h to hold declarations previously made internally
by src/main.c and src/server/server.c.  This ensures all functions
are verified to be in-sync at compile time (rather than at link),
making it easier to track down bugs.

11 years agocompile with cygwin (32-bit)
Ferdinand Postema [Thu, 12 Nov 2009 22:21:33 +0000 (23:21 +0100)]
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>
11 years agoARM11: ETM + ETB support
David Brownell [Sat, 14 Nov 2009 00:58:14 +0000 (16:58 -0800)]
ARM11: ETM + ETB support

Kick in ETM (and ETB) support for ARM11.  Tested on OMAP 2420,
so update that configuration.  (That's an ARM1136ejs, ETB,
OpenGL ES1.1, C55x DSP, etc.)

Also update the other ARM11 ETM + ETB targets in the tree
to set up these modules.  (Not tested.)

Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
11 years agoARM11: revert etmr/etmw commands
David Brownell [Sat, 14 Nov 2009 00:56:11 +0000 (16:56 -0800)]
ARM11: revert etmr/etmw commands

These aren't desirable, given "standard" ETM support.
Also remove the now-unused arm11_find_target().

Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
11 years agoiMX2* + ETB targets: hook up ETM and ETB
David Brownell [Sat, 14 Nov 2009 00:56:11 +0000 (16:56 -0800)]
iMX2* + ETB targets: hook up ETM and ETB

ARM9 cores with an ETB will have a matching ETM.
Hook them both up by default.

Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
11 years agoARM7/ARM9: use shared examine() method
David Brownell [Sat, 14 Nov 2009 00:26:39 +0000 (16:26 -0800)]
ARM7/ARM9: use shared examine() method

No point in having two identical examine methods for the
ARM7TDMI and ARM9TDMI drivers; move, rename, shrink, share.

Add a bit of doxygen; stop needlessly exporting a method.

Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
11 years agoETM: simplify ETM initialization code paths
David Brownell [Sat, 14 Nov 2009 00:26:39 +0000 (16:26 -0800)]
ETM: simplify ETM initialization code paths

Return NULL from etm_build_reg_cache() not ERROR_OK; and share
code on that fault path.

Let ETM code handle any tracking of its cache -- not callers.

Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
11 years agoARM11: switch to new "arm" base type
David Brownell [Sat, 14 Nov 2009 00:22:36 +0000 (16:22 -0800)]
ARM11: switch to new "arm" base type

This will enable reusing many common ARM utilities, in
particular the ETM and ETB support.  The ARM11 support
can still be much simplified after this patch, though.

Note:  none of those common utilities kick in yet...

Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
11 years agotarget: remove unused "bitfield" infrastructure
David Brownell [Sat, 14 Nov 2009 00:22:36 +0000 (16:22 -0800)]
target: remove unused "bitfield" infrastructure

We have too many different registers, and too many version and
context dependent interpretations, for this type of bitfield
management to be scalable.

(Anyone who really wants bitfield interpretation *can* do that
in Tcl code...)

There are ... quite a few copies of the same ARM dummy registers.
There should eventually be one copy; this many is craziness.

Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
11 years agotarget.cfg: label ETBs correctly
David Brownell [Fri, 13 Nov 2009 21:44:50 +0000 (13:44 -0800)]
target.cfg: label ETBs correctly

Various cores with an ETB have its TAP misnamed ... either as a
boundary scan TAP or as the iMX "Secure JTAG Controller" (which
is, among other things, a JRC that could be used to shorten
scan chains).

Use the correct name for these TAPs, which we can recognize since
their IDs were assigned by ARM and these chips all document the
presence of an ETB.  The 0x2b900f0f is ETB11; the 0x1b900f0f
is an older module, just called "ETB".

Also shrink the ETB's IR configuration; the default IR-Capture
value is fine, and the mask can specify that all four bits are
safe to check (per ARM documentation).

Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
11 years agoARM7/9: rm arm7_9_get_arch_pointers()
David Brownell [Fri, 13 Nov 2009 21:44:50 +0000 (13:44 -0800)]
ARM7/9: rm arm7_9_get_arch_pointers()

Remove the last external user of arm7_9_get_arch_pointers(), and
that annoying downcast utility.  Add an is_arm7_9() predicate.

Stop returning specious success codes on various failure paths
in the ARM7/ARM9 commands which used that downcast utility.

Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
11 years agoupdate developer manual for new types
Zachary T Welch [Fri, 13 Nov 2009 21:38:35 +0000 (13:38 -0800)]
update developer manual for new types

Update the style guide and chase obvious references to structures
that have been renamed.

11 years agocommand_t -> struct command
Zachary T Welch [Fri, 13 Nov 2009 21:30:50 +0000 (13:30 -0800)]
command_t -> struct command

Remove misleading typedef and redundant suffix from struct command.

11 years agocommand_context_t -> struct command_context
Zachary T Welch [Fri, 13 Nov 2009 21:25:47 +0000 (13:25 -0800)]
command_context_t -> struct command_context

Remove misleading typedef and redundant suffix from struct command_context.

11 years agoremove rlink structure typedefs
Zachary T Welch [Fri, 13 Nov 2009 20:19:39 +0000 (12:19 -0800)]
remove rlink structure typedefs

Remove useless typedefs from the rlink driver.  Improve whitespace.

11 years agoflash_bank_t -> struct flash_bank
Zachary T Welch [Fri, 13 Nov 2009 19:32:28 +0000 (11:32 -0800)]
flash_bank_t -> struct flash_bank

Remove misleading typedef and redundant suffix from struct flash_bank.

11 years agonand_device_t -> struct nand_device
Zachary T Welch [Fri, 13 Nov 2009 19:32:17 +0000 (11:32 -0800)]
nand_device_t -> struct nand_device

Remove misleading typedef and redundant suffix from struct nand_device.

11 years agotarget_t -> struct target
Zachary T Welch [Fri, 13 Nov 2009 18:11:13 +0000 (10:11 -0800)]
target_t -> struct target

Remove misleading typedef and redundant suffix from struct target.

11 years agoreg_t -> struct reg
Zachary T Welch [Fri, 13 Nov 2009 17:55:49 +0000 (09:55 -0800)]
reg_t -> struct reg

Remove misleading typedef and redundant suffix from struct reg.

11 years agotarget_type_t -> struct target_type
Zachary T Welch [Fri, 13 Nov 2009 17:52:20 +0000 (09:52 -0800)]
target_type_t -> struct target_type

Remove misleading typedef and redundant suffix from struct target_type.

11 years agoimprove mips32_pracc_context
Zachary T Welch [Fri, 13 Nov 2009 17:48:18 +0000 (09:48 -0800)]
improve mips32_pracc_context

Use struct mips32_pracc_context instead of a typedef.

11 years agoimage_t -> struct image
Zachary T Welch [Fri, 13 Nov 2009 17:46:21 +0000 (09:46 -0800)]
image_t -> struct image

Remove misleading typedef and redundant suffix from struct image.

Also removes the typedef from enum image_type, as it is used in
image.h only.

11 years agoarmv4_5_common_t -> struct arm
Zachary T Welch [Fri, 13 Nov 2009 17:43:03 +0000 (09:43 -0800)]
armv4_5_common_t -> struct arm

Remove misleading typedef and just use struct arm.

11 years agoetm_context_t -> struct etm_context
Zachary T Welch [Fri, 13 Nov 2009 17:35:48 +0000 (09:35 -0800)]
etm_context_t -> struct etm_context

Remove misleading typedef and redundant suffix from struct etm_context.

11 years agoetb_t -> struct etb
Zachary T Welch [Fri, 13 Nov 2009 17:27:28 +0000 (09:27 -0800)]
etb_t -> struct etb

Remove misleading typedef and redundant suffix from struct etb.

11 years agotrace_t -> struct trace
Zachary T Welch [Fri, 13 Nov 2009 17:26:19 +0000 (09:26 -0800)]
trace_t -> struct trace

Remove misleading typedef and redundant suffix from struct trace.

11 years agoimage_elf_t -> struct image_elf
Zachary T Welch [Fri, 13 Nov 2009 17:25:36 +0000 (09:25 -0800)]
image_elf_t -> struct image_elf

Remove misleading typedef and redundant suffix from struct image_elf.

11 years agocortex_m3_dwt_comparator_t -> struct cortex_m3_dwt_comparator
Zachary T Welch [Fri, 13 Nov 2009 17:19:49 +0000 (09:19 -0800)]
cortex_m3_dwt_comparator_t -> struct cortex_m3_dwt_comparator

Remove misleading typedef and redundant suffix from struct cortex_m3_dwt_comparator.

11 years agocortex_m3_fp_comparator_t -> struct cortex_m3_fp_comparator
Zachary T Welch [Fri, 13 Nov 2009 17:19:37 +0000 (09:19 -0800)]
cortex_m3_fp_comparator_t -> struct cortex_m3_fp_comparator

Remove misleading typedef and redundant suffix from struct cortex_m3_fp_comparator.

11 years agocortex_a8_wrp_t -> struct cortex_a8_wrp
Zachary T Welch [Fri, 13 Nov 2009 17:18:27 +0000 (09:18 -0800)]
cortex_a8_wrp_t -> struct cortex_a8_wrp

Remove misleading typedef and redundant suffix from struct cortex_a8_wrp.

11 years agocortex_a8_brp_t -> struct cortex_a8_brp
Zachary T Welch [Fri, 13 Nov 2009 17:17:08 +0000 (09:17 -0800)]
cortex_a8_brp_t -> struct cortex_a8_brp

Remove misleading typedef and redundant suffix from struct cortex_a8_brp.

11 years agobreakpoint_t -> struct breakpoint
Zachary T Welch [Fri, 13 Nov 2009 17:15:32 +0000 (09:15 -0800)]
breakpoint_t -> struct breakpoint

Remove misleading typedef and redundant suffix from struct breakpoint.

11 years agoxscale_trace_t -> struct xscale_trace
Zachary T Welch [Fri, 13 Nov 2009 17:11:22 +0000 (09:11 -0800)]
xscale_trace_t -> struct xscale_trace

Remove misleading typedef and redundant suffix from struct xscale_trace.

11 years agoxscale_trace_entry_t -> struct xscale_trace_entry
Zachary T Welch [Fri, 13 Nov 2009 17:10:47 +0000 (09:10 -0800)]
xscale_trace_entry_t -> struct xscale_trace_entry

Remove misleading typedef and redundant suffix from struct xscale_trace_entry.

11 years agotarget_event_action_t -> struct target_event_action
Zachary T Welch [Fri, 13 Nov 2009 17:09:40 +0000 (09:09 -0800)]
target_event_action_t -> struct target_event_action

Remove misleading typedef and redundant suffix from struct target_event_action.

11 years agoarm_instruction_t -> struct arm_instruction
Zachary T Welch [Fri, 13 Nov 2009 17:06:49 +0000 (09:06 -0800)]
arm_instruction_t -> struct arm_instruction

Remove misleading typedef and redundant suffix from struct arm_instruction.

11 years agoarm9tdmi_vector_t -> struct arm9tdmi_vector
Zachary T Welch [Fri, 13 Nov 2009 17:04:14 +0000 (09:04 -0800)]
arm9tdmi_vector_t -> struct arm9tdmi_vector

Remove misleading typedef and redundant suffix from struct arm9tdmi_vector.

Renames enum arm9tdmi_vector as enum arm9tdmi_vector_bit.

11 years agoxscale_reg_t -> struct xscale_reg
Zachary T Welch [Fri, 13 Nov 2009 16:45:40 +0000 (08:45 -0800)]
xscale_reg_t -> struct xscale_reg

Remove misleading typedef and redundant suffix from struct xscale_reg.

11 years agoxscale_common_t -> struct xscale_common
Zachary T Welch [Fri, 13 Nov 2009 16:45:37 +0000 (08:45 -0800)]
xscale_common_t -> struct xscale_common

Remove misleading typedef and redundant suffix from struct xscale_common.

11 years agoxscale_trace_data_t -> struct xscale_trace_data
Zachary T Welch [Fri, 13 Nov 2009 16:45:32 +0000 (08:45 -0800)]
xscale_trace_data_t -> struct xscale_trace_data

Remove misleading typedef and redundant suffix from struct xscale_trace_data.

11 years agotrace_point_t -> struct trace_point
Zachary T Welch [Fri, 13 Nov 2009 16:45:19 +0000 (08:45 -0800)]
trace_point_t -> struct trace_point

Remove misleading typedef and redundant suffix from struct trace_point.

11 years agodebug_msg_receiver_t -> struct debug_msg_receiver
Zachary T Welch [Fri, 13 Nov 2009 16:45:11 +0000 (08:45 -0800)]
debug_msg_receiver_t -> struct debug_msg_receiver

Remove misleading typedef and redundant suffix from struct debug_msg_receiver.

11 years agotarget_timer_callback_t -> struct target_timer_callback
Zachary T Welch [Fri, 13 Nov 2009 16:44:58 +0000 (08:44 -0800)]
target_timer_callback_t -> struct target_timer_callback

Remove misleading typedef and redundant suffix from struct target_timer_callback.

11 years agotarget_event_callback_t -> struct target_event_callback
Zachary T Welch [Fri, 13 Nov 2009 16:44:45 +0000 (08:44 -0800)]
target_event_callback_t -> struct target_event_callback

Remove misleading typedef and redundant suffix from struct target_event_callback.

11 years agoworking_area_t -> struct working_area
Zachary T Welch [Fri, 13 Nov 2009 16:44:30 +0000 (08:44 -0800)]
working_area_t -> struct working_area

Remove misleading typedef and redundant suffix from struct working_area.