summaryrefslogtreecommitdiff
path: root/drivers/mtd
Commit message (Collapse)AuthorAgeLines
* CFI: Do not use uninitialized cmd_resetMichael Schwingen2008-02-21-1/+6
| | | | | | | | | | | | | | | | | | | | Do not use uninitialized cmd_reset; issue both AMD and Intel reset commands instead From a short test, it looks like AMD-style flash roms treat *any* unknown command write as a reset, at least when in CFI Query mode, so issuing the Intel reset command to AMD-style flashs seems safe (from the small sample I have), plus the 3-cycle magic sequence should kick the state machine into the right state even without a reset command. Since the AMD-style flashs require the unlock sequence for real operation, I chose to try the AMD reset command first, so that Intel flashs do no see an invalid command prior to the CFI query. I have tested the patch on AM29LV320-style flashs from Fujitsu and Macronix, plus Intel StrataFlash. Signed-off-by: Michael Schwingen <michael@schwingen.org> Signed-off-by: Stefan Roese <sr@denx.de>
* AT91CAP9 support : build integrationStelian Pop2008-02-14-2/+3
| | | | Signed-off-by: Stelian Pop <stelian@popies.net>
* Improve DataFlash CS definition.Stelian Pop2008-02-14-13/+18
| | | | | | | Use a structure instead of the error prone unnamed array to define the possible dataflash banks. Signed-off-by: Stelian Pop <stelian@popies.net>
* Remove duplicate defines for ARRAY_SIZEKumar Gala2008-02-14-4/+0
| | | | Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
* Fix incorrect address test in AT91F_DataflashSelect().Stelian Pop2008-02-14-1/+1
| | | | Signed-off-by: Stelian Pop <stelian@popies.net>
* nand: FSL UPM NAND driverAnton Vorontsov2008-01-16-0/+203
| | | | Signed-off-by: Anton Vorontsov <avorontsov@ru.mvista.com>
* OneNAND: Separate U-Boot dependent code from OneNANDKyungmin Park2008-01-16-21/+42
| | | | | | OneNAND: Separate U-Boot dependent code from OneNAND Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
* CFI: Fix CONFIG_FLASH_CFI_LEGACY compilationMichael Schwingen2008-01-13-2/+2
| | | | | Signed-off-by: Michael Schwingen <michael@schwingen.org> Acked-by: Stefan Roese <sr@denx.de>
* fix comments with new drivers organizationMarcel Ziswiler2008-01-09-1/+1
| | | | Signed-off-by: Marcel Ziswiler <marcel@ziswiler.com>
* cfi_flash: Fix bug in flash_isset() to use correct 32bit functionStefan Roese2008-01-02-1/+1
| | | | | | | This bug was detected on the LWMON5 target which has 2 Intel 16bit wide flash chips connected to a 32bit wide port. Signed-off-by: Stefan Roese <sr@denx.de>
* cfi_flash: Add missing check for erased dest to flash_write_cfibuffer()Stefan Roese2007-12-27-1/+51
| | | | | | | | | The check for an sufficiently erased destination was missing in the buffered write function of the cfi flash driver (when CFG_FLASH_USE_BUFFER_WRITE is defined). This patch adds this check to that writing to such a region will fail with the currect error message. Signed-off-by: Stefan Roese <sr@denx.de>
* cfi_flash: Add manufacturer-specific fixupsHaavard Skinnemoen2007-12-17-14/+53
| | | | | | | | | | | | | | | | | | Run fixups based on the JEDEC manufacturer ID independent of the command set ID. This changes current behaviour: Previously, geometry reversal for AMD chips were done based on the command set ID, while they are now done based on the JEDEC manufacturer and device ID. Also add fixup for top-boot Atmel chips. A fixup is needed for AT49BV6416(T) too, but since u-boot currently only reads the low byte of the device ID, there's no way to tell it apart from AT49BV642D, which should not have this fixup. Since AT49BV642D support is necessary to get ATNGW100 board support into mainline, I've commented out the fixup for now. Signed-off-by: Haavard Skinnemoen <hskinnemoen@atmel.com>
* cfi_flash: Add cmdset-specific init functionsHaavard Skinnemoen2007-12-17-63/+111
| | | | | | | | | Move things like reading JEDEC IDs and fixing up geometry reversal into separate functions. The geometry reversal fixup is now performed by altering the qry structure directly, which makes the sector init code slightly cleaner. Signed-off-by: Haavard Skinnemoen <hskinnemoen@atmel.com>
* cfi_flash: Read whole QRY structure in one goHaavard Skinnemoen2007-12-17-86/+90
| | | | | | | | Read out the whole CFI Standard Query structure after successful cfi identification. This allows subsequent code to access this information directly without having to go through flash_read_uchar() and friends. Signed-off-by: Haavard Skinnemoen <hskinnemoen@atmel.com>
* cfi_flash: Use map_physmem() and unmap_physmem()Haavard Skinnemoen2007-12-13-60/+109
| | | | | | | | Use map_physmem() and unmap_physmem() to convert from physical to virtual addresses. This gives the arch a chance to provide an uncached mapping for flash accesses. Signed-off-by: Haavard Skinnemoen <hskinnemoen@atmel.com>
* cfi_flash: Introduce read and write accessorsHaavard Skinnemoen2007-12-13-78/+127
| | | | | | | | | Introduce flash_read{8,16,32,64) and flash_write{8,16,32,64} and use them to access the flash memory. This makes it clearer when the flash is actually being accessed; merely dereferencing a volatile pointer looks just like any other kind of access. Signed-off-by: Haavard Skinnemoen <hskinnemoen@atmel.com>
* cfi_flash: Reorder functions and eliminate extra prototypesHaavard Skinnemoen2007-12-13-687/+656
| | | | | | | | | Reorder the functions in cfi_flash.c so that each function only uses functions that have been defined before it. This allows the static prototype declarations near the top to be eliminated and might allow gcc to do a better job inlining functions. Signed-off-by: Haavard Skinnemoen <hskinnemoen@atmel.com>
* cfi_flash: Make some needlessly global functions staticHaavard Skinnemoen2007-12-13-7/+9
| | | | | | Make functions not declared in any header file static. Signed-off-by: Haavard Skinnemoen <hskinnemoen@atmel.com>
* cfi_flash: Break long linesHaavard Skinnemoen2007-12-13-115/+189
| | | | | | | | | This patch tries to keep all lines in the cfi_flash driver below 80 columns. There are a few lines left which don't fit this requirement because I couldn't find any trivial way to break them (i.e. it would take some restructuring, which I intend to do in a later patch.) Signed-off-by: Haavard Skinnemoen <hskinnemoen@atmel.com>
* CFI: synchronize command offsets with Linux CFI driverBartlomiej Sieka2007-12-13-3/+20
| | | | | | Fixes non-working CFI Flash on the Inka4x0 board. Signed-off-by: Bartlomiej Sieka <tur@semihalf.com>
* CFI: Coding style cleanupStefan Roese2007-12-08-5/+4
| | | | Signed-off-by: Stefan Roese <sr@denx.de>
* CFI: support JEDEC flash roms in CFI-flash frameworkMichael Schwingen2007-12-08-12/+411
| | | | | | | | | The following patch adds support for non-CFI flash ROMS, by hooking into the CFI flash code and using most of its code, as recently discussed here in the thread "Mixing CFI and non-CFI flashs". Signed-off-by: Michael Schwingen <michael@schwingen.org> Signed-off-by: Stefan Roese <sr@denx.de>
* drivers/mtd : move mtd drivers to drivers/mtdJean-Christophe PLAGNIOL-VILLARD2007-11-25-0/+12989
Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>