aboutsummaryrefslogtreecommitdiff
path: root/src/target
AgeCommit message (Collapse)Author
2009-11-09finish removing deprecated/obsolete commandsDavid Brownell
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-09src/target: remove 'extern' and wrap headersZachary T Welch
Remove extern keywords from function prototypes and wrap long lines.
2009-11-09target.h: remove extern keyword and wrapZachary T Welch
Removes 'extern' keyword from function prototypes and wraps long lines.
2009-11-09EmbeddedICE: minor cleanupsDavid Brownell
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-09Overhaul time support APIZachary T Welch
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-08Add private header for ARM11 internals.Zachary T Welch
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-08ARM11: remove exports and forward declsZachary T Welch
Unneeded exports cause confusion about the module interfaces. Make almost everything static in the arm11.c module.
2009-11-08ARM: minor simulator cleanupDavid Brownell
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-08Cortex-M3: fix (debug) message priorityDavid Brownell
Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
2009-11-06Merge branch 'master' of ↵David Brownell
ssh://dbrownell@openocd.git.sourceforge.net/gitroot/openocd/openocd
2009-11-06target: don't swap MMU/no-MMU work areasDavid Brownell
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-06Fix arm11 vcr command parsing.Zachary T Welch
2009-11-05ARM: shrink offsetsDavid Brownell
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-05ARM: other code uses the new inheritance/nesting schemeDavid Brownell
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-05Cortex-A8: use the new inheritance/nesting schemeDavid Brownell
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-05ARM7TDMI uses the new inheritance/nesting schemeDavid Brownell
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-05ARM720 uses the new inheritance/nesting schemeDavid Brownell
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-05XScale uses the new inheritance/nesting schemeDavid Brownell
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-05ARM9TDMI uses the new inheritance/nesting schemeDavid Brownell
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-05ARM966 uses the new inheritance/nesting schemeDavid Brownell
Use target_to_arm966(), replacing needless pointer traversals. Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
2009-11-05ARM926 uses the new inheritance/nesting schemeDavid Brownell
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-05FA526 uses the new inheritance/nesting schemeDavid Brownell
Replace needless pointer traversals, simplify. Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
2009-11-05ARM920 uses the new inheritance/nesting schemeDavid Brownell
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-05Cortex-M3: use the new inheritance/nesting schemeDavid Brownell
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-05target: provide container_of()David Brownell
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-05ARM7TDMI: remove forward declsDavid Brownell
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-05ARM720: remove exports and forward declsDavid Brownell
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-05FA526: remove exports and forward declsDavid Brownell
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-05ARM9TDMI: remove forward declsDavid Brownell
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-05ARM966: remove exports and forward declsDavid Brownell
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-05ARM926: more cleanupDavid Brownell
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-05ARM920: remove exports and forward declsDavid Brownell
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-05Improve ETM tracemode update command.Zachary T Welch
2009-11-05Improve etm command argument parsing.Zachary T Welch
2009-11-05Improve trace command argument parsing.Zachary T Welch
2009-11-05Improve arm_adi_v5 command argument parsing.Zachary T Welch
2009-11-05Improve cortex_m3 command argument parsing.Zachary T Welch
2009-11-05Improve xscale command argument parsing.Zachary T Welch
2009-11-05Improve arm11 command argument parsing.Zachary T Welch
2009-11-05Improve arm966e command argument parsing.Zachary T Welch
2009-11-05Improve arm926ejs command argument parsing.Zachary T Welch
2009-11-05Improve arm920t command argument parsing.Zachary T Welch
2009-11-05Improve arm720t command argument parsing.Zachary T Welch
2009-11-05Improve arm7_9_common command argument parsing.Zachary T Welch
2009-11-05Improve armv7m command argument parsing.Zachary T Welch
2009-11-05Improve armv7a command argument parsing.Zachary T Welch
2009-11-05Improve armv4_5 command argument parsing.Zachary T Welch
2009-11-05Improve xscale command argument parsing.Zachary T Welch
2009-11-05Improve target.c command argument parsing.Zachary T Welch
Passes cmd_ctx into parse_load_image_command_args for reporting the parsing errors therein.
2009-11-05arm920t: add mrcmcr interface fn's.Øyvind Harboe
The arm920t has a concept of read modify write cycles that may have to be represented in the mrcmcr interface eventually. Signed-off-by: Øyvind Harboe <oyvind.harboe@zylin.com>