summaryrefslogtreecommitdiff
path: root/src/target/xscale.c
Commit message (Collapse)AuthorAgeFilesLines
* watchpoint_t -> struct watchpointZachary T Welch2009-11-131-6/+6
| | | | Remove misleading typedef and redundant suffix from struct watchpoint.
* scan_field_t -> struct scan_fieldZachary T Welch2009-11-131-8/+8
| | | | Remove useless structure typedef.
* jtag_tap_t -> struct jtag_tapZachary T Welch2009-11-131-2/+2
| | | | | Search and destroy the jtag_tap_t typedef. This also cleans up a layering violation, removing the declaration from types.h.
* fileio_t -> struct fileioZachary T Welch2009-11-131-1/+1
| | | | Remove useless structure typedef.
* add CMD_NAME macro for command handlersZachary T Welch2009-11-131-7/+7
| | | | | By introducing the CMD_NAME macro, this parameter may be integrated as args[-1] in command.[ch], without touching any other call sites.
* use COMMAND_HANDLER macro to define all commandsZachary T Welch2009-11-131-30/+12
|
* XScale uses the new inheritance/nesting schemeDavid Brownell2009-11-051-187/+118
| | | | | | | Use target_to_xscale(), replacing needless pointer traversals and simplifying a bunch of code. Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
* Improve xscale command argument parsing.Zachary T Welch2009-11-051-2/+2
|
* Improve xscale command argument parsing.Zachary T Welch2009-11-051-12/+12
|
* target: remove unused interface fn that clutters codeØyvind Harboe2009-11-051-7/+0
| | | | | | | | | The quit entry point was not being invoked. Just a source of confusion at this point. XScale ran 100x reset upon quit, but that code made no sense, wasn't commented and never invoke. Signed-off-by: Øyvind Harboe <oyvind.harboe@zylin.com>
* xscale: always reload handler after resetDavid Brownell2009-10-251-17/+11
| | | | | | | | | | | | | | | | | | | | Remove needless debug handler state. - "handler_installed" became wrong as soon as the second TRST+SRST reset was issued ... so the handler was never reloaded after the reset removed it from the mini-icache. This fixes the bug where subsequent resets fail on PXA255 (if the first one even worked, which is uncommon). Other XScale chips would have problems too; PXA270 seems to have, IXP425 maybe not. - "handler_running" was never tested; it's pointless. Plus a related bugfix: invalidate OpenOCD's ARM register cache on reset. It was no more valid than the XScale's mini-icache. (Though ... such invalidations might be better done in "SRST asserted" callbacks.) Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
* xscale: better fix for debug_handler.binDavid Brownell2009-10-161-2/+13
| | | | | | | | | | | | | Generate a C struct with the data, and use that, instead of an assembly language file. The assembly language causes issues on Darwin and MS-Windows, which don't necessarily use GNU AS; or if they do, don't necessarily use its ELF syntax. It's also better in two other ways: fewer global symbols; and the init-time size check gets optimized away at compile time. (Unless it fails, in which case bigger chunks of the file vanish.) Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
* xscale: stackframe corruption bugfixDavid Brownell2009-10-131-36/+18
| | | | | | | | | | | Resolve a "FIX" comment; yes that was superfluous given that the JTAG core does that check by default. It was also buggy since it wrote to a stack frame that went away before the write happened!! Other fixes: remove pointless malloc(); zero-init scan_field_t values wherever they appear; whitespace scrub; spelling fix. Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
* simplify XScale debug handler installationDavid Brownell2009-10-121-41/+38
| | | | | | | | | | | | | | | | | | | Load the XScale debug handler from the read-only data section instead of from a separate file that can get lost or garbaged. This eliminates installation and versioning issues, and also speeds up reset handling a bit. Plus some minor bits of cleanup related to loading that handler: comments about just what this handler does, and check fault codes while writing it into the mini-icache. The only behavioral changes should be cleaner failure modes after errors during handler loading, and being a bit faster. NOTE: presumes GNU assembly syntax, with ".incbin"; and ELF, because of the syntax of the ".size" directive. Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
* more xscale cleanup (mostly removing JTAG hooks)David Brownell2009-10-121-71/+58
| | | | | | | | | | | | | | | | Streamline/shrink some needless JTAG stuff: - Use #defines for the JTAG instructions; they can't ever change - Remove an unused (!) shadow of tap->ir_length - Stop using a copy of target->tap - Don't bother saving the variant after sanity checking ir_length Also, make target_create() work as on other targets: build the register cache later, making init_target() no longer be a NOP. Handle malloc failure; remove a comment that was obsoleted by the not-so-new target syntax. Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
* xscale_load_ic cleanupDavid Brownell2009-10-111-16/+16
| | | | | | | | Remove unused and deprecated (in the arch spec) mode for loading code into the *main* icache (vs the "mini" icache). Disable some extremely noisy (and rarely useful) low-level debug messages Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
* xscale.c cleanupDavid Brownell2009-10-111-186/+197
| | | | | | | | | Declare almost everything as static. Move stuff to remove most forward references. Remove most forward declarations. Warn if the unimplemented register functions get called. Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
* xscale bugfix to handler loadingDavid Brownell2009-10-111-2/+2
| | | | | | | | | Just fill out the rest of the cache line with NOPs; don't change the record of how much data we consumed. Otherwise the count of how much data is left can roll over from positive to negative ("VERY positive") and skip the loop termination of zero. Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
* xscale minor cleanupDavid Brownell2009-10-111-43/+31
| | | | | | | | | | | | Add a header comment referencing useful XScale specs. Make most data static, and the tables readonly. Scrub extra blank lines. Return fault codes from one routine. Remove a needless NOP methood. (BUGFIX) When we update R0, mark R0 as dirty/valid ... not R15/PC! Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
* - fix build warningsntfreak2009-08-251-2/+2
| | | | | | - add svn props to recently added files armv7a.[ch] git-svn-id: svn://svn.berlios.de/openocd/trunk@2618 b42882b7-edfa-0310-969c-e2dbd0fdcd60
* Michael Schwingen <rincewind@discworld.dascon.de> The attached patch adds a ↵oharboe2009-08-251-0/+63
| | | | | | | | | "xscale vector_table" command that allows to set the values that are written in the mini-IC (plus documentation updates that describe why this is needed). git-svn-id: svn://svn.berlios.de/openocd/trunk@2613 b42882b7-edfa-0310-969c-e2dbd0fdcd60
* Andreas Fritiofson <andreas.fritiofson@gmail.com> UTF8 fixesoharboe2009-07-171-1/+1
| | | | git-svn-id: svn://svn.berlios.de/openocd/trunk@2549 b42882b7-edfa-0310-969c-e2dbd0fdcd60
* Refactor code, create target_state_name()duane2009-06-281-2/+2
| | | | git-svn-id: svn://svn.berlios.de/openocd/trunk@2409 b42882b7-edfa-0310-969c-e2dbd0fdcd60
* Remove whitespace that occurs before ')'.zwelch2009-06-231-3/+3
| | | | | | | - Replace '[ \t]*[)]' with ')'. git-svn-id: svn://svn.berlios.de/openocd/trunk@2377 b42882b7-edfa-0310-969c-e2dbd0fdcd60
* Remove whitespace that occurs after '('.zwelch2009-06-231-3/+3
| | | | | | | - Replace '([ \t]*' with '('. git-svn-id: svn://svn.berlios.de/openocd/trunk@2376 b42882b7-edfa-0310-969c-e2dbd0fdcd60
* - Fixes '[|]' whitespacezwelch2009-06-231-1/+1
| | | | | | | | | | - Replace ')\([|]\)(' with ') \1 ('. - Replace ')\([|]\)\(\w\)' with ') \1 \2'. - Replace '\(\w\)\([|]\)(' with '\1 \2 ('. - Replace '\(\w\)\([|]\)\(\w\)' with '\1 \2 \3'. git-svn-id: svn://svn.berlios.de/openocd/trunk@2374 b42882b7-edfa-0310-969c-e2dbd0fdcd60
* - Fixes '+' whitespacezwelch2009-06-231-12/+12
| | | | | | | | | | - Replace ')\(+\)(' with ') \1 ('. - Replace ')\(+\)\(\w\)' with ') \1 \2'. - Replace '\(\w\)\(+\)(' with '\1 \2 ('. - Replace '\(\w\)\(+\)\(\w\)' with '\1 \2 \3'. git-svn-id: svn://svn.berlios.de/openocd/trunk@2373 b42882b7-edfa-0310-969c-e2dbd0fdcd60
* - Fixes '=' whitespacezwelch2009-06-231-39/+39
| | | | | | | | | - Replace ')\(=\)\(\w\)' with ') \1 \2'. - Replace '\(\w\)\(=\)(' with '\1 \2 ('. - Replace '\(\w\)\(=\)\(\w\)' with '\1 \2 \3'. git-svn-id: svn://svn.berlios.de/openocd/trunk@2372 b42882b7-edfa-0310-969c-e2dbd0fdcd60
* - Fixes '==' whitespacezwelch2009-06-231-3/+3
| | | | | | | | - Replace ')\(==\)\(\w\)' with ') \1 \2'. - Replace '\(\w\)\(==\)\(\w\)' with '\1 \2 \3'. git-svn-id: svn://svn.berlios.de/openocd/trunk@2371 b42882b7-edfa-0310-969c-e2dbd0fdcd60
* - Fixes '>=' whitespacezwelch2009-06-231-2/+2
| | | | | | | | - Replace ')\(>=\)\(\w\)' with ') \1 \2'. - Replace '\(\w\)\(>=\)\(\w\)' with '\1 \2 \3'. git-svn-id: svn://svn.berlios.de/openocd/trunk@2367 b42882b7-edfa-0310-969c-e2dbd0fdcd60
* - Fixes '!=' whitespacezwelch2009-06-231-33/+33
| | | | | | | | | - Replace ')\(!=\)\(\w\)' with ') \1 \2'. - Replace '\(\w\)\(!=\)(' with '\1 \2 ('. - Replace '\(\w\)\(!=\)\(\w\)' with '\1 \2 \3'. git-svn-id: svn://svn.berlios.de/openocd/trunk@2363 b42882b7-edfa-0310-969c-e2dbd0fdcd60
* - Replace 'for(' with 'for ('.zwelch2009-06-231-2/+2
| | | | git-svn-id: svn://svn.berlios.de/openocd/trunk@2360 b42882b7-edfa-0310-969c-e2dbd0fdcd60
* - Replace 'switch(' with 'switch ('.zwelch2009-06-231-1/+1
| | | | git-svn-id: svn://svn.berlios.de/openocd/trunk@2359 b42882b7-edfa-0310-969c-e2dbd0fdcd60
* - Replace 'if(' with 'if ('.zwelch2009-06-231-9/+9
| | | | git-svn-id: svn://svn.berlios.de/openocd/trunk@2357 b42882b7-edfa-0310-969c-e2dbd0fdcd60
* C99 printf() -Werror fixesduane2009-06-211-22/+22
| | | | git-svn-id: svn://svn.berlios.de/openocd/trunk@2328 b42882b7-edfa-0310-969c-e2dbd0fdcd60
* fix jtag_add_callback() args. The first argument is nothing special, it's ↵oharboe2009-06-191-2/+3
| | | | | | just another generic argument. git-svn-id: svn://svn.berlios.de/openocd/trunk@2290 b42882b7-edfa-0310-969c-e2dbd0fdcd60
* Transform 'u32' to 'uint32_t' in src/targetzwelch2009-06-181-74/+74
| | | | | | | | - Replace '\([^_]\)u32' with '\1uint32_t'. - Replace '^u32' with 'uint32_t'. git-svn-id: svn://svn.berlios.de/openocd/trunk@2279 b42882b7-edfa-0310-969c-e2dbd0fdcd60
* Transform 'u8' to 'uint8_t' in src/targetzwelch2009-06-181-58/+58
| | | | | | | | - Replace '\([^_]\)u8' with '\1uint8_t'. - Replace '^u8' with 'uint8_t'. git-svn-id: svn://svn.berlios.de/openocd/trunk@2274 b42882b7-edfa-0310-969c-e2dbd0fdcd60
* Rename jtag_add_end_state to jtag_set_end_state since "add" implies thatoharboe2009-06-041-17/+17
| | | | | | this fn has something to do with the queue, which it does not as such. git-svn-id: svn://svn.berlios.de/openocd/trunk@2050 b42882b7-edfa-0310-969c-e2dbd0fdcd60
* Introduce jtag_get_end_state() fn to clarify code a bit.oharboe2009-06-041-8/+8
| | | | git-svn-id: svn://svn.berlios.de/openocd/trunk@2049 b42882b7-edfa-0310-969c-e2dbd0fdcd60
* no longer use jtag_add_xxx() to set end state to TAP_IDLE. Same must be done ↵oharboe2009-06-041-7/+7
| | | | | | for TAP_DRPAUSE git-svn-id: svn://svn.berlios.de/openocd/trunk@2044 b42882b7-edfa-0310-969c-e2dbd0fdcd60
* remove TAP_INVALID as argument to jtag_add_xxx() fn'soharboe2009-06-041-8/+8
| | | | git-svn-id: svn://svn.berlios.de/openocd/trunk@2042 b42882b7-edfa-0310-969c-e2dbd0fdcd60
* Final step in isolating target_type_s structure:zwelch2009-05-311-1/+1
| | | | | | | | | - Move definition of 'struct target_type_s' into new 'target_type.h' file. - Forward delclaration remains in target.h, with comment pointing to new file. - Replaces #define with #include in source files. git-svn-id: svn://svn.berlios.de/openocd/trunk@1971 b42882b7-edfa-0310-969c-e2dbd0fdcd60
* First step in hiding target_type_s from public interface:zwelch2009-05-311-0/+1
| | | | | | | | - Add DEFINE_TARGET_TYPE_S symbol in files that need it defined. - Forward declare 'struct target_type_s' only, unless that symbol is defined. git-svn-id: svn://svn.berlios.de/openocd/trunk@1969 b42882b7-edfa-0310-969c-e2dbd0fdcd60
* Add target_write_memory wrapper:zwelch2009-05-311-2/+2
| | | | | | | | - replaces all calls to target->type->write_memory. - add documentation in target_s to warn not to invoke callback directly. git-svn-id: svn://svn.berlios.de/openocd/trunk@1960 b42882b7-edfa-0310-969c-e2dbd0fdcd60
* Add target_read_memory wrapper:zwelch2009-05-311-2/+2
| | | | | | | | - replaces all calls to target->type->read_memory. - add documentation in target_s to warn not to invoke callback directly. git-svn-id: svn://svn.berlios.de/openocd/trunk@1959 b42882b7-edfa-0310-969c-e2dbd0fdcd60
* Consolidate target selection code into single get_target() that handles both ↵kc8apf2009-05-181-4/+5
| | | | | | names and numbers. Provided by David Brownell <david-b@pacbell.net> git-svn-id: svn://svn.berlios.de/openocd/trunk@1804 b42882b7-edfa-0310-969c-e2dbd0fdcd60
* USB performance regression fixoharboe2009-05-111-9/+11
| | | | git-svn-id: svn://svn.berlios.de/openocd/trunk@1742 b42882b7-edfa-0310-969c-e2dbd0fdcd60
* switch to jtag_add_callback() - USB performance fixoharboe2009-05-111-14/+20
| | | | git-svn-id: svn://svn.berlios.de/openocd/trunk@1733 b42882b7-edfa-0310-969c-e2dbd0fdcd60
* Audit and eliminate redundant #include directives in other target files.zwelch2009-05-111-18/+1
| | | | git-svn-id: svn://svn.berlios.de/openocd/trunk@1715 b42882b7-edfa-0310-969c-e2dbd0fdcd60