Commit Graph

2976 Commits (63dc352876259562948b5d814de197ba534897b9)

Author SHA1 Message Date
David Brownell b6e0f2e1c3 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>
2009-11-16 14:50:07 -08:00
David Brownell 66300d5966 "types.h" doxygen fix
Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
2009-11-16 10:42:01 -08:00
David Brownell 9a98e83b49 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>
2009-11-16 10:19:33 -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 10cce4a5fe 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.
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 f0ce88b3af 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).
2009-11-16 09:57:59 -08:00
Zachary T Welch cbc0578372 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.
2009-11-16 08:44:38 -08:00
Zachary T Welch e84849f5ed 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.
2009-11-16 08:44:38 -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 555757175e 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.
2009-11-16 01:38:19 -08:00
Zachary T Welch da4cb3c029 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.
2009-11-16 01:38:19 -08:00
Zachary T Welch 51cd370b39 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.
2009-11-16 01:38:19 -08:00
Zachary T Welch 23cc85b307 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.
2009-11-16 01:38:19 -08:00
Zachary T Welch 45527ee82c binarybuffer: add API documentation
Adds Doxygen documentation for a number of the binarybuffer APIs,
including "unexpected" behavior exposed during review on the list.
2009-11-16 01:25:47 -08:00
Zachary T Welch d6348d4316 improve inline binarybuffer helpers
Use void*, unsigned, and bool types with inline helpers.
2009-11-16 00:46:34 -08:00
Zachary T Welch 21b452cf67 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.
2009-11-16 00:46:34 -08:00
Zachary T Welch d8d8c5d8c3 improve buf_set_ones
Use memset instead of loop. Improve types, using void * and unsigned.
2009-11-16 00:46:34 -08:00
Zachary T Welch d09e308130 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.
2009-11-16 00:46:34 -08:00
Zachary T Welch e4ee891759 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.
2009-11-16 00:46:33 -08:00
Zachary T Welch d50caa97d1 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.
2009-11-16 00:46:33 -08:00
Zachary T Welch 5a43bd2e18 binarybuffer: move variables to point of first use
Reduce some noise from subsequent patches.
2009-11-16 00:46:33 -08:00
Zachary T Welch 82fc2f9628 binarybuffer: fix whitespace related issues
Add inter-operator whitespace.  Improve existing documentation.
2009-11-16 00:46:33 -08:00
David Brownell b695cb7522 #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>
2009-11-16 00:35:24 -08:00
David Brownell 8193f17c3a 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>
2009-11-16 00:35:14 -08:00
David Brownell 1186f7efa7 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>
2009-11-16 00:35:11 -08:00
David Brownell db094c2e60 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>
2009-11-16 00:35:05 -08:00
David Brownell aa7c449600 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>
2009-11-16 00:34:57 -08:00
David Brownell 5d1a9033ab 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>
2009-11-15 10:35:47 -08:00
David Brownell 2280ddeea5 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>
2009-11-15 10:35:41 -08:00
David Brownell 269040bbad 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>
2009-11-15 10:35:34 -08:00
David Brownell 9ac7cdec82 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>
2009-11-15 10:35:25 -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
Zachary T Welch a502676df7 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.
2009-11-14 18:21:02 -08:00
Zachary T Welch bc07ee82fb 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.
2009-11-14 18:21:02 -08:00
Zachary T Welch 4d4b2958a5 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.
2009-11-14 18:21:02 -08:00
Krzysztof Dziuba c2edc7908f Fix for md* commands, similar to mw*. 2009-11-14 17:39:27 -08:00
David Brownell ecc659d44d lpc2900.h -- remove from Makefile.am too
Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
2009-11-14 14:58:14 -08:00
David Brownell dd47bba6f8 flash: remove needless lpc2900.h header
Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
2009-11-14 14:53:19 -08:00
David Brownell 7f48f463a1 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>
2009-11-14 12:42:50 -08:00
Dean Glazeski c93ae60bce 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.
2009-11-14 10:58:35 -08:00
Zachary T Welch 4088b1e622 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.
2009-11-14 07:29:16 -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
David Brownell ecab0cfe25 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>
2009-11-13 16:58:14 -08:00
David Brownell 817bf74302 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>
2009-11-13 16:56:11 -08:00
David Brownell aafb916bea 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>
2009-11-13 16:26:39 -08:00
David Brownell 78c6b922e2 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>
2009-11-13 16:26:39 -08:00
David Brownell a7f5cdf999 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>
2009-11-13 16:22:36 -08:00
David Brownell 04b514707f 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>
2009-11-13 16:22:36 -08:00
David Brownell afe0298399 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>
2009-11-13 13:44:50 -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 96b62996d2 flash_bank_t -> struct flash_bank
Remove misleading typedef and redundant suffix from struct flash_bank.
2009-11-13 11:58:14 -08:00
Zachary T Welch 2f6e56e383 nand_device_t -> struct nand_device
Remove misleading typedef and redundant suffix from struct nand_device.
2009-11-13 11:58:14 -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 d0dee7ccaf reg_t -> struct reg
Remove misleading typedef and redundant suffix from struct reg.
2009-11-13 11:58:13 -08:00
Zachary T Welch ac927559c3 target_type_t -> struct target_type
Remove misleading typedef and redundant suffix from struct target_type.
2009-11-13 11:58:13 -08:00
Zachary T Welch d64a873db4 improve mips32_pracc_context
Use struct mips32_pracc_context instead of a typedef.
2009-11-13 11:58:13 -08:00
Zachary T Welch dfecfd5fd4 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.
2009-11-13 11:58:13 -08:00
Zachary T Welch af949b2531 armv4_5_common_t -> struct arm
Remove misleading typedef and just use struct arm.
2009-11-13 11:58:13 -08:00
Zachary T Welch d0c19e0a9d etm_context_t -> struct etm_context
Remove misleading typedef and redundant suffix from struct etm_context.
2009-11-13 11:58:13 -08:00
Zachary T Welch 6421c2075c etb_t -> struct etb
Remove misleading typedef and redundant suffix from struct etb.
2009-11-13 11:58:13 -08:00
Zachary T Welch 4952eadd8f trace_t -> struct trace
Remove misleading typedef and redundant suffix from struct trace.
2009-11-13 11:58:13 -08:00
Zachary T Welch d90063ffc5 image_elf_t -> struct image_elf
Remove misleading typedef and redundant suffix from struct image_elf.
2009-11-13 11:58:13 -08:00
Zachary T Welch 2ec440588f cortex_m3_dwt_comparator_t -> struct cortex_m3_dwt_comparator
Remove misleading typedef and redundant suffix from struct cortex_m3_dwt_comparator.
2009-11-13 11:58:13 -08:00
Zachary T Welch cdd2d9c2d0 cortex_m3_fp_comparator_t -> struct cortex_m3_fp_comparator
Remove misleading typedef and redundant suffix from struct cortex_m3_fp_comparator.
2009-11-13 11:58:13 -08:00
Zachary T Welch d727f97889 cortex_a8_wrp_t -> struct cortex_a8_wrp
Remove misleading typedef and redundant suffix from struct cortex_a8_wrp.
2009-11-13 11:58:13 -08:00
Zachary T Welch 42fb6b8876 cortex_a8_brp_t -> struct cortex_a8_brp
Remove misleading typedef and redundant suffix from struct cortex_a8_brp.
2009-11-13 11:58:13 -08:00
Zachary T Welch 53c05c8b1d breakpoint_t -> struct breakpoint
Remove misleading typedef and redundant suffix from struct breakpoint.
2009-11-13 11:58:13 -08:00
Zachary T Welch 1e51cf049c xscale_trace_t -> struct xscale_trace
Remove misleading typedef and redundant suffix from struct xscale_trace.
2009-11-13 11:58:13 -08:00
Zachary T Welch e76d085603 xscale_trace_entry_t -> struct xscale_trace_entry
Remove misleading typedef and redundant suffix from struct xscale_trace_entry.
2009-11-13 11:58:13 -08:00
Zachary T Welch abd7b40408 target_event_action_t -> struct target_event_action
Remove misleading typedef and redundant suffix from struct target_event_action.
2009-11-13 11:58:13 -08:00
Zachary T Welch 55edfdf2ab arm_instruction_t -> struct arm_instruction
Remove misleading typedef and redundant suffix from struct arm_instruction.
2009-11-13 11:58:12 -08:00
Zachary T Welch 22f6a4cef5 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.
2009-11-13 11:58:12 -08:00
Zachary T Welch 18475360b2 xscale_reg_t -> struct xscale_reg
Remove misleading typedef and redundant suffix from struct xscale_reg.
2009-11-13 11:58:12 -08:00
Zachary T Welch 1f87cf4e80 xscale_common_t -> struct xscale_common
Remove misleading typedef and redundant suffix from struct xscale_common.
2009-11-13 11:58:12 -08:00
Zachary T Welch ea34dc988f xscale_trace_data_t -> struct xscale_trace_data
Remove misleading typedef and redundant suffix from struct xscale_trace_data.
2009-11-13 11:58:12 -08:00
Zachary T Welch 73ad5cbb1a trace_point_t -> struct trace_point
Remove misleading typedef and redundant suffix from struct trace_point.
2009-11-13 11:58:12 -08:00
Zachary T Welch 151347585a debug_msg_receiver_t -> struct debug_msg_receiver
Remove misleading typedef and redundant suffix from struct debug_msg_receiver.
2009-11-13 11:58:12 -08:00
Zachary T Welch 93459582fd target_timer_callback_t -> struct target_timer_callback
Remove misleading typedef and redundant suffix from struct target_timer_callback.
2009-11-13 11:58:12 -08:00
Zachary T Welch 2d5767201b target_event_callback_t -> struct target_event_callback
Remove misleading typedef and redundant suffix from struct target_event_callback.
2009-11-13 11:58:12 -08:00
Zachary T Welch 46fc1d57ac working_area_t -> struct working_area
Remove misleading typedef and redundant suffix from struct working_area.
2009-11-13 11:58:12 -08:00
Zachary T Welch c2b5d8a6fa reg_arch_type_t -> struct reg_arch_type
Remove misleading typedef and redundant suffix from struct reg_arch_type.
2009-11-13 11:58:12 -08:00
Zachary T Welch 74d09617b9 reg_cache_t -> struct reg_cache
Remove misleading typedef and redundant suffix from struct reg_cache.
2009-11-13 11:58:12 -08:00
Zachary T Welch de3fb2f3bc bitfield_desc_t -> struct bitfield_desc
Remove misleading typedef and redundant suffix from struct bitfield_desc.
2009-11-13 11:58:12 -08:00
Zachary T Welch f4e03e3b90 oocd_trace_t -> struct oocd_trace
Remove misleading typedef and redundant suffix from struct oocd_trace.
2009-11-13 11:58:12 -08:00
Zachary T Welch b87f07110a mips_m4k_common_t -> struct mips_m4k_common
Remove misleading typedef and redundant suffix from struct mips_m4k_common.
2009-11-13 11:58:12 -08:00
Zachary T Welch a8141cafde mips_ejtag_t -> struct mips_ejtag
Remove misleading typedef and redundant suffix from struct mips_ejtag.
2009-11-13 11:58:11 -08:00
Zachary T Welch ccde06a08f mips32_core_reg_t -> struct mips32_core_reg
Remove misleading typedef and redundant suffix from struct mips32_core_reg.
2009-11-13 11:58:11 -08:00
Zachary T Welch 3b7aee21b5 mips32_common_t -> struct mips32_common
Remove misleading typedef and redundant suffix from struct mips32_common.
2009-11-13 11:58:11 -08:00
Zachary T Welch 1bd7a78d92 mips32_comparator_t -> struct mips32_comparator
Remove misleading typedef and redundant suffix from struct mips32_comparator.
2009-11-13 11:58:11 -08:00
Zachary T Welch ef36a7fb3b image_mot_t -> struct image_mot
Remove misleading typedef and redundant suffix from struct image_mot.
2009-11-13 11:58:11 -08:00
Zachary T Welch b154972bdb image_memory_t -> struct image_memory
Remove misleading typedef and redundant suffix from struct image_memory.
2009-11-13 11:58:11 -08:00
Zachary T Welch 1a4ff43a7c image_ihex_t -> struct image_ihex
Remove misleading typedef and redundant suffix from struct image_ihex.
2009-11-13 11:58:11 -08:00
Zachary T Welch a87faf5b66 image_binary_t -> struct image_binary
Remove misleading typedef and redundant suffix from struct image_binary.
2009-11-13 11:58:11 -08:00
Zachary T Welch 24df46d067 image_section_t -> struct image_section
Remove misleading typedef and redundant suffix from struct image_section.
2009-11-13 11:58:11 -08:00
Zachary T Welch 99614219ad etmv1_trace_data_t -> struct etmv1_trace_data
Remove misleading typedef and redundant suffix from struct etmv1_trace_data.
2009-11-13 11:58:11 -08:00
Zachary T Welch e2001ba211 etm_capture_driver_t -> struct etm_capture_driver
Remove misleading typedef and redundant suffix from struct etm_capture_driver.
2009-11-13 11:58:11 -08:00
Zachary T Welch 63242c6d45 etm_reg_t -> struct etm_reg
Remove misleading typedef and redundant suffix from struct etm_reg.
2009-11-13 11:58:11 -08:00
Zachary T Welch 01f9dc18fc etb_reg_t -> struct etb_reg
Remove misleading typedef and redundant suffix from struct etb_reg.
2009-11-13 11:58:11 -08:00
Zachary T Welch 2f7fc2921d embeddedice_reg_t -> struct embeddedice_reg
Remove misleading typedef and redundant suffix from struct embeddedice_reg.
2009-11-13 11:58:11 -08:00
Zachary T Welch 26a99ed740 cortex_m3_common_t -> struct cortex_m3_common
Remove misleading typedef and redundant suffix from struct cortex_m3_common.
2009-11-13 11:58:11 -08:00
Zachary T Welch a1971ecacf cortex_a8_common_t -> struct cortex_a8_common
Remove misleading typedef and redundant suffix from struct cortex_a8_common.
2009-11-13 11:58:11 -08:00
Zachary T Welch 72b421418f watchpoint_t -> struct watchpoint
Remove misleading typedef and redundant suffix from struct watchpoint.
2009-11-13 11:58:11 -08:00
Zachary T Welch e7f65c5a11 avr_common_t -> struct avr_common
Remove misleading typedef and redundant suffix from struct avr_common.
2009-11-13 11:58:10 -08:00
Zachary T Welch 4bc80e5a65 mcu_jtag_t -> struct mcu_jtag
Remove misleading typedef and redundant suffix from struct mcu_jtag.
2009-11-13 11:58:10 -08:00
Zachary T Welch 94f5ed90f1 armv7m_core_reg_t -> struct armv7m_core_reg
Remove misleading typedef and redundant suffix from struct armv7m_core_reg.
2009-11-13 11:58:10 -08:00
Zachary T Welch 5e43565ab5 armv7m_algorithm_t -> struct armv7m_algorithm
Remove misleading typedef and redundant suffix from struct armv7m_algorithm.
2009-11-13 11:58:10 -08:00
Zachary T Welch e8a6e3b2f4 armv7m_common_t -> struct armv7m_common
Remove misleading typedef and redundant suffix from struct armv7m_common.
2009-11-13 11:58:10 -08:00
Zachary T Welch 2744a031cb armv7a_core_reg_t -> struct armv7a_core_reg
Remove misleading typedef and redundant suffix from struct armv7a_core_reg.
2009-11-13 11:58:10 -08:00
Zachary T Welch 5415d07139 armv7a_algorithm_t -> struct armv7a_algorithm
Remove misleading typedef and redundant suffix from struct armv7a_algorithm.
2009-11-13 11:58:10 -08:00
Zachary T Welch 248448ee3a armv7a_common_t -> struct armv7a_common
Remove misleading typedef and redundant suffix from struct armv7a_common.
2009-11-13 11:58:10 -08:00
Zachary T Welch f6dae0cf84 armv4_5_mmu_common_t -> struct armv4_5_mmu_common
Remove misleading typedef and redundant suffix from struct armv4_5_mmu_common.
2009-11-13 11:58:10 -08:00
Zachary T Welch 405a5df786 armv4_5_cache_common_t -> struct armv4_5_cache_common
Remove misleading typedef and redundant suffix from struct armv4_5_cache_common.
2009-11-13 11:58:10 -08:00
Zachary T Welch e976786d55 armv4_5_cachesize_t -> struct armv4_5_cachesize
Remove misleading typedef and redundant suffix from struct armv4_5_cachesize.
2009-11-13 11:58:10 -08:00
Zachary T Welch 2dd9c5e1da armv4_5_core_reg_t -> struct armv4_5_core_reg
Remove misleading typedef and redundant suffix from struct armv4_5_core_reg.
2009-11-13 11:58:10 -08:00
Zachary T Welch 15e8e45308 armv4_5_algorithm_t -> struct armv4_5_algorithm
Remove misleading typedef and redundant suffix from struct armv4_5_algorithm.
2009-11-13 11:58:10 -08:00
Zachary T Welch 056fcdb540 arm_jtag_t -> struct arm_jtag
Remove misleading typedef and redundant suffix from struct arm_jtag.
2009-11-13 11:58:10 -08:00
Zachary T Welch c25e00b528 arm_load_store_multiple_instr_t -> struct arm_load_store_multiple_instr
Remove misleading typedef and redundant suffix from struct arm_load_store_multiple_instr.
2009-11-13 11:58:10 -08:00
Zachary T Welch 7de3c44320 arm_load_store_instr_t -> struct arm_load_store_instr
Remove misleading typedef and redundant suffix from struct arm_load_store_instr.
2009-11-13 11:58:10 -08:00
Zachary T Welch f9e091a2d3 arm_data_proc_instr_t -> struct arm_data_proc_instr
Remove misleading typedef and redundant suffix from struct arm_data_proc_instr.
2009-11-13 11:58:10 -08:00
Zachary T Welch 67f2f83937 arm_b_bl_bx_blx_instr_t -> struct arm_b_bl_bx_blx_instr
Remove misleading typedef and redundant suffix from struct arm_b_bl_bx_blx_instr.
2009-11-13 11:58:09 -08:00
Zachary T Welch f96d6054e6 swjdp_common_t -> struct swjdp_common
Remove misleading typedef and redundant suffix from struct swjdp_common.
2009-11-13 11:58:09 -08:00
Zachary T Welch 6ba48a1b44 swjdp_reg_t -> struct swjdp_reg
Remove misleading typedef and redundant suffix from struct swjdp_reg.
2009-11-13 11:58:09 -08:00
Zachary T Welch 785115a6a0 arm9tdmi_common_t -> struct arm9tdmi_common
Remove misleading typedef and redundant suffix from struct arm9tdmi_common.
2009-11-13 11:58:09 -08:00
Zachary T Welch 1ad4ee2deb arm966e_common_t -> struct arm966e_common
Remove misleading typedef and redundant suffix from struct arm966e_common.
2009-11-13 11:58:09 -08:00
Zachary T Welch 5f68f45186 arm926ejs_common_t -> struct arm926ejs_common
Remove misleading typedef and redundant suffix from struct arm926ejs_common.
2009-11-13 11:58:09 -08:00
Zachary T Welch 16487e7085 arm920t_tlb_entry_t -> struct arm920t_tlb_entry
Remove misleading typedef and redundant suffix from struct arm920t_tlb_entry.
2009-11-13 11:58:09 -08:00
Zachary T Welch b174a0d75e arm920t_cache_line_t -> struct arm920t_cache_line
Remove misleading typedef and redundant suffix from struct arm920t_cache_line.
2009-11-13 11:58:09 -08:00
Zachary T Welch 8e77975b92 arm7tdmi_common_t -> struct arm7tdmi_common
Remove misleading typedef and redundant suffix from struct arm7tdmi_common.
2009-11-13 11:58:09 -08:00
Zachary T Welch 8012b3963f arm7_9_common_t -> struct arm7_9_common
Remove misleading typedef and redundant suffix from struct arm7_9_common.
2009-11-13 11:58:09 -08:00
Zachary T Welch bcb18b2044 arm720t_common_t -> struct arm720t_common
Remove misleading typedef and redundant suffix from struct arm720t_common.
2009-11-13 11:58:09 -08:00
Zachary T Welch f3b3752a9e arm11_sc7_action_t -> struct arm11_sc7_action
Remove misleading typedef and redundant suffix from struct arm11_sc7_action.
2009-11-13 11:58:09 -08:00
Zachary T Welch 3bcd9ad9d0 arm11_reg_state_t -> struct arm11_reg_state
Remove misleading typedef and redundant suffix from struct arm11_reg_state.
2009-11-13 11:58:09 -08:00
Zachary T Welch 55926f576f arm11_common_t -> struct arm11_common
Remove misleading typedef and redundant suffix from struct arm11_common.
2009-11-13 11:58:09 -08:00
Zachary T Welch 0eae94879d arm11_reg_defs_t -> struct arm11_reg_defs
Remove misleading typedef and redundant suffix from struct arm11_reg_defs.
2009-11-13 11:58:09 -08:00
Zachary T Welch b1de5eb9a0 reg_param_t -> struct reg_param
Remove misleading typedef and redundant suffix from struct reg_param.
2009-11-13 11:58:09 -08:00
Zachary T Welch 6c965a3da9 mem_param_t -> struct mem_param
Remove misleading typedef and redundant suffix from struct mem_param.
2009-11-13 11:58:09 -08:00
Zachary T Welch 996613522d arm920t_common_t -> struct arm920t_common
Remove misleading typedef and redundant suffix from struct arm920t_common.
2009-11-13 11:58:08 -08:00
Zachary T Welch 52bc6cad87 arm11_register_history_t -> struct arm11_register_history
Remove misleading typedef and redundant suffix from struct arm11_register_history.
2009-11-13 11:58:08 -08:00
Zachary T Welch ea49f2e3ff remove typedef keyword from svf structures
Removes all misleading typedef keywords from structures in svf.c.
2009-11-13 11:58:08 -08:00
Zachary T Welch 95bf461c0a pld_device_t -> struct pld_device
Remove misleading typedef and redundant suffix from struct pld_device.
2009-11-13 11:58:08 -08:00
Zachary T Welch db08ab8a79 virtex2_pld_device_t -> struct virtex2_pld_device
Remove misleading typedef and redundant suffix from struct virtex2_pld_device.
2009-11-13 11:58:08 -08:00
Zachary T Welch cd4c059806 xilinx_bit_file_t -> struct xilinx_bit_file
Remove misleading typedef and redundant suffix from struct xilinx_bit_file.
2009-11-13 11:58:08 -08:00
Zachary T Welch db2086897a pld_driver_t -> struct pld_driver
Remove misleading typedef and redundant suffix from struct pld_driver.
2009-11-13 11:58:08 -08:00
Zachary T Welch 38d826cec1 connection_t -> struct connection
Remove misleading typedef and redundant suffix from struct connection.
2009-11-13 11:58:08 -08:00
Zachary T Welch f7cd2aa0ef telnet_connection_t -> struct telnet_connection
Remove misleading typedef and redundant suffix from struct telnet_connection.
2009-11-13 11:58:08 -08:00
Zachary T Welch f2cbaba3cc tcl_connection_t -> struct tcl_connection
Remove misleading typedef and redundant suffix from struct tcl_connection.
2009-11-13 11:58:08 -08:00
Zachary T Welch 8775a0f663 service_t -> struct service
Remove misleading typedef and redundant suffix from struct service.
2009-11-13 11:58:08 -08:00
Zachary T Welch e01a0be576 telnet_service_t -> struct telnet_service
Remove misleading typedef and redundant suffix from struct telnet_service.
2009-11-13 11:58:08 -08:00
Zachary T Welch 45a165a432 gdb_service_t -> struct gdb_service
Remove misleading typedef and redundant suffix from struct gdb_service.
2009-11-13 11:58:08 -08:00
Zachary T Welch 53bfd73591 gdb_connection_t -> struct gdb_connection
Remove misleading typedef and redundant suffix from struct gdb_connection.
2009-11-13 11:58:08 -08:00
Zachary T Welch 43483e5054 remove unused aduc702x structure.
The ADUC702x_FLASH_MMIO structure was completely used, so it must die.
2009-11-13 11:58:08 -08:00
Zachary T Welch a03c9a8dce aduc702x_flash_bank_t -> struct aduc702x_flash_bank
Remove misleading typedef and redundant suffix from struct
aduc702x_flash_bank.
2009-11-13 11:58:08 -08:00
Zachary T Welch 6a374afe71 tms470_flash_bank_t -> struct tms470_flash_bank
Remove misleading typedef and redundant suffix from struct tms470_flash_bank.
2009-11-13 11:58:08 -08:00
Zachary T Welch 3c9afaa645 pic32mx_mem_layout_t -> struct pic32mx_mem_layout
Remove misleading typedef and redundant suffix from struct pic32mx_mem_layout.
2009-11-13 11:58:08 -08:00
Zachary T Welch 54be77bc79 non_cfi_t -> struct non_cfi
Remove misleading typedef and redundant suffix from struct non_cfi.
2009-11-13 11:58:08 -08:00
Zachary T Welch d0dfec33b6 nand_block_t -> struct nand_block
Remove misleading typedef and redundant suffix from struct nand_block.
2009-11-13 11:58:07 -08:00
Zachary T Welch 92fc7a6fde str9xpec_flash_controller_t -> struct str9xpec_flash_controller
Remove misleading typedef and redundant suffix from struct str9xpec_flash_controller.
2009-11-13 11:58:07 -08:00
Zachary T Welch 6aa82891b6 str9x_flash_bank_t -> struct str9x_flash_bank
Remove misleading typedef and redundant suffix from struct str9x_flash_bank.
2009-11-13 11:58:07 -08:00
Zachary T Welch 774d71f2cf str7x_mem_layout_t -> struct str7x_mem_layout
Remove misleading typedef and redundant suffix from struct str7x_mem_layout.
2009-11-13 11:58:07 -08:00
Zachary T Welch 3b09560ae8 str7x_flash_bank_t -> struct str7x_flash_bank
Remove misleading typedef and redundant suffix from struct str7x_flash_bank.
2009-11-13 11:58:07 -08:00
Zachary T Welch 01b10d65bf stm32x_mem_layout_t -> struct stm32x_mem_layout
Remove misleading typedef and redundant suffix from struct stm32x_mem_layout.
2009-11-13 11:58:07 -08:00
Zachary T Welch c7b2cad52d stm32x_flash_bank_t -> struct stm32x_flash_bank
Remove misleading typedef and redundant suffix from struct stm32x_flash_bank.
2009-11-13 11:58:07 -08:00
Zachary T Welch 40273967bf stm32x_options_t -> struct stm32x_options
Remove misleading typedef and redundant suffix from struct stm32x_options.
2009-11-13 11:58:07 -08:00
Zachary T Welch 9059f9f28e stellaris_flash_bank_t -> struct stellaris_flash_bank
Remove misleading typedef and redundant suffix from struct stellaris_flash_bank.
2009-11-13 11:58:07 -08:00
Zachary T Welch ed9c4ef3c4 s3c24xx_nand_controller_t -> struct s3c24xx_nand_controller
Remove misleading typedef and redundant suffix from struct s3c24xx_nand_controller.
2009-11-13 11:58:07 -08:00
Zachary T Welch eba5608b52 pic32mx_flash_bank_t -> struct pic32mx_flash_bank
Remove misleading typedef and redundant suffix from struct pic32mx_flash_bank.
2009-11-13 11:58:07 -08:00
Zachary T Welch 5948e66ee8 orion_nand_controller_t -> struct orion_nand_controller
Remove misleading typedef and redundant suffix from struct orion_nand_controller.
2009-11-13 11:58:07 -08:00
Zachary T Welch c7b96a4dc1 ocl_priv_t -> struct ocl_priv
Remove misleading typedef and redundant suffix from struct ocl_priv.
2009-11-13 11:58:07 -08:00
Zachary T Welch 958ff04b08 nand_info_t -> struct nand_info
Remove misleading typedef and redundant suffix from struct nand_info.
2009-11-13 11:58:07 -08:00
Zachary T Welch f7ca047213 nand_manufacturer_t -> struct nand_manufacturer
Remove misleading typedef and redundant suffix from struct nand_manufacturer.
2009-11-13 11:58:07 -08:00
Zachary T Welch 8f4860d13f nand_ecclayout_t -> struct nand_ecclayout
Remove misleading typedef and redundant suffix from struct nand_ecclayout.
2009-11-13 11:58:07 -08:00
Zachary T Welch 8605352387 nand_flash_controller_t -> struct nand_flash_controller
Remove misleading typedef and redundant suffix from struct nand_flash_controller.
2009-11-13 11:58:07 -08:00
Zachary T Welch 4bc46d61ca mx3_nf_controller_t -> struct mx3_nf_controller
Remove misleading typedef and redundant suffix from struct mx3_nf_controller.
2009-11-13 11:58:07 -08:00
Zachary T Welch 79338ec6c2 mflash_bank_t -> struct mflash_bank
Remove misleading typedef and redundant suffix from struct mflash_bank.
2009-11-13 11:58:07 -08:00
Zachary T Welch bb6b9988cb mg_drv_info_t -> struct mg_drv_info
Remove misleading typedef and redundant suffix from struct mg_drv_info.
2009-11-13 11:58:07 -08:00
Zachary T Welch fc01dd6a13 mflash_gpio_drv_t -> struct mflash_gpio_drv
Remove misleading typedef and redundant suffix from struct mflash_gpio_drv.
2009-11-13 11:58:06 -08:00
Zachary T Welch a043632a52 mflash_gpio_num_t -> struct mflash_gpio_num
Remove misleading typedef and redundant suffix from struct mflash_gpio_num.
2009-11-13 11:58:06 -08:00
Zachary T Welch ed1aed8dd9 lpc3180_nand_controller_t -> struct lpc3180_nand_controller
Remove misleading typedef and redundant suffix from struct lpc3180_nand_controller.
2009-11-13 11:58:06 -08:00
Zachary T Welch b712a4e8b8 lpc2900_flash_bank_t -> struct lpc2900_flash_bank
Remove misleading typedef and redundant suffix from struct lpc2900_flash_bank.
2009-11-13 11:58:06 -08:00
Zachary T Welch 12f83f0429 lpc288x_flash_bank_t -> struct lpc288x_flash_bank
Remove misleading typedef and redundant suffix from struct lpc288x_flash_bank.
2009-11-13 11:58:06 -08:00
Zachary T Welch a15d4cc75e lpc2000_flash_bank_t -> struct lpc2000_flash_bank
Remove misleading typedef and redundant suffix from struct lpc2000_flash_bank.
2009-11-13 11:58:06 -08:00
Zachary T Welch 632fd663a8 flash_driver_t -> struct flash_driver
Remove misleading typedef and redundant suffix from struct flash_driver.
2009-11-13 11:58:06 -08:00
Zachary T Welch fb59ec739a flash_sector_t -> struct flash_sector
Remove misleading typedef and redundant suffix from struct flash_sector.
2009-11-13 11:58:06 -08:00
Zachary T Welch 98d7ed8523 faux_flash_bank_t -> struct faux_flash_bank
Remove misleading typedef and redundant suffix from struct faux_flash_bank.
2009-11-13 11:58:06 -08:00
Zachary T Welch de1781b7fa ecosflash_flash_bank_t -> struct ecosflash_flash_bank
Remove misleading typedef and redundant suffix from struct ecosflash_flash_bank.
2009-11-13 11:58:06 -08:00
Zachary T Welch 453a103f48 cfi_fixup_t -> struct cfi_fixup
Remove misleading typedef and redundant suffix from struct cfi_fixup.
2009-11-13 11:58:06 -08:00
Zachary T Welch 4c28cc68ed cfi_unlock_addresses_t -> struct cfi_unlock_addresses
Remove misleading typedef and redundant suffix from struct cfi_unlock_addresses.
2009-11-13 11:58:06 -08:00
Zachary T Welch 0139e7d51a cfi_spansion_pri_ext_t -> struct cfi_spansion_pri_ext
Remove misleading typedef and redundant suffix from struct cfi_spansion_pri_ext.
2009-11-13 11:58:06 -08:00
Zachary T Welch 2ded74115d cfi_atmel_pri_ext_t -> struct cfi_atmel_pri_ext
Remove misleading typedef and redundant suffix from struct cfi_atmel_pri_ext.
2009-11-13 11:58:06 -08:00
Zachary T Welch 1f328f2885 cfi_intel_pri_ext_t -> struct cfi_intel_pri_ext
Remove misleading typedef and redundant suffix from struct cfi_intel_pri_ext.
2009-11-13 11:58:06 -08:00
Zachary T Welch 3be0edbc5e cfi_flash_bank_t -> struct cfi_flash_bank
Remove misleading typedef and redundant suffix from struct cfi_flash_bank.
2009-11-13 11:58:06 -08:00
Zachary T Welch a7a8a1c9e2 avrf_flash_bank_t -> struct avrf_flash_bank
Remove misleading typedef and redundant suffix from struct avrf_flash_bank.
2009-11-13 11:58:06 -08:00
Zachary T Welch 6ca63ee756 avrf_type_t -> struct avrf_type
Remove misleading typedef and redundant suffix from struct avrf_type.
2009-11-13 11:58:06 -08:00
Zachary T Welch 3877201581 at91sam7_flash_bank_t -> struct at91sam7_flash_bank
Remove misleading typedef and redundant suffix from struct at91sam7_flash_bank.
2009-11-13 11:58:05 -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 9f212b01be fileio_t -> struct fileio
Remove useless structure typedef.
2009-11-13 11:58:04 -08:00
Zachary T Welch f59ec2043b log_callback_t -> struct log_callback
Removes useless and confusing typedef for log callback structure.
Types with _t should be suitable for passing by-value as arguments.
2009-11-13 11:58:04 -08:00
Zachary T Welch 99b57b6dcc remove accidental artifact
Somehow I managed to slip a temporary build file into the tree.
Remove it and update the .gitignore file so it doesn't happen again.
2009-11-13 11:52:53 -08:00
Zachary T Welch 89870c86e7 add src/hello.c to augment new command tutorial
The hello module provides the 'hello' command, printing a greetings
to the command console.  It can grow to serve as pedagogical example
of services that OpenOCD developers should use: a runnable style guide.
2009-11-13 10:57:57 -08:00
Zachary T Welch f973320cbb command_handler_t: make cmd an indirect parameter
This patch removes 'cmd' from the list of direct parameters, moving
that pointer to args[-1] (by way of the new CMD_NAME macro).
2009-11-13 10:56:55 -08:00
Zachary T Welch deede35c27 command_handler_t: make args parameter const
This patch prevents command handlers from modifying the strings passed
in the 'args' array.
2009-11-13 10:55:27 -08:00
Zachary T Welch cc63d6e72b command_handler_t: make cmd parameter const
Prevents the command name from being modified in command handlers.
Again, this has cascading effects, but the patches are fairly minimal.
2009-11-13 10:55:27 -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 1df5cc18f5 add PLD_DEVICE_COMMAND_HANDLER macro
Update virtex module to use abstracted PLD command handling.
2009-11-13 10:51:46 -08:00
Zachary T Welch 670f999e7a nand: add NAND_DEVICE_COMMAND_HANDLER macro
Abstracts the extended NAND command handling to allow the function
signature to be controlled by __COMMAND_HANDLER.
2009-11-13 10:51:46 -08:00
Zachary T Welch 0796dfff89 use FLASH_BANK_COMMAND_HANDLER macro
Defines all flash_bank_command handlers using the new macro.
2009-11-13 10:51:46 -08:00
Zachary T Welch 57c5c5f463 add FLASH_BANK_COMMAND_HANDLER macro
The FLASH_BANK_COMMAND_HANDLER provides an extended command handler
using the __COMMAND_HANDLER macro, whereby changing that macro is
sufficient to update flash handlers with the new signature.  It also
enforces uniform style and scope when implementing this handler.
2009-11-13 10:51:46 -08:00
Zachary T Welch 76868e0713 s3c24xx: use COMMAND_HANDLER with command helper
Add S3C24XX_DEVICE_COMMAND macros to abstract common command handler
conventions.
2009-11-13 10:51:46 -08:00
Zachary T Welch d02fee197f arm_adi,armv7[am]: use COMMAND_HELPER for helpers
Rewrites the dap_* command helpers to use the COMMAND_HELPER paradigm.
Uses CALL_COMMAND_HELPER to hide inherited calling conventions.
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
Zachary T Welch ddb6138ed4 add command_handler_t type
This patch adds new typedefs for command handler callback functions.
Users of this type signature were updated to use these new types.
It uses the new __COMMAND_HANDLER macro to prevent duplication.
2009-11-13 10:51:45 -08:00
Zachary T Welch 3f9fd4e2a6 add COMMAND_HANDLER and COMMAND_HELPER macros
The COMMAND_HANDLER and COMMAND_HELPER macros allow commands to be
defined in a manner that decouples them from the exact order and type of
their parameters.  Once converted, incremental changes to the command
handler type can be addressed in incremental patches that do not need to
touch the entire tree.

