summaryrefslogtreecommitdiff
path: root/src/flash
Commit message (Collapse)AuthorAgeFilesLines
...
* nand: rename device to nandZachary T Welch2009-11-1213-440/+440
| | | | | | | 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.
* remove obsolete doxygen commentsZachary T Welch2009-11-112-49/+1
| | | | Documenting command handler parameters is redundant and pointless.
* remove more useless declarationsZachary T Welch2009-11-112-42/+16
| | | | | Removes forward declarations by moving command registration after defintion of the command handlers.
* add const keyword to some APIsZachary T Welch2009-11-115-7/+7
| | | | | | 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.
* change argv to args in command handlersZachary T Welch2009-11-112-23/+23
| | | | | | | | | | | 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.
* makefiles: improve build orderZachary T Welch2009-11-111-34/+47
| | | | | | | | | | | 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.
* {pic32m,stm32}x.c: remove useless declarationsZachary T Welch2009-11-092-98/+73
| | | | | | | | 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>
* str{7,9}x*.c: remove useless forward declarationsZachary T Welch2009-11-093-141/+108
| | | | | | | | 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/<various>.c: remove useless declarationsZachary T Welch2009-11-093-75/+42
| | | | | | | Remove useless forward declarations. Moves flash structure definitions to end of files. Signed-off-by: Zachary T Welch <zw@superlucidity.net>
* flash/<assorted>.c: remove useless declarationsZachary T Welch2009-11-095-170/+103
| | | | | | | | 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/at91sam[37].c: remove useless declarationsZachary T Welch2009-11-092-53/+44
| | | | | | | | | | 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>
* 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