aboutsummaryrefslogtreecommitdiff
path: root/src/flash/nor/avrf.c
AgeCommit message (Collapse)Author
2019-05-14helper/command: change prototype of command_print/command_print_samelineAntonio Borneo
To prepare for handling TCL return values consistently, all calls to command_print/command_print_sameline should switch to CMD as first parameter. Change prototype of command_print() and command_print_sameline() to pass CMD instead of CMD_CTX. Since the first parameter is currently not used, the change can be done though scripts without manual coding. This patch is created using the command: sed -i PATTERN $(find src/ doc/ -type f) with all the following patters: 's/\(command_print(cmd\)->ctx,/\1,/' 's/\(command_print(CMD\)_CTX,/\1,/' 's/\(command_print(struct command_\)context \*context,/\1invocation *cmd,/' 's/\(command_print_sameline(cmd\)->ctx,/\1,/' 's/\(command_print_sameline(CMD\)_CTX,/\1,/' 's/\(command_print_sameline(struct command_\)context \*context,/\1invocation *cmd,/' This change is inspired by http://openocd.zylin.com/1815 from Paul Fertser but is now done through scripting. Change-Id: I3386d8f96cdc477e7a2308dd18269de3bed04385 Signed-off-by: Antonio Borneo <borneo.antonio@gmail.com> Signed-off-by: Paul Fertser <fercerpav@gmail.com> Reviewed-on: http://openocd.zylin.com/5081 Tested-by: jenkins Reviewed-by: Tomas Vanek <vanekt@fbl.cz>
2019-03-27Constify struct flash_driver instancesChristopher Head
Instances of struct flash_driver are never written to at runtime. For a small amount of memory saving and also robustness (fewer things for stray pointer writes to hit), mark them const. Change-Id: Iadbbbc2fac0976d892699200000c5f02856729f3 Signed-off-by: Christopher Head <chead@zaber.com> Reviewed-on: http://openocd.zylin.com/4803 Reviewed-by: Antonio Borneo <borneo.antonio@gmail.com> Tested-by: jenkins Reviewed-by: Matthias Welwarsky <matthias@welwarsky.de>
2018-11-26flash/nor: consolidate flash protect/protect_checkTomas Vanek
Make flash_driver methods protect() and protect_check() optional. Remove dummy definitions of these methods from the drivers which do not implement protection handling. Some drivers did not define protect method. It raised segfault before this change and now it is handled properly. Lot of drivers returned ERROR_OK from dummy protect() - now flash_driver_protect() returns an error if not handled by the driver. Change-Id: I2d4a0da316bf03c6379791b1b1c6198fbf22e66c Signed-off-by: Tomas Vanek <vanekt@fbl.cz> Reviewed-on: http://openocd.zylin.com/4765 Tested-by: jenkins Reviewed-by: Andreas Bolsch <hyphen0break@gmail.com> Reviewed-by: Christopher Head <chead@zaber.com>
2018-04-04flash/nor: implement flash bank deallocation in drivers with simple allocTomas Vanek
All drivers which simply allocate one driver_priv memory block per each bank now use default_flash_free_driver_priv() Change-Id: I425bf4213c3632f02dbe11ab819c31eda9b2db62 Signed-off-by: Tomas Vanek <vanekt@fbl.cz> Reviewed-on: http://openocd.zylin.com/4417 Tested-by: jenkins Reviewed-by: Liviu Dudau <liviu@dudau.co.uk> Reviewed-by: Matthias Welwarsky <matthias@welwarsky.de>
2017-02-13flash/nor: avrf: support atmega128rfa1Karl Palsson
Tested with a Dresden Elektronik deRFmega128 module. Change-Id: I91da3b11b60e78755360b08453ed368d6d396651 Signed-off-by: Karl Palsson <karlp@tweak.net.au> Reviewed-on: http://openocd.zylin.com/2790 Tested-by: jenkins Reviewed-by: Paul Fertser <fercerpav@gmail.com>
2016-05-24Remove FSF address from GPL noticesMarc Schink
Also make GPL notices consistent according to: https://www.gnu.org/licenses/gpl-howto.html Change-Id: I84c9df40a774958a7ed91460c5d931cfab9f45ba Signed-off-by: Marc Schink <openocd-dev@marcschink.de> Reviewed-on: http://openocd.zylin.com/3488 Tested-by: jenkins Reviewed-by: Andreas Färber <afaerber@suse.de> Reviewed-by: Freddie Chopin <freddie.chopin@gmail.com> Reviewed-by: Andreas Fritiofson <andreas.fritiofson@gmail.com>
2015-03-09atmega: add support for the at90usb128 flashOlivier Esver
Add support for the at90usb128 flash (tested on the RZUSBstick) Change-Id: Ic042d7c403b20a5cc533da00c30ae6e2139bbd10 Signed-off-by: Olivier Esver <olg.esver@gmail.com> Reviewed-on: http://openocd.zylin.com/2557 Tested-by: jenkins Reviewed-by: Paul Fertser <fercerpav@gmail.com>
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-09-08atmega: add new target supportNemui Trinomius
Not tested, adapted from http://tech.groups.yahoo.com/group/versaloon/message/391 Change-Id: I6d6af10fb07ea43cc1196a90d8738957f8266938 Signed-off-by: Spencer Oliver <spen@spen-soft.co.uk> Reviewed-on: http://openocd.zylin.com/1507 Tested-by: jenkins
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-05-14flash: blank check use default_flash_blank_checkSpencer Oliver
Use default_flash_blank_check, this will use the much faster blank_check_memory handler if supported - 15x quicker on stm32f4. Otherwise it will fall back to using the slower default_flash_mem_blank_check. Change-Id: Ia231b3e95468c9e92594dbdbe1fa2d69e1506fc3 Signed-off-by: Spencer Oliver <spen@spen-soft.co.uk> Reviewed-on: http://openocd.zylin.com/632 Tested-by: jenkins
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-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>
2010-11-17FLASH/NOR: Remove useless file avrf.hAntonio Borneo
Signed-off-by: Antonio Borneo <borneo.antonio@gmail.com>
2010-06-21target/avr: review scope of symbolsAntonio Borneo
Add "static" qualifier to private functions. Move duplicated global declarations from "target/avrt.c" and "nor/avrf.c" to "target/avrt.h". Remove unused declarations form "nor/avrf.c". Signed-off-by: Antonio Borneo <borneo.antonio@gmail.com>
2010-05-29nor: fix memory leaks during probeSpencer Oliver
Fix similar memory leaks as per commit: ef72484b785ec7462a0415afea679d08b864c7fb Signed-off-by: Spencer Oliver <ntfreak@users.sourceforge.net>
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-04-10NOR/AVRF: review scope of dataAntonio Borneo
Add "static" qualifier to private data. Signed-off-by: Antonio Borneo <borneo.antonio@gmail.com>
2010-02-24AVR flash: handle AT90CAN128 chipsHans Peter Mortensn
I have successfully programmed the AT90CAN128, based on the mega128   with some small modifications. [ dbrownell@users.sourceforge.net: patch cleanup ] 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-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 "flash.h" to <flash/flash.h>Zachary T Welch
Changes from the flat namespace to heirarchical one. Instead of writing: #include "flash.h" the following form should be used. #include <flash/flash.h> The exception is from .c files in the same directory.
2009-12-03change #include "avrt.h" to <target/avrt.h>Zachary T Welch
Changes from the flat namespace to heirarchical one. Instead of writing: #include "avrt.h" the following form should be used. #include <target/avrt.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'.