summaryrefslogtreecommitdiff
path: root/src/target
Commit message (Collapse)AuthorAgeFilesLines
* move container_of to types.hZachary T Welch2009-11-161-13/+0
| | | | | | 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).
* #include "target.h" less wildlyDavid Brownell2009-11-169-6/+7
| | | | | | | | | 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>
* target: no implicit #includes of "register.h"David Brownell2009-11-1627-10/+21
| | | | | | | | | | | | 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>
* target: less implicit inclusion of "command.h"David Brownell2009-11-165-7/+3
| | | | | | | | | | 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>
* target: don't implicitly include "algorithm.h"David Brownell2009-11-166-3/+6
| | | | | | | | | | | | | | 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>
* target: don't implicitly include "breakpoint.h"David Brownell2009-11-1611-2/+11
| | | | | | | | | | | 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>
* ARM11: use now-generic memory utilsDavid Brownell2009-11-151-11/+2
| | | | | | | | | | | | 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>
* ARM11: fixup method tableDavid Brownell2009-11-152-47/+43
| | | | | | | | | 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>
* ARM: memory utils aren't ARM7/ARM9 dependentDavid Brownell2009-11-1515-178/+209
| | | | | | | | | | | | | | | | 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>
* target: make "examined" flag be per-targetDavid Brownell2009-11-155-44/+53
| | | | | | | | | | | | | | | | | | 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>
* remove unused arm_jtag_buf_to_* helpersZachary T Welch2009-11-142-106/+0
| | | | | | 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.
* struct scan_field_s -> struct scan_fieldZachary T Welch2009-11-142-24/+24
| | | | | Remove obsolete suffix from struct scan_field. Somehow, these definitions did not get updated but did not cause any errors.
* Fix for md* commands, similar to mw*.Krzysztof Dziuba2009-11-141-1/+2
|
* Invalid command syntax errors with MWW.Dean Glazeski2009-11-141-1/+2
| | | | | 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.
* compile with cygwin (32-bit)Ferdinand Postema2009-11-143-16/+25
| | | | | | | | Changed some printf format strings.. [dbrownell@users.sourceforge.net: shrink lines, fix indents] Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
* ARM11: ETM + ETB supportDavid Brownell2009-11-131-1/+15
| | | | | | | | | | | 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>
* ARM11: revert etmr/etmw commandsDavid Brownell2009-11-133-165/+0
| | | | | | | 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>
* ARM7/ARM9: use shared examine() methodDavid Brownell2009-11-1312-84/+65
| | | | | | | | | 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>
* ETM: simplify ETM initialization code pathsDavid Brownell2009-11-133-18/+14
| | | | | | | | | 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>
* ARM11: switch to new "arm" base typeDavid Brownell2009-11-133-35/+39
| | | | | | | | | | 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>
* target: remove unused "bitfield" infrastructureDavid Brownell2009-11-139-73/+78
| | | | | | | | | | | | | | 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>
* ARM7/9: rm arm7_9_get_arch_pointers()David Brownell2009-11-132-64/+29
| | | | | | | | | | 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>
* command_t -> struct commandZachary T Welch2009-11-1319-20/+20
| | | | Remove misleading typedef and redundant suffix from struct command.
* command_context_t -> struct command_contextZachary T Welch2009-11-1345-96/+96
| | | | Remove misleading typedef and redundant suffix from struct command_context.
* target_t -> struct targetZachary T Welch2009-11-1360-972/+970
| | | | Remove misleading typedef and redundant suffix from struct target.
* reg_t -> struct regZachary T Welch2009-11-1327-152/+152
| | | | Remove misleading typedef and redundant suffix from struct reg.
* target_type_t -> struct target_typeZachary T Welch2009-11-1317-41/+38
| | | | Remove misleading typedef and redundant suffix from struct target_type.
* improve mips32_pracc_contextZachary T Welch2009-11-131-5/+6
| | | | Use struct mips32_pracc_context instead of a typedef.
* image_t -> struct imageZachary T Welch2009-11-137-39/+39
| | | | | | | 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.
* armv4_5_common_t -> struct armZachary T Welch2009-11-1311-47/+47
| | | | Remove misleading typedef and just use struct arm.
* etm_context_t -> struct etm_contextZachary T Welch2009-11-138-47/+47
| | | | Remove misleading typedef and redundant suffix from struct etm_context.
* etb_t -> struct etbZachary T Welch2009-11-133-15/+15
| | | | Remove misleading typedef and redundant suffix from struct etb.
* trace_t -> struct traceZachary T Welch2009-11-134-8/+8
| | | | Remove misleading typedef and redundant suffix from struct trace.
* image_elf_t -> struct image_elfZachary T Welch2009-11-132-7/+7
| | | | Remove misleading typedef and redundant suffix from struct image_elf.
* cortex_m3_dwt_comparator_t -> struct cortex_m3_dwt_comparatorZachary T Welch2009-11-132-8/+8
| | | | Remove misleading typedef and redundant suffix from struct cortex_m3_dwt_comparator.
* cortex_m3_fp_comparator_t -> struct cortex_m3_fp_comparatorZachary T Welch2009-11-132-7/+7
| | | | Remove misleading typedef and redundant suffix from struct cortex_m3_fp_comparator.
* cortex_a8_wrp_t -> struct cortex_a8_wrpZachary T Welch2009-11-132-4/+4
| | | | Remove misleading typedef and redundant suffix from struct cortex_a8_wrp.
* cortex_a8_brp_t -> struct cortex_a8_brpZachary T Welch2009-11-132-6/+6
| | | | Remove misleading typedef and redundant suffix from struct cortex_a8_brp.
* breakpoint_t -> struct breakpointZachary T Welch2009-11-1313-76/+76
| | | | Remove misleading typedef and redundant suffix from struct breakpoint.
* xscale_trace_t -> struct xscale_traceZachary T Welch2009-11-131-3/+3
| | | | Remove misleading typedef and redundant suffix from struct xscale_trace.
* xscale_trace_entry_t -> struct xscale_trace_entryZachary T Welch2009-11-132-4/+4
| | | | Remove misleading typedef and redundant suffix from struct xscale_trace_entry.
* target_event_action_t -> struct target_event_actionZachary T Welch2009-11-132-9/+6
| | | | Remove misleading typedef and redundant suffix from struct target_event_action.
* arm_instruction_t -> struct arm_instructionZachary T Welch2009-11-138-73/+73
| | | | Remove misleading typedef and redundant suffix from struct arm_instruction.
* arm9tdmi_vector_t -> struct arm9tdmi_vectorZachary T Welch2009-11-132-4/+4
| | | | | | Remove misleading typedef and redundant suffix from struct arm9tdmi_vector. Renames enum arm9tdmi_vector as enum arm9tdmi_vector_bit.
* xscale_reg_t -> struct xscale_regZachary T Welch2009-11-132-8/+8
| | | | Remove misleading typedef and redundant suffix from struct xscale_reg.
* xscale_common_t -> struct xscale_commonZachary T Welch2009-11-132-56/+56
| | | | Remove misleading typedef and redundant suffix from struct xscale_common.
* xscale_trace_data_t -> struct xscale_trace_dataZachary T Welch2009-11-132-10/+10
| | | | Remove misleading typedef and redundant suffix from struct xscale_trace_data.
* trace_point_t -> struct trace_pointZachary T Welch2009-11-132-4/+4
| | | | Remove misleading typedef and redundant suffix from struct trace_point.
* debug_msg_receiver_t -> struct debug_msg_receiverZachary T Welch2009-11-133-13/+13
| | | | Remove misleading typedef and redundant suffix from struct debug_msg_receiver.
* target_timer_callback_t -> struct target_timer_callbackZachary T Welch2009-11-132-14/+14
| | | | Remove misleading typedef and redundant suffix from struct target_timer_callback.