These macros' implementation, __COMMAND_HANDLER, is used to define the
new command_handler_t type, and additional patches will use it to derive
new macros to define extended command types (e.g. flash, nand, pld).
The CALL_COMMAND_HANDLER provides a means of calling helpers or nested
handlers from withing a command handler.

This patch uses C99 varadic macro expansion.  Please report compilers
that cannot handle this code.
2009-11-13 10:51:45 -08:00
Zachary T Welch 1ae4d93c3c add command_output_handler_t
Add a typedef for command output handler function type, simplifying
the appearance of functions that use it and eliminating duplicate code.
2009-11-13 10:51:45 -08:00
David Brownell 5eb638c71e Cortex-A8: fix indent
The "remove (forward) declarations" patch goofed indentation on the
"cortexa8_target" struct; fix.

Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
2009-11-13 08:45:20 -08:00
Zachary T Welch e8e94ab245 nand: rename device to nand
To be more informative (and consistent with flash and pld trees), change
'device' parameter name to 'nand' in NAND source files.  This change
eliminates confusing 'device->device->' instance from the code, and
it simplifies the forthcoming command handler patches.
2009-11-12 22:25:55 -08:00
David Brownell d47764ff71 ETM: start support for ETMv2+
ARM11 and newer cores include updated ETM modules.  Recognize
their version codes and some key config differences.  Sanity
checked on an OMAP2, with an ETM11RV r0p1 (ETMv3.1).

