summaryrefslogtreecommitdiff
path: root/src/flash/nand
Commit message (Collapse)AuthorAgeFilesLines
* Fix a bunch of typos.Uwe Hermann2011-03-172-2/+2
| | | | | | | | 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.
* nit: more LOG_* \n fixesEric Wetzel2011-01-092-2/+2
| | | | | | | | | 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
* nit: do not add \n at end of LOG_ERROREric Wetzel2011-01-054-5/+5
| | | | Fixed in many other places, and submitted in response to Øyvind's invitation.
* 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>
* warnings: use more 'const' for char *Øyvind Harboe2010-12-292-4/+4
| | | | Signed-off-by: Øyvind Harboe <oyvind.harboe@zylin.com>
* Fix for segfault in handle_nand_dump_command.Paul Richards2010-12-151-5/+5
|
* build: add common.mkSpencer Oliver2010-11-181-3/+1
| | | | | | | Rather than specifying common makefile variables move them all to a common.mk. Signed-off-by: Spencer Oliver <ntfreak@users.sourceforge.net>
* fileio: fileio_size() can now failØyvind Harboe2010-09-292-3/+14
| | | | | | Part of making the fileio API more robust. Signed-off-by: Øyvind Harboe <oyvind.harboe@zylin.com>
* fileio: refactor struct fileio to be an opaque structureØyvind Harboe2010-09-292-3/+3
| | | | Signed-off-by: Øyvind Harboe <oyvind.harboe@zylin.com>
* flash: fix error handlingØyvind Harboe2010-09-211-29/+3
| | | | | | sensible error must be reported at failure site Signed-off-by: Øyvind Harboe <oyvind.harboe@zylin.com>
* warnings: fix alignment warningsØyvind Harboe2010-09-201-2/+2
| | | | | | | These warnings are for architectures that do not support non-aligned word access. Signed-off-by: Øyvind Harboe <oyvind.harboe@zylin.com>
* flash: add nuc910 nand driverSpencer Oliver2010-07-194-2/+306
| | | | | | | | This adds a nand driver support for the nuc910 target. Note that ECC is not currently supported by this driver, although it is supported by the peripheral. Signed-off-by: Spencer Oliver <ntfreak@users.sourceforge.net>
* nand: nand probe also outputs manufacturerSpencer Oliver2010-07-191-1/+2
| | | | | | The nand probe now outputs the manufacturer if found. Signed-off-by: Spencer Oliver <ntfreak@users.sourceforge.net>
* nand/mx2: review scope of symbolsAntonio Borneo2010-06-211-1/+1
| | | | | | Add "static" qualifier to private variable. Signed-off-by: Antonio Borneo <borneo.antonio@gmail.com>
* arm_io: -Wshadow warning fixØyvind Harboe2010-06-161-6/+6
| | | | Signed-off-by: Øyvind Harboe <oyvind.harboe@zylin.com>
* nand: when verify failed, it didn't return an errorØyvind Harboe2010-06-161-6/+10
| | | | | | | | | | when the verify failed, it didn't return an error, which breaks e.g. tcl scripts that rely on this for exceptions to work. Found by -Wshadow Signed-off-by: Øyvind Harboe <oyvind.harboe@zylin.com>
* -Wshadow fixesØyvind Harboe2010-06-141-1/+1
| | | | Signed-off-by: Øyvind Harboe <oyvind.harboe@zylin.com>
* nand : Add Freescale iMX27 nand flash controller supportgcembed2010-05-204-0/+900
| | | | | | | | This patch add support of iMX27 nand flash controller. This is based on driver for imx31 nand flash controller. OOB functionality is not fully working. As in mx31 controller, mx2 NFC has a bug that swap two bytes between SPARE and MAIN buffer. I used this driver for several months and no problems appear.
* NAND/davinci: Fix segfault for hwecc4_infix readsJon Povey2010-05-181-12/+62
| | | | | | | | | | | | | | | | | | | | Page reads using hwecc4_infix layout segfaulted for check_bad_blocks because the read assumed a valid data buffer, which check_bad_blocks does not use (it only passes a 6 byte buffer for the start of OOB). This version copes with undersized or missing data or oob buffers and uses random read commands within the page to skip unwanted areas of data/OOB for speed. NOTE: Running check_bad_blocks with this layout will be reading infix OOB locations, not manufacturer bad block markers. This means that if you check blocks written in infix layout they will appear good, but manufacturer- marked bad blocks may also appear good. If you want to scan for manufactuer-marked bad blocks, you need to enable raw_access before running check_bad_blocks, or use the non-infix layout. Signed-off-by: Jon Povey <jon.povey@racelogic.co.uk> CC: David Brownell <dbrownell@users.sourceforge.net>
* NAND: catch read errors when building BBTJon Povey2010-05-181-1/+4
| | | | | | | | 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>
* Change kb/s to KiB/s in messages about kibibytesJon Povey2010-05-161-3/+3
| | | | | | | Change download rate messages about kibibytes from "kb/s" to "KiB/s" units. See: http://en.wikipedia.org/wiki/Data_rate_units Signed-off-by: Jon Povey <jon.povey@racelogic.co.uk>
* NAND: fix first and last handling in nand_build_bbtJon Povey2010-05-141-3/+5
| | | | | | | | | | 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>
* NAND: fix off-by-one error in erase command argument rangeJon Povey2010-05-141-1/+1
| | | | | | | | | 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>
* NAND/TCL: review scope of functionsAntonio Borneo2010-04-102-3/+4
| | | | | | Add "static" qualifier to private functions. Signed-off-by: Antonio Borneo <borneo.antonio@gmail.com>
* NAND/ARM_IO: review scope of functionsAntonio Borneo2010-04-101-1/+1
| | | | | | Add "static" qualifier to private functions. Signed-off-by: Antonio Borneo <borneo.antonio@gmail.com>
* NAND/CORE: review scope of functionsAntonio Borneo2010-04-102-10/+8
| | | | | | | 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>
* NAND/MX3: review scope of dataAntonio Borneo2010-04-101-1/+1
| | | | | | Add "static" qualifier to private data. Signed-off-by: Antonio Borneo <borneo.antonio@gmail.com>
* change %x and %d to PRIx32 and PRId32 where needed for cygwinDaniel Bäder2010-03-251-4/+4
|
* lpc3180: LPC3180(LPC3250) SLC driver implementedrichard vegh2010-03-162-9/+441
| | | | | | | | | | | | | | | | Until this time only basic SLC functionality exists when you want to use SLC to access external nand flash. Basic functionality can be selected with command: lpc3180 select 0 slc It is anyway very slow to write/read to/from nand flash. With the new command, SLC speed improved about 20 times, and hardware ECC info also read/written from/to nand flash OOB area: lpc3180 select 0 slc bulk Speed improvement achieved by using working are in SRAM of the LPC3250 chip and controlling DMA controller to interact between SRAM and SLC peripheral. Here are the patches, and if they are ok than take them. Tested with hitex LPC3250 usb stick. Signed-off-by: Øyvind Harboe <oyvind.harboe@zylin.com>
* NAND: lpc3180 crashes on LPC3250richard vegh2010-01-161-13/+38
| | | | | | | | | | | | | The LPC3180 NAND driver was crashing on some large page chips. Fix: - Crash and related functionality (don't memset too much OOB data) - Some debug messages - Command handling now works [dbrownell@users.sourceforge.net: whitespace/linelength/message cleanup] Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
* nand flash support for s3c64xxPeter Korsgaard2010-01-143-0/+79
| | | | | | | | | | | | Identical to the existing 2412/2443 support except for the base address and NFCONF value (bit 2 is reserved and should be written as 1 ref UM). Tested on a s3c6410 board, but controller is identical in 6400/6410 except for 8bit MLC ECC support in 6410 which isn't supported by the driver. Signed-off-by: Peter Korsgaard <jacmet@sunsite.dk> Signed-off-by: Øyvind Harboe <oyvind.harboe@zylin.com>
* NAND: help/usage/doc updatesDavid Brownell2010-01-083-48/+50
| | | | | | | | | | | | | | Usage messages should use the same EBNF as the User's Guide; no angle brackets. Be more complete too ... some params were missing. Improve and correct various helptexts. Make user's guide refer to the NAND "driver" name, not the controller name; that's a bit more precise. Don't use "&function"; its name is its address. Line up struct initializers properly. Remove some blank lines. Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
* MinGW build fixesFreddie Chopin2009-12-281-2/+2
| | | | | | | | Print "ssize_t" as "%ld" (+ cast to long) not as "%zu". Official MinGW (gcc 3.4.5) doesn't understand "z" flag. Signed-off-by: Freddie Chopin <freddie_chopin@op.pl> Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
* Packaging fix, NEWS updateDavid Brownell2009-12-211-1/+3
| | | | Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
* cygwin build fixesDavid Brownell2009-12-191-2/+6
| | | | | | and shrink some too-long lines Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
* AT91SAM9 NAND flash driver.Dean Glazeski2009-12-193-1/+754
| | | | | | | | | | This creates the TCL interface for configuring an AT91SAM9 NAND flash controller and implements the necessary functions to correctly work with a NAND flash device connected to the chip. This includes updates to the driver list and the Makefile.am to support building the driver and also houses the documentation update in openocd.texi. Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>