summaryrefslogtreecommitdiff
path: root/src/flash/nor/cfi.c
Commit message (Collapse)AuthorAgeFilesLines
* Fujitsu MBM29SL800TE flash supportKarl Kurbjun2010-05-111-0/+1
| | | | | | | | | | | | | | | | | Hi, This is my first post to the list. First, I would like to thank everyone for their work on OpenOCD, it is a great tool to work with. I have been using it to debug code on hardware for the Rockbox project (www.rockbox.org). The target that I primarily work with has a Spansion/Fujitsu NOR flash (MBM29SL800TE). I attached a patch that adds support for this flash. I hope it can be included in the main repository. If there is something that needs to be changed with the patch before inclusion please let me know. -Karl Kurbjun
* cfi: add Numonyx M29W128G reset workaroundSpencer Oliver2010-05-101-32/+35
| | | | | | | | The ST/Numonix M29W128G has an issue when a 0xff cmd is sent, it cause an internal undefined state. The workaround according to the Numonyx is to send another 0xf0 reset cmd Signed-off-by: Spencer Oliver <ntfreak@users.sourceforge.net>
* flash: stop caching protection stateØyvind Harboe2010-05-051-0/+11
| | | | | | | | | | | | | | There are a million reasons why cached protection state might be stale: power cycling of target, reset, code executing on the target, etc. The "flash protect_check" command is now gone. This is *always* executed when running a "flash info". As a bonus for more a more robust approach, lots of code could be deleted. Signed-off-by: Øyvind Harboe <oyvind.harboe@zylin.com>
* cfi: fix error handling for protect fnØyvind Harboe2010-05-051-4/+4
| | | | | | No error was propagated. Signed-off-by: Øyvind Harboe <oyvind.harboe@zylin.com>
* flash: less bogus errorsØyvind Harboe2010-05-041-2/+2
| | | | | | | Removed bogus errors when trying to allocate a large a target memory buffer as possible. Signed-off-by: Øyvind Harboe <oyvind.harboe@zylin.com>
* cfi: made som info output debug outputØyvind Harboe2010-05-041-2/+2
| | | | | | | E.g. how much target memory that is used during flashing is debug info. Signed-off-by: Øyvind Harboe <oyvind.harboe@zylin.com>
* NOR/CFI: remove redundant codeAntonio Borneo2010-04-151-6/+2
| | | | | | | | Arguments for "flash bank" command are already parsed and put in "bank" struct. Removed code to parse them again. Signed-off-by: Antonio Borneo <borneo.antonio@gmail.com>
* NOR/CFI: fix order of arguments checkAntonio Borneo2010-04-151-2/+2
| | | | | | | | | | | | Syntax of "flash bank" command requires: - chip_width as CMD_ARGV[3] - bus_width as CMD_ARGV[4] Actual code swaps the arguments. Bug has no run time impact since wrong variables are only used to check value and both are checked against same constraint. Signed-off-by: Antonio Borneo <borneo.antonio@gmail.com>
* NOR/CFI: review scope of functionsAntonio Borneo2010-04-101-3/+3
| | | | | | Add "static" qualifier to private functions. Signed-off-by: Antonio Borneo <borneo.antonio@gmail.com>
* cfi: simplify and clearify codeAntonio Borneo2010-03-081-149/+75
| | | | | | | | | | | | | | | | At the end I have added comments /* FIXME: to be removed */ There are 3 lines in which my simplification is not complete due to data dependency with LOG_DEBUG() messages visible in the patch. Such log_debug has been introduced on Jan 22, 2007 with commit 4fc97d3f2726efa147cfdb0c456eace51550e1e3 during development activity in this file/procedure. From my point of view, these logs can be removed, since not part of a consistent flow of information. Alternatively, could be borrowed in the new cfi_send_command(), but this will increase verbosity. Signed-off-by: Øyvind Harboe <oyvind.harboe@zylin.com>
* CFI: review print of Voltage valuesAntonio Borneo2010-03-061-6/+6
| | | | | | | | | | | | JEDEC standard reports Vpp integer part encoded as 4 bit HEX value. To print it using decimal digits, %u is required. Other voltage values are coded as BCD, so %x is appropriate. Code already prints one nibble at a time, so no need for field width and precision in format string. Signed-off-by: Antonio Borneo <borneo.antonio@gmail.com> Signed-off-by: Øyvind Harboe <oyvind.harboe@zylin.com>
* NOR: cleanup driver declsDavid Brownell2010-01-291-11/+11
| | | | | | Fix goofy struct indents. Function names *are* their addresses. Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
* ARM: use <target/arm.h> not armv4_5.hDavid Brownell2009-12-071-1/+1
| | | | | | | | | | | | | | 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>
* ARM: rename armv4_5_algorithm as arm_algorithmDavid Brownell2009-12-041-2/+2
| | | | Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
* ARM: ARMV4_5_COMMON_MAGIC --> ARM_COMMON_MAGICDavid Brownell2009-12-041-2/+2
| | | | Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
* ARM: rename ARMV4_5_MODE_* as ARM_MODE_*David Brownell2009-12-041-2/+2
| | | | Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
* ARM: rename ARMV4_5_STATE_* as ARM_STATE_*David Brownell2009-12-041-2/+2
| | | | Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
* remove target.h from flash.hZachary T Welch2009-12-041-0/+1
| | | | | 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.
* change #include "armv4_5.h" to <target/armv4_5.h>Zachary T Welch2009-12-031-1/+1
| | | | | | | | | | | | 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.
* change #include "algorithm.h" to <target/algorithm.h>Zachary T Welch2009-12-031-1/+1
| | | | | | | | | | | | 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.
* change #include "binarybuffer.h" to <helper/binarybuffer.h>Zachary T Welch2009-12-031-1/+1
| | | | | | | | | | | | 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.
* move nor drivers to src/flash/norZachary T Welch2009-12-021-0/+2630
Moves NOR flash drivers to 'src/flash/nor/'. Adds 'src/flash/nor/Makefile.am'. Builds 'libocdflashnor.la'.