This still handles only scan chain 6, with at most 128 registers.
Newer cores (mostly, Cortex) will need to use the DAP instead.

Note that the newer ETM modules don't quite fit the quirky config
model of the older ones ... having more port widths is easy, but
the modes aren't the same.  That still needs to change.

Fix a curious bug ... how did the register cache NOT get saved??

Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
2009-11-12 20:24:41 -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
David Brownell 5723e54fa9 ETM: remove old mid-level ETM handle
Now that nothing uses the old ETM handle any more, remove it.
Add minimal header tweaks, letting non-ARM7 and non-ARM9 cores
access ETM facilities.

Now ARM11 could support standard ETM (and ETB) access as soon as
it derives from "struct arm" ... its scanchain 6 is used access
the ETM, just like ARM7 and ARM9.

The Cortex parts (both M3 and A8) will need modified access methods
(via ETM init parameters), so they use the DAP.  Our first A8 target
(OMAP3) needs that for both ETM and ETB, but the M3 ETM isn't very
useful without SWO trace support (it's painfully stripped down), so
that support won't be worth adding for a while.

Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
2009-11-11 21:57:44 -08:00
David Brownell e740536568 ETM: use new toplevel ETM handle
Make ETM itself use the new toplevel ETM handle, instead
of the to-be-removed lower level one.  As of this patch,
nothing should be using the old ARM7/ARM9-specific handle.

Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
2009-11-11 21:55:19 -08:00
David Brownell 9855a11edd ETM: update port drivers
Make both useful ETM port drivers (etb, etm_dummy) use the new
toplevel ETM handle, instead of the to-be-removed lower level one.

Do the same for the "oocd-trace" prototype too; and fix its
error reporting paths:  return failure codes, don't exit(), etc

Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
2009-11-11 21:52:02 -08:00
David Brownell 3ae4401901 ETM: update arm[79]tdmi_examine()
Make ARM7 and ARM9 cores use the new toplevel ETM handle to
trigger ETM setup, not the to-be-removed lower level one.

Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
2009-11-11 21:50:10 -08:00
David Brownell 4b20ed6b5c ARM: start generalized base type
Rename "struct armv4_5_common_s" as "struct arm".  It needs
a bit more work to be properly generic, and to move out of
this header, but it's the best start we have on that today.

Add and initialize an optional ETM pointer, since that will
be the first thing that gets generalized.

The intent being:  all ARMs should eventually derive from
this "struct arm", so they can reuse the current ETM logic.
(And later, more.)  Currently the ARM cores that *don't* so
derive are only ARMv7-M (and thus Cortex-M3) and ARM11.

Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
2009-11-11 21:49:14 -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 158698e333 improve command registration
Eliminate duplicate code for linking commands into a list.

Adds a check to ensure the command does not already exist;
if it does, return that one instead of creating a duplicate.
2009-11-11 13:50:28 -08:00
Zachary T Welch 46d9ba4c8b add help regardless of callback
Add help for commands regardless of whether a handler is involved.
With this, all sorts of new commands can be found in 'help' text.
Hopefully, all of them have been documented....

Sadly, the lsort function appears to handle nested lists poorly, such
that sub-commands do not group with their parents.
2009-11-11 12:15:39 -08:00
Zachary T Welch a1a3ee579c eliminate duplicate helptext management
Add helpers to manage adding entries to the helptext list.
Adds support for arbitrarily nested commands.
2009-11-11 12:15:39 -08:00
Zachary T Welch 2d3cc1eac1 add command_name helper
The command_name function returns a malloced string for a given
command and its parents.  This can be used to display a message
to the user, but it is used internally to handle registration
and syntax errors.  This helps permit arbitrary command nesting.
2009-11-11 12:15:39 -08:00
Zachary T Welch f93c98081f wrap help command
Use continuation characters to wrap the help command into 80 columns.
2009-11-11 12:15:39 -08:00
Zachary T Welch 2821115ab8 remove obsolete doxygen comments
Documenting command handler parameters is redundant and pointless.
2009-11-11 11:53:22 -08:00
Zachary T Welch 39ab1c1a41 remove more useless declarations
Removes forward declarations by moving command registration after
defintion of the command handlers.
2009-11-11 11:53:22 -08:00
Zachary T Welch e997431602 cortex_a8: remove declarations, use static keyword 2009-11-11 11:53:22 -08:00
Zachary T Welch ca594adb5a add const keyword to some APIs
Add 'const' keyword to 'char *' parameters to allow command handlers to
pass constant string arguments.  These changes allow the 'args' command
handler to be changed to 'const' in a subsequent patch.
2009-11-11 11:53:22 -08:00
Zachary T Welch 9741e126fd change argv to args in command handlers
Subsequent patches expect all command handlers to use a uniform
parameter naming scheme.  In the entire tree, these two files used
standard 'argv' instead of our non-standard 'args'.  This patch opts
to reduces the noise required to unify the command handlers, using
dominant 'args' form.

A future patch may be used to convert us back to the standard argv, but
that requires coordination with all developers to minimize disruptions.
2009-11-11 11:50:36 -08:00
Zachary T Welch e09d8938f5 script_debug(): improve types
Use unsigned type for number of arguments.
2009-11-11 05:40:48 -08:00
Zachary T Welch c942969377 command.c: make private routines static
This patch also improves the signature of run_command function.
2009-11-11 05:40:48 -08:00
Zachary T Welch 6a2e83c017 log: improve log_callback_fn signature
Use unsigned type for line number in log_callback_fn signature.
2009-11-11 05:40:48 -08:00
Zachary T Welch 0cd414c7d6 time_support: improve use of types
Update timeval_add_time to use long int; implement timeval_add with it.
Update timeval_ms to check gettimeofday return value, return int64_t.
2009-11-11 05:40:48 -08:00
Zachary T Welch b7b4efcdf1 makefiles: improve build order
Separates various groups of files to be built in logical succession.
In each layer, the core module (target.c, nand.c, etc.) is built _after_
their helper modules (e.g. image.c, nand_ecc.c) but _before_ any of
their drivers (e.g. arm966e.c, mx3_nand.c).

This allows problems introduced at the bottom of the stack to result
in build failures as soon as possible, as the helpers and core should
wrap portions of them.
2009-11-11 05:40:48 -08:00
David Brownell d796ce0e4d ETM cleanup
Various cleanups of ETM related code.

 - Saner error return paths
 - Simplify arm7_9 init ... no need for extra zeroing!
 - Shrink some lines
 - Tweak some diagnostics
 - Use shorter name for ETM struct type.
 - Don't exit()

and similar.  The diagnostics look forward to having
this ETM code work with more than just ARM7/ARM9.

Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
2009-11-11 04:42:50 -08:00
Zachary T Welch 583a293a32 fix bug in ARM720: bugfix 2009-11-10 21:02:30 -08:00
David Brownell d570e4f6f6 ARM720: bugfix
The "ARM720 uses the new inheritance/nesting scheme" patch
wrongly scrubbed a calloc() from arm720t_target_create().

Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
2009-11-10 19:06:10 -08:00
David Brownell 61af6a6816 target: MMU-aware init for memory read/write
Start switching MMU handling over to a more sensible scheme.
Having an mmu() method enables MMU-aware behaviors.  Not having
one kicks in simpler ones, with no distinction between virtual
and physical addresses.

Currently only a handful of targets have methods to read/write
physical memory:  just arm720, arm920, and arm926.  They should
all initialize OK now, but the arm*20 parts don't do the "extra"
stuff arm926 does (which should arguably be target-generic).

Also simplify how target_init() loops over all targets by making
it be a normal "for" loop, instead of scattering its three parts
to the four winds.

Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
2009-11-10 11:58:31 -08:00
Michael Bruck 627bd19768 arm11: add etmr/etmw registers to access ETM via DBGTAP scan chain
First cut of these commands. Øyvind tinkered a bit with
the number parsing to bring it up to speed + rebased it.
Ready for testing.

Signed-off-by: Øyvind Harboe <oyvind.harboe@zylin.com>
2009-11-10 14:00:24 +01:00
Øyvind Harboe c202ba7d34 ARM11: remove old mrc/mcr commands
Switch to new commands in config scripts

Signed-off-by: Øyvind Harboe <oyvind.harboe@zylin.com>
2009-11-10 13:13:13 +01:00
David Brownell 2a4d3c03cd Target: minor cleanup
- improve some names -- a "default" prefix is not descriptive
 - add doxygen @todo entries for some issues
 - avr8 isn't ever going to need those MMU hooks

Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
2009-11-10 02:01:20 -08:00
David Brownell 508e5c803f ARM920: implement basic MMU ops
mmu() works; virt2phys() fails and logs an error.

Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
2009-11-10 01:36:59 -08:00
David Brownell 65e3471d78 ARM720: implement basic MMU ops
mmu() works; virt2phys() fails and logs an error.

Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
2009-11-10 01:35:50 -08:00
David Brownell 0df56714a0 Target: fix bad error messages
And shrink a few too-long lines.

Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
2009-11-10 01:33:59 -08:00
Øyvind Harboe 031591ead5 httpd: fix warnings, more robust error handling, improved MIME handling
The httpd is work in progress...

No mime type set by default. Let the browser guess.

Signed-off-by: Øyvind Harboe <oyvind.harboe@zylin.com>
2009-11-10 08:50:06 +01:00
Øyvind Harboe 151a270695 tcl: HostOs now picks up eCos as well during compile time
Signed-off-by: Øyvind Harboe <oyvind.harboe@zylin.com>
2009-11-10 08:36:19 +01:00
Zachary T Welch db6c2871dd svf,xsvf,arm7_9_common: trim forard declarations
Remove forward declarations by reordering command registration.
2009-11-09 21:39:46 -08:00
Zachary T Welch 841721929a command.c: make commands static
Removes useless declarations, moving the handler functions to appear
before their use in the (much bigger) command registriation function.
2009-11-09 21:39:46 -08:00
Zachary T Welch 23d88e5774 server: remove useless declarations
Remove server command declarations, make handler routines static.
2009-11-09 21:39:46 -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
Zachary T Welch ef6387a0c9 target.c: remove useless declarations
This patch removes the last batch of forward references from the tree,
moving the target command registration routines to the end of the file.
2009-11-09 19:24:06 -08:00
Zachary T Welch 2351641b8f {pic32m,stm32}x.c: remove useless declarations
Remove useless forward declarations.
Moves command registrations to end of files.
Moves flash structure definitions to end of files.

Signed-off-by: Zachary T Welch <zw@superlucidity.net>
2009-11-09 18:42:48 -08:00
Zachary T Welch 6cd97f48d0 str{7,9}x*.c: remove useless forward declarations
Remove useless forward declarations.
Moves command registrations to end of files.
Moves flash structure definitions to end of files.

Signed-off-by: Zachary T Welch <zw@superlucidity.net>
2009-11-09 18:42:47 -08:00
Zachary T Welch 041c319d9d flash/<various>.c: remove useless declarations
Remove useless forward declarations.
Moves flash structure definitions to end of files.

Signed-off-by: Zachary T Welch <zw@superlucidity.net>
2009-11-09 18:42:47 -08:00
Zachary T Welch 712d3fc0fb flash/<assorted>.c: remove useless declarations
Remove useless forward declarations.
Moves command registrations to end of files.
Moves flash structure definitions to end of files.

Signed-off-by: Zachary T Welch <zw@superlucidity.net>
2009-11-09 18:42:47 -08:00
Zachary T Welch 4cd02c63e9 flash/at91sam[37].c: remove useless declarations
Remove useless forward declarations.
Moves command registration to end of file.
Moves flash structure definitions to end of files.

Changes a few references to global flash structure to local refs.

Signed-off-by: Zachary T Welch <zw@superlucidity.net>
2009-11-09 18:42:47 -08:00
Zachary T Welch 770716e9e0 flash/lpc2???.c: remove useless declarations
Remove useless forward declarations.
Moves command registrations to end of files.
Moves flash structure definitions to end of files.

Signed-off-by: Zachary T Welch <zw@superlucidity.net>
2009-11-09 18:42:47 -08:00
Zachary T Welch 8b5c5c054d flash/*nand*.c: remove useless declarations
Remove useless forward declarations.
Moves command registration to end of files.
Moves flash structure definition to end of files.

Signed-off-by: Zachary T Welch <zw@superlucidity.net>
2009-11-09 18:42:47 -08:00
Zachary T Welch 5c95741df7 flash/flash.c: remove forward declarations
Remove useless forward declarations.
Moves command registration to end of file.
Moves flash structure definition to end of file.

Signed-off-by: Zachary T Welch <zw@superlucidity.net>
2009-11-09 18:42:47 -08:00
David Brownell 7269ba5eb6 Revert "target: add target->type->has_mmu fn"
This patch introduced a bug preventing flash writes from working
on Cortex-M3 targets like the STM32.  Moreover, it's the wrong
approach for handling no-MMU targets.

The right way to handle no-MMU targets is to provide accessors
for physical addresses, and use them everywhere; and any code
which tries to work with virtual-to-physical mappings should use
a identity mapping (which can be defaulted).

And ... we can tell if a target has an MMU by seeing if it's
got an mmu() method.  No such methood means no MMU.

Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
2009-11-09 14:46:23 -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 3885ab5a5a src/target: remove 'extern' and wrap headers
Remove extern keywords from function prototypes and wrap long lines.
2009-11-09 09:44:33 -08:00
Zachary T Welch 42cafc9369 target.h: remove extern keyword and wrap
Removes 'extern' keyword from function prototypes and wraps long lines.
2009-11-09 09:44:33 -08:00
Zachary T Welch 994a63c3fe src/{server,pld,svf,xsvf}: remove 'extern' keyword
Removes 'extern' keyword from function declarations in header filess.
2009-11-09 09:44:33 -08:00
Zachary T Welch 81fbc63718 src/flash: remove 'extern' and wrap headers
Removes 'extern' keywords from function prototypes in the flash headers.
Wraps long lines to fit into 80 columns.

Adds multiple inclusion protection for s3c2xx_nand.h.
2009-11-09 09:44:33 -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
Zachary T Welch 1712d7835e src/helper: wrap and clean headers.
Remove all useless 'extern' keywords from function prototypes.
Wraps long lines for readability.
2009-11-09 09:44:33 -08:00
David Brownell 4882647f3e User's Guide: bugfix global state info
The "$ocd_HOSTOS" variable was wrongly documented.  Fix its
documentation, and its value on Linux.

Shrink a few of the too-long lines.

Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
2009-11-09 09:40:55 -08:00
David Brownell 526347f959 EmbeddedICE: minor cleanups
Add comments (Doxygen and normal), remove unused code,
shrink some overlong lines.  Get rid of a forward decl.

Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
2009-11-09 09:34:51 -08:00
Zachary T Welch 2689f58f2a Overhaul time support API
This patch changes the duration_* API in several ways.  First, it
updates the API to use better names.  Second, string formatting has
been removed from the API (with its associated malloc).  Finally, a
new function added to convert the time into seconds, which can be
used (or formatted) by the caller.  This eliminates hidden calls to
malloc that require associated calls to free().

This patch also removes the useless extern keyword from prototypes,
and it eliminates the duration_t typedef (use 'struct duration').
These API also allows proper error checking, as it is possible for
gettimeofday to fail in certain circumstances.

The consumers have all been chased to use this new API as well, as
there were relatively few cases doing this type of measurement.
In most cases, the code performs additional checks for errors, but
the calling code looks much cleaner in every case.
2009-11-09 01:21:50 -08:00
Zachary T Welch da3196bf5e Add private header for ARM11 internals.
Reduces confusion about location of associated routines and
reduces clutter in the arm11 header.

Removes extra whitespace around the lines touched by these changes.
2009-11-08 15:47:04 -08:00
Zachary T Welch e41147bf75 ARM11: remove exports and forward decls
Unneeded exports cause confusion about the module interfaces.
Make almost everything static in the arm11.c module.
2009-11-08 15:47:04 -08:00
David Brownell b2d01a9e6a ARM: minor simulator cleanup
Make several functions be static.  Shrink some of the overlong
lines.  Use pure tab indents in some places that mixed in spaces.
This gives a minor object code shrink (about 2% on amd64).

Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
2009-11-08 12:44:28 -08:00
David Brownell 7d9df4b134 Cortex-M3: fix (debug) message priority
Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
2009-11-08 12:23:17 -08:00
Zachary T Welch 2b1bd97508 Fix vsllink bulk out endpoint parsing. 2009-11-07 13:36:47 -08:00
David Brownell fb50efc6e7 Merge branch 'master' of ssh://dbrownell@openocd.git.sourceforge.net/gitroot/openocd/openocd 2009-11-06 15:01:46 -08:00
David Brownell a9abfa7d06 target: don't swap MMU/no-MMU work areas
Resolve serious bug inserted by the "target: require working
area for physical/virtual addresses to be specified" patch.
It forced use of (invalid) virtual addresses when the MMU
was disabled, and vice versa.

Observed to break at least Cortex-M3, ARM926, ARM7TDMI whenever
work areas are used, such as during bulk writes to flash, DDR2,
SRAM, and so on.

Also, fix overlong lines and whitespace goofs.

Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
2009-11-06 14:57:21 -08:00
Zachary T Welch ca00483a95 Simplify nand indentation.
Removes check covered by new nand_command_get_device_by_num helper.
Reverses logic of probe check to further reduce indentation.
2009-11-06 02:52:56 -08:00
Zachary T Welch ff61e6a37c Improve flash indentation.
Removes redundant tests and reverses backwards logic to reduce the
indentation level in flash.c.
2009-11-06 02:52:51 -08:00
Zachary T Welch c5f56437c0 Fix arm11 vcr command parsing. 2009-11-06 02:36:56 -08:00
David Brownell 6a0af06bd9 ARM: shrink offsets
Move various embedded target structs to the beginnings of
their containers ... pretty much the way C++ or Obj-C
would for single inheritance.

This shrinks code that accesses those embedded structs by
letting common offsets use smaller instructions.  Sample
before/after sizes (on amd64):

  17181	    312	      0	  17493	   4455	arm920t.o
  16810	    312	      0	  17122	   42e2	arm920t.o

Where the "after" is the smaller number, with this patch
over the ones leveraging that embedding knowledge.

Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
2009-11-05 22:04:25 -08:00
David Brownell 03ac53a2cf ARM: other code uses the new inheritance/nesting scheme
Remove most remaining uses of target->arch_info from ARM
infrastructure, where it hasn't already been updated.

Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
2009-11-05 22:04:22 -08:00
David Brownell a81df55f39 Cortex-A8: use the new inheritance/nesting scheme
Use target_to_armv7a() etc, replacing needless pointer traversals.
Stop using X->arch_info scheme in most ARMv7-A and Cortex-A8 code.

Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
2009-11-05 22:04:13 -08:00
David Brownell fec3c4763a ARM7TDMI uses the new inheritance/nesting scheme
Use target_to_arm7_9(), replacing needless pointer traversals.

Also:  remove now-useless contents of arm7tdmi struct; it's
almost ready to be removed.

Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
2009-11-05 22:04:04 -08:00
David Brownell 11fe2ec62e ARM720 uses the new inheritance/nesting scheme
Use target_to_arm720(), replacing needless pointer traversals
and simplifying a bunch of nasty code.  Stop setting arch_info
for arm720 type parts, it's not used any longer.

Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
2009-11-05 22:03:56 -08:00
David Brownell 6cf956fa9d XScale uses the new inheritance/nesting scheme
Use target_to_xscale(), replacing needless pointer traversals
and simplifying a bunch of code.

Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
2009-11-05 22:03:45 -08:00
David Brownell 178c758096 ARM9TDMI uses the new inheritance/nesting scheme
Replace needless pointer traversals and simplify.  Also remove most
remaining contents from arm9tdmi struct; it's almost removable.

Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
2009-11-05 22:03:40 -08:00
David Brownell 865ed6ed81 ARM966 uses the new inheritance/nesting scheme
Use target_to_arm966(), replacing needless pointer traversals.

Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
2009-11-05 22:03:33 -08:00
David Brownell 1fcb351de6 ARM926 uses the new inheritance/nesting scheme
Use target_to_arm926(), replacing needless pointer traversals
and simplifying a bunch of code.

Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
2009-11-05 22:03:30 -08:00
David Brownell 6e08573efd FA526 uses the new inheritance/nesting scheme
Replace needless pointer traversals, simplify.

Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
2009-11-05 22:03:24 -08:00
David Brownell 9be533566e ARM920 uses the new inheritance/nesting scheme
Use target_to_arm920(), replacing needless pointer traversals
and simplifying.  Stop setting arm9tdmi->arch_info for arm920
type parts, it's not used any longer.

Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
2009-11-05 22:03:13 -08:00
David Brownell da739aa257 Cortex-M3: use the new inheritance/nesting scheme
Use new target_to_cm3() and target_to_armv7m() inlines,
instead of a series of x->arch_info conversions.  Remove
arch_info, since nothing uses it.

Also fix an omission:  the Cortex-M3 commands didn't verify
that they were operating on that kind of target.  Add comment
about the ARMv7M version of that omission.

Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
2009-11-05 21:59:45 -08:00
David Brownell db116b1ea3 target: provide container_of()
Provide a cleaner way to handle single inheritance of targets
in C, using the same model Linux does:  structs containing other
structs, un-nested via calls to a "container_of()" macro that
are packaged in typesafe inline functions.

Targets already use this containment idiom, but make it much
more complicated because they un-nest using embedded "void *"
pointers ... in chains of up to five per target, which is all
pure needless complication.  (Example: arm92x core, arm9tdmi,
arm7_9, armv4_5 ... on top of the base "target" class.)

Applying this scheme consistently simplifies things, and gets
rid of many error-prone untyped pointers.  It won't change any
part of the type model though -- it just simplifies things.
(And facilitates more cleanup later on.)

Rule of thumb:  where there's an X->arch_info void* pointer,
access to that pointer can and should be removed.  It may be
convenient to set up pointers to some of the embedded structs;
and shrink their current "*_common" names (annoyingly long).

Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
2009-11-05 21:59:39 -08:00
David Brownell b7e4c26b9b ARM7TDMI: remove forward decls
The forward decls are just code clutter; remove them, by moving
their references after definitions.  This is another file which
never needed even one internal forward declaration.

Also shrink a few overly-long lines with function declarations
or definitions;  get rid of arm7tdmi_register_commands(), it's
not needed (just delegated); minor whitespace declutter.

Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
2009-11-05 20:36:42 -08:00
David Brownell 1e57376c1a ARM720: remove exports and forward decls
Unneeded exports cause confusion about the module interfaces.
Make all functions static.  Add a short header comment.

The forward decls are just code clutter; remove them, by moving
their references after definitions.  This is another file which
never needed even one internal forward declaration.

Remove unneeded indirection for the write_memory() method.  Make
a table static, remove a can't-happen case with nasty exit().

Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
2009-11-05 20:36:27 -08:00
David Brownell dd96b2c28e FA526: remove exports and forward decls
Unneeded exports cause confusion about the module interfaces.
Make most functions static.

The forward decls are just code clutter; remove them, by moving
their references after definitions.  This is another file which
never needed even one internal forward declaration.

Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
2009-11-05 20:36:18 -08:00
David Brownell b52fa7492c ARM9TDMI: remove forward decls
The forward decls are just code clutter; remove them, by moving
their references after definitions.  This is another file which
never needed even one internal forward declaration.

Also shrink a few overly-long lines with function declarations
or definitions.

Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
2009-11-05 20:36:09 -08:00
David Brownell 20ff0a9682 ARM966: remove exports and forward decls
Unneeded exports cause confusion about the module interfaces.
Make most functions static.

The forward decls are just code clutter; remove them, by moving
their references after definitions.  This is another file which
never needed even one internal forward declaration.

Also remove needless arm966e_init_target(), in favor of the
arm9tdmi routine to which it delegates its work.

This saved over 100 bytes of code on x86_32.

Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
2009-11-05 20:35:53 -08:00
David Brownell ed9ac9b6fe ARM926: more cleanup
An init_target() wrapper isn't needed, and target_create()
can shrink a bit.  Add a header comment and some doxygen.

Remove arm926ejs_catch_broken_irscan() which has been a NOP
for quite a few months now, and in any case duplicates logic
in the JTAG core to validate IR capture data.  But force the
capture mask to 0x0f, so those tests are most effective.

Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
2009-11-05 20:35:47 -08:00
David Brownell aab023570b ARM920: remove exports and forward decls
Unneeded exports cause confusion about the module interfaces.
Make most functions static.  Add a short header comment.

The forward decls are just code clutter; remove them, by moving
their references after definitions.  This is another file which
never needed even one internal forward declaration.

This saved almost 900 bytes of code on x86_32; it seems the
compiler can leverage its knowledge that these functions are
not called from the outside world...

Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
2009-11-05 20:35:37 -08:00
Zachary T Welch 36b4ac90e4 Improve str9xpec command argument parsing. 2009-11-05 18:19:19 -08:00
Zachary T Welch fa9e5d1027 Improve str9x config command argument parsing. 2009-11-05 18:19:19 -08:00
Zachary T Welch 111b7a6a9d Improve str7x config command argument parsing. 2009-11-05 18:19:19 -08:00
Zachary T Welch aa9351ba46 Improve stm32x.c command argument parsing. 2009-11-05 18:19:19 -08:00
Zachary T Welch 786106d725 Improve stellaris.c erase argument parsing. 2009-11-05 18:19:19 -08:00
Zachary T Welch fc116380bf Improve pic32mx.c command argument parsing. 2009-11-05 18:19:18 -08:00
Zachary T Welch ee4723c494 Improve mflash.c command argument parsing. 2009-11-05 18:19:18 -08:00
Zachary T Welch c63671e4f7 Improve lpc3180_nand_controller.c parsing.
This fixes a memory leak in lpc3180_nand_device_command by
reordering the malloc to occur after all parsing has completed.
2009-11-05 18:19:18 -08:00
Zachary T Welch 7b2d8d93e6 Improve lpc2900.c command argument parsing. 2009-11-05 18:19:18 -08:00
Zachary T Welch 0004691e91 Improve lpc288x.c command argument parsing. 2009-11-05 18:19:18 -08:00
Zachary T Welch 7f6ad49d12 Improve lpc2000.c command argument parsing. 2009-11-05 18:19:18 -08:00
Zachary T Welch 680e22c4d7 Improve cfi.c command argument parsing. 2009-11-05 18:19:18 -08:00