summaryrefslogtreecommitdiff
path: root/src/flash
Commit message (Collapse)AuthorAgeFilesLines
* flash/lpc2???.c: remove useless declarationsZachary T Welch2009-11-093-72/+43
| | | | | | | | 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>
* flash/*nand*.c: remove useless declarationsZachary T Welch2009-11-096-167/+132
| | | | | | | | 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>
* flash/flash.c: remove forward declarationsZachary T Welch2009-11-091-57/+62
| | | | | | | | 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>
* src/flash: remove 'extern' and wrap headersZachary T Welch2009-11-097-45/+69
| | | | | | | 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.
* Overhaul time support APIZachary T Welch2009-11-093-135/+88
| | | | | | | | | | | | | | | | | | | 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.
* Simplify nand indentation.Zachary T Welch2009-11-061-314/+287
| | | | | Removes check covered by new nand_command_get_device_by_num helper. Reverses logic of probe check to further reduce indentation.
* Improve flash indentation.Zachary T Welch2009-11-061-221/+210
| | | | | Removes redundant tests and reverses backwards logic to reduce the indentation level in flash.c.
* Improve str9xpec command argument parsing.Zachary T Welch2009-11-051-80/+44
|
* Improve str9x config command argument parsing.Zachary T Welch2009-11-051-11/+14
|
* Improve str7x config command argument parsing.Zachary T Welch2009-11-051-12/+9
|
* Improve stm32x.c command argument parsing.Zachary T Welch2009-11-051-35/+20
|
* Improve stellaris.c erase argument parsing.Zachary T Welch2009-11-051-7/+4
|
* Improve pic32mx.c command argument parsing.Zachary T Welch2009-11-051-30/+19
|
* Improve mflash.c command argument parsing.Zachary T Welch2009-11-051-6/+9
|
* Improve lpc3180_nand_controller.c parsing.Zachary T Welch2009-11-051-10/+15
| | | | | This fixes a memory leak in lpc3180_nand_device_command by reordering the malloc to occur after all parsing has completed.
* Improve lpc2900.c command argument parsing.Zachary T Welch2009-11-051-53/+36
|
* Improve lpc288x.c command argument parsing.Zachary T Welch2009-11-051-1/+1
|
* Improve lpc2000.c command argument parsing.Zachary T Welch2009-11-051-8/+5
|
* Improve cfi.c command argument parsing.Zachary T Welch2009-11-051-2/+6
|
* Improve avrf.c command argument parsing.Zachary T Welch2009-11-051-7/+4
|
* Improve orion_nand.c command argument parsing.Zachary T Welch2009-11-051-1/+1
|
* Improve davinci_nand.c command argument parsing.Zachary T Welch2009-11-051-5/+4
|
* Improve at91sam7.c command argument parsing.Zachary T Welch2009-11-051-20/+24
|
* Improve at91sam3.c command argument parsing.Zachary T Welch2009-11-051-11/+6
|
* Improve nand.c command argument parsing.Zachary T Welch2009-11-051-72/+53
|
* Improve flash.c command argument parsing.Zachary T Welch2009-11-051-68/+51
|
* Add Flash/NAND bank command argument helpers.Zachary T Welch2009-11-054-0/+45
| | | | | | | | This eliminates redundant code for parsing and retreiving the bank specified from a script command argument. This patch was written to replace existing functionality; however, the parsing logic can be updated later to allow flash commands to accept bank names as well as their numbers.
* Added the faux flash driver and target. Used for testing.Øyvind Harboe2009-10-204-1/+157
|
* Added 'unlock' option to flash write_imageØyvind Harboe2009-10-201-14/+59
|
* another portability updateDavid Brownell2009-10-141-4/+4
| | | | | | Just use "%p" instead of consing up some integral type for pointer printf. Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
* S29WS-N CFI query fix is to try 0x555 if 0x55 fails.Øyvind Harboe2009-10-141-24/+53
|
* Cleanup: nuke trailling whitespacesYauheni Kaliuta2009-10-131-1/+1
| | | | Signed-off-by: Yauheni Kaliuta <y.kaliuta@gmail.com>
* printf format warning fixesDavid Brownell2009-10-103-20/+23
| | | | | | Observed on a Cygwin build. Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
* Nico Coesel <ncoesel@dealogic.nl> fix warnings. . I'm wondering why theseoharboe2009-09-231-1/+1
| | | | | | | didn't turn up earlier. Is everyone still using gcc 3.x? Or is the x86 version of gcc 4.x much more relaxed? git-svn-id: svn://svn.berlios.de/openocd/trunk@2749 b42882b7-edfa-0310-969c-e2dbd0fdcd60
* - fix build issue under win32 (cygwin/msys) from svn r2746ntfreak2009-09-221-1/+1
| | | | git-svn-id: svn://svn.berlios.de/openocd/trunk@2748 b42882b7-edfa-0310-969c-e2dbd0fdcd60
* - add missing svn props from previous commitntfreak2009-09-222-1953/+1953
| | | | git-svn-id: svn://svn.berlios.de/openocd/trunk@2747 b42882b7-edfa-0310-969c-e2dbd0fdcd60
* Make it easier to erase or protect through to the enddbrownell2009-09-221-36/+75
| | | | | | | | | | | | of a (NOR) flash chip: allow passing "last" as an alias for the number of the last sector. Improve several aspects of error checking while we're at it. From: Johnny Halfmoon <jhalfmoon@milksnot.com> git-svn-id: svn://svn.berlios.de/openocd/trunk@2746 b42882b7-edfa-0310-969c-e2dbd0fdcd60
* Remove annoying end-of-line whitespace from most src/*dbrownell2009-09-213-77/+77
| | | | | | | files; omitted src/httpd git-svn-id: svn://svn.berlios.de/openocd/trunk@2742 b42882b7-edfa-0310-969c-e2dbd0fdcd60
* Enhancement: stm32 flash protection error messagedbrownell2009-09-201-1/+1
| | | | | | | | | | This patch modifies an error message which, in its original state, I find somewhat unhelpful. So a small hint was added. Signed-off-by: Johnny Halfmoon <jhalfmoon at milksnot.com> git-svn-id: svn://svn.berlios.de/openocd/trunk@2738 b42882b7-edfa-0310-969c-e2dbd0fdcd60
* Minor fixes to NAND code and docsdbrownell2009-09-171-25/+43
| | | | | | | | | | | | | | | | | | | | | | | | | | | Erase logic: - command invocation + treat "nand erase N" (no offset/length) as "erase whole chip N" + catch a few more bogus parameter cases, like length == 0 (sigh) - nand_erase() should be static - on error + say which block failed, and if it was a bad block + don't give up after the first error; try to erase the rest - on success, say which nand device was erased (name isn't unique) Device list ("nand list"): - say how many blocks there are - split summary into two lines - give example in the docs Doc tweaks: - Use @option{...} for DaVinci's supported hardware ECC options For the record, I've observed that _sometimes_ erasing bad blocks causes failure reports, and that manufacturer bad block markers aren't always erasable (even when erasing their blocks doesn't trigger an error report). git-svn-id: svn://svn.berlios.de/openocd/trunk@2724 b42882b7-edfa-0310-969c-e2dbd0fdcd60
* Rolf Meeser <rolfm_9dq@yahoo.de> adds flash support for NXP's LPC2900 family ↵oharboe2009-09-164-4/+1961
| | | | | | (ARM968E). git-svn-id: svn://svn.berlios.de/openocd/trunk@2715 b42882b7-edfa-0310-969c-e2dbd0fdcd60
* fix email addressoharboe2009-09-141-1/+1
| | | | git-svn-id: svn://svn.berlios.de/openocd/trunk@2706 b42882b7-edfa-0310-969c-e2dbd0fdcd60
* Rolf Meeser <rolfm_9dq@yahoo.de> warning fix in previous commit was wrong. ↵oharboe2009-09-141-36/+38
| | | | | | target_code_size needs the real value later. git-svn-id: svn://svn.berlios.de/openocd/trunk@2705 b42882b7-edfa-0310-969c-e2dbd0fdcd60
* fix warningoharboe2009-09-141-1/+1
| | | | git-svn-id: svn://svn.berlios.de/openocd/trunk@2704 b42882b7-edfa-0310-969c-e2dbd0fdcd60
* tap post reset event added. Allows omap3530 to send 100 runtest idle ↵oharboe2009-09-111-1/+2
| | | | | | tickle's after a TAP_RESET. git-svn-id: svn://svn.berlios.de/openocd/trunk@2696 b42882b7-edfa-0310-969c-e2dbd0fdcd60
* Alexei Babich <a.babich@rez.ru> cleanupoharboe2009-09-112-7/+28
| | | | git-svn-id: svn://svn.berlios.de/openocd/trunk@2688 b42882b7-edfa-0310-969c-e2dbd0fdcd60
* Alexei Babich <a.babich@rez.ru> imx31 nand flash controller supportoharboe2009-09-104-2/+1004
| | | | git-svn-id: svn://svn.berlios.de/openocd/trunk@2685 b42882b7-edfa-0310-969c-e2dbd0fdcd60
* Rolf Meeser <rolfm_9dq@yahoo.de> oharboe2009-09-092-6/+44
| | | | | | | This patch adds target algorithm support for those flash devices that do not support DQ5 polling. So far they could only be programmed with host algorithm, but this was way too slow. git-svn-id: svn://svn.berlios.de/openocd/trunk@2682 b42882b7-edfa-0310-969c-e2dbd0fdcd60
* David Brownell <david-b@pacbell.net> oharboe2009-09-091-4/+7
| | | | | | | | | | | | | | | | | Optionally shave time off the armv4_5 run_algorithm() code: let them terminate using software breakpoints, avoiding roundtrips to manage hardware ones. Enable this by using BKPT to terminate execution instead of "branch to here" loops. Then pass zero as the exit address, except when running on an ARMv4 core. ARM7TDMI, ARM9TDMI, and derived cores now set a flag saying they're ARMv4. Use that mechanism in arm_nandwrite(), for about 3% speedup on a DaVinci ARM926 core; not huge, but it helps. Some other algorithms could use this too (mostly flavors of flash operation). git-svn-id: svn://svn.berlios.de/openocd/trunk@2680 b42882b7-edfa-0310-969c-e2dbd0fdcd60
* David Brownelloharboe2009-09-036-74/+191
| | | | | | | | | | | | | | | | Abstract the orion_nand_fast_block_write() routine into a separate routine -- arm_nandwrite() -- so that other ARM cores can reuse it. Have davinci_nand do so. This faster than byte-at-a-time ops by a factor of three (!), even given the slowish interactions to support hardware ECC (1-bit flavor in that test) each 512 bytes; those could be read more efficiently by on-chip code. NOTE that until there's a generic "ARM algorithm" structure, this can't work on newer ARMv6 (like ARM1136) or ARMv7A (like Cortex-A8) cores, though the downloaded code itself would work just fine there. git-svn-id: svn://svn.berlios.de/openocd/trunk@2663 b42882b7-edfa-0310-969c-e2dbd0fdcd60