summaryrefslogtreecommitdiff
path: root/src/flash
Commit message (Collapse)AuthorAgeFilesLines
* mips: illustrates how to improve performanceØyvind Harboe2011-04-011-6/+3
| | | | | | | Do not require unecessary roundtrips for clocking out data. Signed-off-by: Øyvind Harboe <oyvind.harboe@zylin.com>
* at91sam3: Modified cidr comparisson to ignore version bitsOlivier Schonken2011-03-301-1/+2
| | | | | | production processor versions increment, thus the version bits should be ignored for future proofing. e.g. Engineering sample version == 0x00, production version 0x01
* Clarify LPC32XX address cycles messageAlexandre Pereira da Silva2011-03-301-1/+1
| | | | | | | | | Hi, This is a more descriptive message about LPC32XX error, when the nand chip needs 5 address cycles. Thanks.
* Add Micron 2GiB nandAlexandre Pereira da Silva2011-03-301-0/+2
| | | | | | | | Hi, This will add support for a new nand chip device. Thanks.
* Fix a bunch of typos.Uwe Hermann2011-03-174-4/+4
| | | | | | | | Fix a bunch of typos. Most are in code comments, so nothing should break. UNKOWN_COMMAND and CMD_UNKOWN are not used elsewhere, so correcting the spelling should also not break anything.
* fix compile error under MinGWSimonQian2011-02-181-3/+3
|
* lpc32xx: Flash driverBjarne Steinsbo2011-02-155-0/+1932
| | | | | | | | | | Based on the lpc3180 driver, but released as a separate driver for two reasons: 1) I don't have an lpc3180 to test it against, so it might unintentionally break compatibility. 2) It's using a different OOB layout than lpc3180. Rewritten so that it no longer borrows code from the NXP CDL library. Instead borrowing code from the u-boot port to lpc32xx, written by Kevin Wells. Tested on lpc3250 (Hitex LPC3250-Stick). OOB layout is compatible with LPCLinux.
* stm32x: add support for STM32F20xØyvind Harboe2011-02-043-0/+715
| | | | | | ready for wider testing and comments on basic erase + programming. Signed-off-by: Øyvind Harboe <oyvind.harboe@zylin.com>
* cfi: use ARM32 machine code on all CPUs but Cortex M3Øyvind Harboe2011-01-311-6/+2
| | | | | | | | | | | ARM11 broke with aa61a3b3d8b6acad19050987835ec05f3d298bdb as the code only checked for arm 7/9. CFI probably needs work for non-ARM targets but perhaps not adding working area memory to e.g. MIPS will give the default slow CFI support. Signed-off-by: Øyvind Harboe <oyvind.harboe@zylin.com>
* Fixed small mistakes in at91sam3 info commandThomas Schmid2011-01-261-1/+3
| | | | Signed-off-by: Spencer Oliver <ntfreak@users.sourceforge.net>
* stellaris: automatically generate and update device IDsEric Wetzel2011-01-191-0/+6
| | | | | | Added a Perl script to contrib that uses the header files in StellarisWare complete Firmware Development Package provided by TI/Luminary to generate a new list of device IDs Used Perl script and revision 6734 of TI/Luminary StellarisWare to update device IDs
* Flash driver for em357Erik Botö2011-01-143-0/+980
| | | | | | | | | | | | | | | Hi, I took the stm32x NOR flash driver and adapted it for the Ember EM357 chip. This chip is very similar to em351 and stm32w so the driver should be easily extended to support those as well if anyone can get their hands on some of those for testing. changelog: Added NOR flash driver em357 Best regards, Erik Botö
* str9xpec: Find flash controller from the chain.Santeri Salko2011-01-141-1/+2
| | | | | | | | | | | Find the flash controller by position since it is before the core, not after it. This fixes the problem that str9xpec enable_turbo (or any other str9xpec command) did not work. (See my post in http://forum.sparkfun.com/viewtopic.php?f=18&t=25542) Signed-off-by: Santeri Salko <santeri.salko@gmail.com>
* cfi: fix release build warningsSpencer Oliver2011-01-101-2/+2
| | | | Signed-off-by: Spencer Oliver <ntfreak@users.sourceforge.net>
* nit: more LOG_* \n fixesEric Wetzel2011-01-095-38/+38
| | | | | | | | | Remove extra \n from LOG_DEBUG, LOG_INFO, and LOG_WARNING messages Remove LOG_INFO_N LOG_INFO_N was only used once and had a \n at the end Change LOG_USER_N calls that end with \n to LOG_USER
* cfi: use safer arch detectionSpencer Oliver2011-01-061-2/+8
| | | | Signed-off-by: Spencer Oliver <ntfreak@users.sourceforge.net>
* Add the support for the armv7m arch.Jonathan Dumaresq2011-01-061-15/+64
| | | | Signed-off-by: Jonathan Dumaresq <jdumaresq@cimeq.qc.ca>
* nit: do not add \n at end of LOG_ERROREric Wetzel2011-01-057-14/+14
| | | | Fixed in many other places, and submitted in response to Øyvind's invitation.
* nit: do not add \n at end of LOG_ERRORØyvind Harboe2011-01-031-4/+4
| | | | | This is done in many other places as well, patch to fix gratefully accepted!
* error handling: the error number is not part of the user interfaceØyvind Harboe2011-01-035-17/+13
| | | | | | | | 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>
* cfi_protect is not implemented on Spansion flashes (many do not even have ↵Michael Schwingen2011-01-021-2/+2
| | | | | | protection bits). Demote from error to warning, so that common board code can use "flash write_image erase unlock" regardless of the flash type. Signed-off-by: Michael Schwingen <michael@schwingen.org>
* non-CFI flash code uses data from CFI structures. Make sure that timeouts ↵Michael Schwingen2011-01-022-99/+98
| | | | | | are filled in on non-CFI flashes, and print CFI information in all cases, nut just on CFI flashes. Signed-off-by: Michael Schwingen <michael@schwingen.org>
* NAND/S3CXXXX: remove private "target" copyAntonio Borneo2011-01-027-33/+16
| | | | | | | Remove "target" form private data, and use common one in struct nand_block. Signed-off-by: Antonio Borneo <borneo.antonio@gmail.com>
* NAND/ORION: remove private "target" copyAntonio Borneo2011-01-021-13/+5
| | | | | | | Remove "target" form private data, and use common one in struct nand_block. Signed-off-by: Antonio Borneo <borneo.antonio@gmail.com>
* NAND/NUC910: remove private "target" copyAntonio Borneo2011-01-021-21/+7
| | | | | | | Remove "target" form private data, and use common one in struct nand_block. Signed-off-by: Antonio Borneo <borneo.antonio@gmail.com>
* NAND/MX3: remove private "target" copyAntonio Borneo2011-01-022-22/+11
| | | | | | | Remove "target" form private data, and use common one in struct nand_block. Signed-off-by: Antonio Borneo <borneo.antonio@gmail.com>
* NAND/MX2: remove private "target" copyAntonio Borneo2011-01-022-20/+11
| | | | | | | Remove "target" form private data, and use common one in struct nand_block. Signed-off-by: Antonio Borneo <borneo.antonio@gmail.com>
* NAND/LPC3180: remove private "target" copyAntonio Borneo2011-01-022-24/+16
| | | | | | | Remove "target" form private data, and use common one in struct nand_block. Signed-off-by: Antonio Borneo <borneo.antonio@gmail.com>
* NAND/DAVINCI: remove private "target" copyAntonio Borneo2011-01-021-27/+17
| | | | | | | Remove "target" form private data, and use common one in struct nand_block. Signed-off-by: Antonio Borneo <borneo.antonio@gmail.com>
* NAND/AT91SAM9: remove private "target" copyAntonio Borneo2011-01-021-37/+22
| | | | | | | Remove "target" form private data, and use common one in struct nand_block. Signed-off-by: Antonio Borneo <borneo.antonio@gmail.com>
* NAND/TCL: prepare for common "target" referenceAntonio Borneo2011-01-022-3/+26
| | | | | | | | | Every NAND driver keeps private copy of "target" structure. Prepare infostructure to move private "target" copy in common/shared struct nand_device. Signed-off-by: Antonio Borneo <borneo.antonio@gmail.com>
* NAND/TCL: fix segfault on syntax errorAntonio Borneo2011-01-021-1/+1
| | | | | | | Fix segfault if incomplete command "nand device dummy" is executed. Signed-off-by: Antonio Borneo <borneo.antonio@gmail.com>
* NAND/CORE: Comment use of alive_sleep()Antonio Borneo2011-01-021-0/+1
| | | | Signed-off-by: Antonio Borneo <borneo.antonio@gmail.com>
* NAND/CORE: Replace decimal dot in messagesAntonio Borneo2011-01-021-66/+66
| | | | | | | | | | | | Table of NAND devices reports operating voltage. Replace comma with proper decimal dot. Øyvind: "." is correct for UK/US, but incorrect for many other languages. OpenOCD is not localized at this point, so sticking to "." for US/UK should be OK. Signed-off-by: Antonio Borneo <borneo.antonio@gmail.com> Signed-off-by: Øyvind Harboe <oyvind.harboe@zylin.com>
* flash/nand: review NAND driver interfaceAntonio Borneo2011-01-0213-47/+2
| | | | | | | | | | From struct nand_flash_controller : - remove unused field register_commands; - remove field controller_ready, exported but never referenced. Remove dead code pointed by controller_ready. Signed-off-by: Antonio Borneo <borneo.antonio@gmail.com>
* Compilation Warnings on OS X 10.5Andrew MacIsaac2010-12-292-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | I received a number of "-Wshadow" related warnings (treated as errors) while trying to build on OS X Leopard. In addition, there were two miscellaneous other warnings in the flash drivers. Attached are two patches which correct these issues and the commit messages to accompany them. My system has the following configuration (taken from uname -a): Darwin 9.8.0 Darwin Kernel Version 9.8.0: Wed Jul 15 16:55:01 PDT 2009; root:xnu-1228.15.4~1/RELEASE_I386 i386 === Werror_patch.txt Commit Message === compilation: fixes for -Wshadow warnings on OS X These changes fix -Wshadow compilation warnings on OS X 10.5.8 Compiled with the following configure command: ../configure --prefix=/usr/local --enable-maintainer-mode --enable-jlink --enable-ft2232_libftdi === flash_patch.txt Commit Message === compilation: fixes for flash driver warnings on OS X These changes fix two compilation warnings on OS X 10.5.8: ../../../../src/flash/nor/at91sam3.c:2767: warning: redundant redeclaration of 'at91sam3_flash' ../../../../src/flash/nor/at91sam3.c:101: warning: previous declaration of 'at91sam3_flash' was here and ../../../../src/flash/nor/stmsmi.c:205: warning: format not a string literal and no format arguments Compiled with the following configure command: ../configure --prefix=/usr/local --enable-maintainer-mode --enable-jlink --enable-ft2232_libftdi === Andrew
* warning: fix warning where GCC didn't catch a doubly declared global structureØyvind Harboe2010-12-291-1/+1
| | | | | | Why hasn't earlier versions of GCC caught this? Bug? Signed-off-by: Øyvind Harboe <oyvind.harboe@zylin.com>
* warnings: use more 'const' for char *Øyvind Harboe2010-12-2910-14/+14
| | | | Signed-off-by: Øyvind Harboe <oyvind.harboe@zylin.com>
* stm32x : always use valid flash base addressSpencer Oliver2010-12-231-0/+3
| | | | | | | This change matches the previous behaviour of using the known flash address. Signed-off-by: Spencer Oliver <ntfreak@users.sourceforge.net>
* flash: print flash bank name on flash info cmdSpencer Oliver2010-12-231-2/+2
| | | | | | | | The flash bank name is a required element in adding flash banks, however other than looking at the config file there is no way of getting the name used in openocd. Signed-off-by: Spencer Oliver <ntfreak@users.sourceforge.net>
* stm32: fix reversed option byte writeSpencer Oliver2010-12-231-4/+4
| | | | | | This has been a long standing bug that has never been spotted. Signed-off-by: Spencer Oliver <ntfreak@users.sourceforge.net>
* stm32: update option bytes for stm32xl familySpencer Oliver2010-12-231-8/+79
| | | | | | | add supoort for xl family boot bank option. The option byte handling will be cleaned up in a later patch. Signed-off-by: Spencer Oliver <ntfreak@users.sourceforge.net>
* stm32: add stm32 xl family flash supportSpencer Oliver2010-12-231-1/+45
| | | | Signed-off-by: Spencer Oliver <ntfreak@users.sourceforge.net>
* stm32: add dual flash bank supportSpencer Oliver2010-12-231-26/+37
| | | | | | | This patch adds the initial dual flash bank support for devices such as the stm32xl family. Signed-off-by: Spencer Oliver <ntfreak@users.sourceforge.net>
* Fix for segfault in handle_nand_dump_command.Paul Richards2010-12-151-5/+5
|
* stm32: fix unprotectØyvind Harboe2010-12-151-4/+11
| | | | | | | | | the unprotect fn in stm32 needs to unprotect more sectors than was requested aligned to some boundary. Print warning when this happens. Signed-off-by: Øyvind Harboe <oyvind.harboe@zylin.com>
* flash: clarify protect documentationØyvind Harboe2010-12-151-3/+6
| | | | | | | some chips unprotect more than the range asked for. The protect fn, must unprotect/protect minimally the range given. Signed-off-by: Øyvind Harboe <oyvind.harboe@zylin.com>
* contrib: add source to the cfi flash loadersSpencer Oliver2010-12-101-6/+13
| | | | Signed-off-by: Spencer Oliver <ntfreak@users.sourceforge.net>
* cfi: disable buffer writes for M29W128GSpencer Oliver2010-12-102-5/+16
| | | | | | | | | | For some reason buffer writes for the M29W128G do not work reliably, so disable them. See: http://git.kernel.org/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commitdiff;h=504a3e72208fc6a65924426ff5693982590bccdc Signed-off-by: Spencer Oliver <ntfreak@users.sourceforge.net>
* cfi: allow optional buffer write supportSpencer Oliver2010-12-102-2/+12
| | | | | | | Some flash's do not support buffer writes, so we now check they are supported before trying to use them. Signed-off-by: Spencer Oliver <ntfreak@users.sourceforge.net>