Commit Graph

18 Commits

Author SHA1 Message Date
Spencer Oliver 08d4411b59 update files to correct FSF address
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>
2013-06-05 19:52:42 +00:00
Spencer Oliver fab0dcd7e6 build: cleanup src/flash/nand directory
Change-Id: I21bb466a35168cf04743f5baafac9fef50d01707
Signed-off-by: Spencer Oliver <spen@spen-soft.co.uk>
Reviewed-on: http://openocd.zylin.com/419
Tested-by: jenkins
2012-02-06 10:53:08 +00:00
Øyvind Harboe 4668bd264c retire ERROR_INVALID_ARGUMENTS and replace with ERROR_COMMAND_SYNTAX_ERROR
Change-Id: I6dee51e1fab1944085391f274a343cdb9014c7a4
Signed-off-by: Øyvind Harboe <oyvind.harboe@zylin.com>
Reviewed-on: http://openocd.zylin.com/300
Tested-by: jenkins
Reviewed-by: Øyvind Harboe <oyvindharboe@gmail.com>
Reviewed-by: Spencer Oliver <spen@spen-soft.co.uk>
2012-01-04 17:13:46 +00:00
Antonio Borneo 7b94f4c99d NAND/CORE: fix clang warning
The fix is inline with the Linux coding style that forbids
assignment in if condition

Change-Id: I42a371d6adfdf3b3fb867705211c47d89776ee2a
Signed-off-by: Antonio Borneo <borneo.antonio@gmail.com>
Reviewed-on: http://openocd.zylin.com/85
Tested-by: jenkins
Reviewed-by: Øyvind Harboe <oyvindharboe@gmail.com>
2011-10-23 14:32:11 +00:00
Damjan Marion 9b4628ddab Fixed values for Samung NAND chips 2011-05-28 19:44:17 +02:00
Damjan Marion db91a36fdd Improve NAND flash detection
Detect based on both manufacturer id and chip id
if manufacturer id is defined in table
2011-05-28 14:30:58 +02:00
Damjan Marion acdf14eb43 Reorganize NAND flash table
- added manufacturer field
- name moved to the end for better text alignment
2011-05-28 14:27:48 +02:00
Alexandre Pereira da Silva 54ec0c4a8a Add Micron 2GiB nand
Hi,

This will add support for a new nand chip device.

Thanks.
2011-03-30 08:04:01 +02:00
Antonio Borneo 7bb79f0f51 NAND/CORE: Comment use of alive_sleep()
Signed-off-by: Antonio Borneo <borneo.antonio@gmail.com>
2011-01-02 19:53:55 +01:00
Antonio Borneo 52044a17ce NAND/CORE: Replace decimal dot in messages
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>
2011-01-02 19:52:53 +01:00
Jon Povey fafed75d98 NAND: catch read errors when building BBT
nand_build_bbt() was ignoring the return value from nand_read_page() and
blindly continuing.
It now passes the return value up to the caller if the read fails.

Signed-off-by: Jon Povey <jon.povey@racelogic.co.uk>
2010-05-18 09:23:48 +02:00
Jon Povey dcca0b7694 NAND: fix first and last handling in nand_build_bbt
Last block was being skipped, fix by changing the loop test from "<" to "<="

First block argument was ignored, always started from block 0 (and counted
the wrong blocks as bad if first was nonzero). Now we use it.

Signed-off-by: Jon Povey <jon.povey@racelogic.co.uk>
Signed-off-by: Øyvind Harboe <oyvind.harboe@zylin.com>
2010-05-14 13:23:01 +02:00
Jon Povey 0eb7fb59a0 NAND: fix off-by-one error in erase command argument range
The last_block argument to nand_erase() is checked against nand->num_blocks,
but the highest valid block number is (total - 1), the test for invalid should
be ">=" rather than ">".

Signed-off-by: Jon Povey <jon.povey@racelogic.co.uk>
Signed-off-by: Øyvind Harboe <oyvind.harboe@zylin.com>
2010-05-14 13:22:59 +02:00
Antonio Borneo 617811ac66 NAND/CORE: review scope of functions
Add "static" qualifier to private functions.
Move function's comment from core.h to core.c.

Signed-off-by: Antonio Borneo <borneo.antonio@gmail.com>
2010-04-10 20:08:41 +08:00
Dean Glazeski ef4fbd36d4 NAND write data page refactoring.
Refactored the write page raw function into two new functions
for writing data to a NAND device and then another function to
finish up a write to a NAND device.  This includes some new
updates to introduce more error checking to existing code.

[dbrownell@users.sourceforge.net: fix fault handling, whitespace]

Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
2009-12-18 01:33:19 -08:00
Dean Glazeski b8b4bb0745 NAND read data page refactor.
Added a new function to encapsulate reading a page of data from
a NAND device using either the read_block_data function of a NAND
controller or to use direct reading of data from the NAND device.

This also adds some performance enhancements and uses the read_data
function if the read_block_data function fails safely (because it
can't allocate a buffer in the working area).

[dbrownell@users.sourceforge.net: fix fault handling, whitespace]

Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
2009-12-18 01:33:19 -08:00
Zachary T Welch 899c9975e7 rename nand.h to flash//nand/core.h
Rename nand.h as flash/nand/core.h, chase consumers.  The public APIs
need to be sorted out with imp.h, but this allows other changes to
begin improving the separation between policy and mechanism.

Moves #include <target/target.h> and #include "driver.h" into the
internal headers or source files, removing it from <flash/nand/core.h>.
2009-12-04 22:26:25 -08:00
Zachary T Welch 747d6f2286 split nand.c into nand/{core,fileio,tcl}.c
Moves commands into nand/tcl.c and core implementation to 'nand/core.c'
and 'nand/fileio.c'.  Eliminates 'flash/nand.c'.

Adds 'nand/imp.h' to share routines between TCL commands and core.
2009-12-04 21:41:23 -08:00