aboutsummaryrefslogtreecommitdiff
path: root/src/flash/nor/str7x.c
AgeCommit message (Collapse)Author
2014-03-17flash: Constify write bufferAndreas Fritiofson
Change-Id: Ic812098d3ed5a2992c26bb57d08ae350e2c5d5d8 Signed-off-by: Andreas Fritiofson <andreas.fritiofson@gmail.com> Reviewed-on: http://openocd.zylin.com/2040 Tested-by: jenkins Reviewed-by: Spencer Oliver <spen@spen-soft.co.uk>
2014-02-06flash: declare fixed arrays constSpencer Oliver
Change-Id: Id06b8b53ec59a7b3182f60f51dde5b16563aaeef Signed-off-by: Spencer Oliver <spen@spen-soft.co.uk> Reviewed-on: http://openocd.zylin.com/1887 Tested-by: jenkins
2013-10-31str7x: Fix byte order bugAndreas Fritiofson
Found by grepping for pointer casts. Change-Id: I56d5680590e37d8c61197488067fbb0776e5e0f0 Signed-off-by: Andreas Fritiofson <andreas.fritiofson@gmail.com> Reviewed-on: http://openocd.zylin.com/1774 Tested-by: jenkins Reviewed-by: Spencer Oliver <spen@spen-soft.co.uk>
2013-10-08str7x: Improve info textAndreas Fritiofson
There's no way to print two lines, so let it wrap. Change-Id: I1f6211358a58877c0b729d9fdefd5d3dea8cba00 Signed-off-by: Andreas Fritiofson <andreas.fritiofson@gmail.com> Reviewed-on: http://openocd.zylin.com/1643 Tested-by: jenkins Reviewed-by: Spencer Oliver <spen@spen-soft.co.uk>
2013-10-03flash/nor: Make info function optionalAndreas Fritiofson
Remove lots of no-op or dummy info function implementations and check if it's implemented before invoking it. Change-Id: I2144dad6a84a80359bb13a8a29a4614387e4c135 Signed-off-by: Andreas Fritiofson <andreas.fritiofson@gmail.com> Reviewed-on: http://openocd.zylin.com/1642 Tested-by: jenkins Reviewed-by: Spencer Oliver <spen@spen-soft.co.uk>
2013-06-05update files to correct FSF addressSpencer Oliver
Change-Id: I429f7fd51f77b0e7c86d7a7f110ca31afd76c173 Signed-off-by: Spencer Oliver <spen@spen-soft.co.uk> Reviewed-on: http://openocd.zylin.com/1426 Tested-by: jenkins Reviewed-by: Paul Fertser <fercerpav@gmail.com>
2012-10-08flash/nor: make all working area pointers localAndreas Fritiofson
Working area pointers shouldn't be re-used, so there's no point in storing them in the flash bank struct. Make all such pointers local. Change-Id: Iab65b4e8b475fed7fc72fb8928f54590fa69d260 Signed-off-by: Andreas Fritiofson <andreas.fritiofson@gmail.com> Reviewed-on: http://openocd.zylin.com/865 Tested-by: jenkins Reviewed-by: Freddie Chopin <freddie.chopin@gmail.com> Reviewed-by: Spencer Oliver <spen@spen-soft.co.uk>
2012-05-14build: use generic name for arm_algorithm varsSpencer Oliver
This makes the code a bit easier to read as arm_algorithm can refer to other arch's, not just armv4_5. Change-Id: I78c99d40f34cda04e06f2daee75b48ff40a1d23d Signed-off-by: Spencer Oliver <spen@spen-soft.co.uk> Reviewed-on: http://openocd.zylin.com/613 Tested-by: jenkins Reviewed-by: Aurelien Jacobs <aurel@gnuage.org> Reviewed-by: Freddie Chopin <freddie.chopin@gmail.com>
2012-02-06build: cleanup src/flash/nor directorySpencer Oliver
Change-Id: Ic299de969ce566282c055ba4dd8b94892c4c4311 Signed-off-by: Spencer Oliver <spen@spen-soft.co.uk> Reviewed-on: http://openocd.zylin.com/420 Tested-by: jenkins
2012-01-12cmd: add missing usage varSpencer Oliver
Change-Id: I0f05d643b0801b19cc3beb88f0d12d7e4c83ef9c Signed-off-by: Spencer Oliver <spen@spen-soft.co.uk> Reviewed-on: http://openocd.zylin.com/356 Tested-by: jenkins
2012-01-12optimize: replace while loop by memcpyMathias K
There is no need to use a while loop here. This patch simple copy the last bytes with the system function. Change-Id: Ibda72dca449746efeba5a1af2e45c5990f9cf347 Signed-off-by: Mathias K <kesmtp@freenet.de> Reviewed-on: http://openocd.zylin.com/364 Tested-by: jenkins Reviewed-by: Øyvind Harboe <oyvindharboe@gmail.com> Reviewed-by: Spencer Oliver <spen@spen-soft.co.uk>
2012-01-12build: remove unused variablesSpencer Oliver
detected by clang. Change-Id: Id9effcc5437870f37fecd33803f7753c6eca53d6 Signed-off-by: Spencer Oliver <spen@spen-soft.co.uk> Reviewed-on: http://openocd.zylin.com/361 Tested-by: jenkins Reviewed-by: Øyvind Harboe <oyvindharboe@gmail.com> Reviewed-by: Mathias Küster <kesmtp@freenet.de>
2012-01-04Change return value on error.Mathias K
On wrong parameters a error is signalized to the calling function. Change-Id: I484443fdb39938e20382edc9246d5ec546a5c960 Signed-off-by: Mathias K <kesmtp@freenet.de> Signed-off-by: Øyvind Harboe <oyvind.harboe@zylin.com> Reviewed-on: http://openocd.zylin.com/282 Tested-by: jenkins Reviewed-by: Øyvind Harboe <oyvindharboe@gmail.com>
2011-11-07str7x: fix error propagationØyvind Harboe
stick to convention of "retval" being used as error value to be propagated and use "flash_flags" local variable for flash flags read from how. Change-Id: I63f1f2248b4f4538d6cd7634ae277f7c0aadc346 Signed-off-by: Øyvind Harboe <oyvind.harboe@zylin.com> Reviewed-on: http://openocd.zylin.com/178 Tested-by: jenkins Reviewed-by: Spencer Oliver <spen@spen-soft.co.uk>
2011-01-03error handling: the error number is not part of the user interfaceØyvind Harboe
Do not propagate error number to user. This is for internal programming purposes only. Error messages to the user is reported as text via LOG_ERROR(). Signed-off-by: Øyvind Harboe <oyvind.harboe@zylin.com>
2010-11-17FLASH/NOR: Remove useless file str7x.hAntonio Borneo
Signed-off-by: Antonio Borneo <borneo.antonio@gmail.com>
2010-10-28src: add loader src descriptionSpencer Oliver
- add comment where to find the various loaders src files. Signed-off-by: Spencer Oliver <ntfreak@users.sourceforge.net>
2010-06-21nor/str7x: review scope of symbolsAntonio Borneo
Add "static" qualifier to private function. Signed-off-by: Antonio Borneo <borneo.antonio@gmail.com>
2010-06-16str7x: -Wshadow warning fixesØyvind Harboe
Signed-off-by: Øyvind Harboe <oyvind.harboe@zylin.com>
2010-05-16NOR: add read() callback to struct flash_driverAntonio Borneo
Final target is to force bus_width size during CFI flash read. In this first step I need to replace default flash read with flash specific implementation. This patch introduces: - flash_driver_read() layer; - default_flash_read(), backward compatible; - read() callback in struct flash_driver; - proper initialization in every flash_driver instance. Signed-off-by: Antonio Borneo <borneo.antonio@gmail.com>
2010-05-05str7x: improve error handlingØyvind Harboe
clean up error handling a bit. No change in behavior. Signed-off-by: Øyvind Harboe <oyvind.harboe@zylin.com>
2010-05-04str71x: fix previous commitSpencer Oliver
fix build issue with 70226c221f5879bb6126ff3f2ec9ae64c68d80d6 commit Signed-off-by: Spencer Oliver <ntfreak@users.sourceforge.net>
2010-05-04str7x: fix bogus error messagesØyvind Harboe
Remove bogus error messages when trying to allocate a large chunk of target memory and then falling back to a smaller one. Signed-off-by: Øyvind Harboe <oyvind.harboe@zylin.com>
2010-04-10NOR/STR7X: review scope of dataAntonio Borneo
Add "static" qualifier to private data. Signed-off-by: Antonio Borneo <borneo.antonio@gmail.com>
2010-03-10STR7: flash loader cleanupSpencer Oliver
- make algorithm array static const. - increase algorithm buffer size to 32k. Signed-off-by: Spencer Oliver <ntfreak@users.sourceforge.net>
2010-02-02flash/str7x: After reset init the flash is unlockedEdgar Grimberg
The default state of the STR7 flash after a reset init is unlocked. The information in the flash driver now reflects this. The information about the lock status cannot be read from the flash chip, so the user is informed that flash info might not contain accurate information. [dbrownell@users.sourceforge.net: line length shrinkage] Signed-off-by: Edgar Grimberg <edgar.grimberg@zylin.com> Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
2010-01-29NOR: cleanup driver declsDavid Brownell
Fix goofy struct indents. Function names *are* their addresses. Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
2009-12-07ARM: use <target/arm.h> not armv4_5.hDavid Brownell
Move most declarations in <target/armv4_5.h> to <target/arm.h> and update users. What's left in the older file is stuff that I think should be removed ... the old register cache access stuff, which makes it awkward to support microcontroller profile (Cortex-M) cores. The armv4_5_run_algorithm() declaration was moved too, even though it's not yet as generic as it probably ought to be. Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
2009-12-04ARM: rename armv4_5_algorithm as arm_algorithmDavid Brownell
Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
2009-12-04ARM: ARMV4_5_COMMON_MAGIC --> ARM_COMMON_MAGICDavid Brownell
Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
2009-12-04ARM: rename ARMV4_5_MODE_* as ARM_MODE_*David Brownell
Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
2009-12-04ARM: rename ARMV4_5_STATE_* as ARM_STATE_*David Brownell
Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
2009-12-04remove target.h from flash.hZachary T Welch
The flash.h header does not require the target.h header file, but its implementation source files do. Move it to flash/nor/imp.h.
2009-12-03change #include "armv4_5.h" to <target/armv4_5.h>Zachary T Welch
Changes from the flat namespace to heirarchical one. Instead of writing: #include "armv4_5.h" the following form should be used. #include <target/armv4_5.h> The exception is from .c files in the same directory.
2009-12-03change #include "algorithm.h" to <target/algorithm.h>Zachary T Welch
Changes from the flat namespace to heirarchical one. Instead of writing: #include "algorithm.h" the following form should be used. #include <target/algorithm.h> The exception is from .c files in the same directory.
2009-12-03change #include "binarybuffer.h" to <helper/binarybuffer.h>Zachary T Welch
Changes from the flat namespace to heirarchical one. Instead of writing: #include "binarybuffer.h" the following form should be used. #include <helper/binarybuffer.h> The exception is from .c files in the same directory.
2009-12-02move nor drivers to src/flash/norZachary T Welch
Moves NOR flash drivers to 'src/flash/nor/'. Adds 'src/flash/nor/Makefile.am'. Builds 'libocdflashnor.la'.