summaryrefslogtreecommitdiff
path: root/drivers/mtd
Commit message (Collapse)AuthorAgeLines
* NAND: add NAND driver for S3C64XXGuennadi Liakhovetski2008-08-31-0/+320
| | | | | | Based on the original S3C64XX NAND driver by Samsung for U-Boot 1.1.6. Signed-off-by: Guennadi Liakhovetski <lg@denx.de>
* Minor coding style cleanup, updte CHANGELOGWolfgang Denk2008-08-25-5/+5
| | | | Signed-off-by: Wolfgang Denk <wd@denx.de>
* Fix OneNAND read_oob/write_oob functions compatabilityKyungmin Park2008-08-21-200/+706
| | | | | | | Also sync with kernel OneNAND codes Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com> Signed-off-by: Scott Wood <scottwood@freescale.com>
* CFI: Add CFI_CMDSET_INTEL_EXTENDED to fix flash_real_protect()Nick Spence2008-08-20-0/+1
| | | | | | | This patch fixes a missing vendor code in the flash_real_protect() function. Signed-off-by: Nick Spence <nick.spence@freescale.com> Signed-off-by: Stefan Roese <sr@denx.de>
* CFI: Fix AMD Legacy sector protectTsiChung Liew2008-08-20-3/+9
| | | | | | | | | New implement sector lock and unlock or softlock commands do not exist in AMD legacy flash. Thus, causing issue when erasing AMD legacy flash (such as lv040) Signed-off-by: TsiChung Liew <Tsi-Chung.Liew@freescale.com> Signed-off-by: Stefan Roese <sr@denx.de>
* Merge branch 'master' of git://git.denx.de/u-boot-cfi-flashWolfgang Denk2008-08-14-6/+60
|\
| * Merge branch 'master' of /home/stefan/git/u-boot/u-boot into nextStefan Roese2008-08-14-2797/+3597
| |\
| * | cfi-flash: Added support to flash_real_protect for Atmel flash devicesRafael Campos2008-08-06-6/+43
| | | | | | | | | | | | | | | | | | | | | | | | | | | Some of the flash memories produced by ATMEL start in read-only mode. We need to unprotect it. This patch allows the AT49BV6416 to work with cfi_flash memories. Tested in the at91rm9200ek board. Signed-off-by: Rafael Campos Las Heras <rafael.campos@hanscan.com> Signed-off-by: Stefan Roese <sr@denx.de>
| * | cfi-flash: Add definition for the AM29LV800BB AMD NOR-flashGuennadi Liakhovetski2008-08-06-0/+17
| | | | | | | | | | | | | | | Signed-off-by: Guennadi Liakhovetski <lg@denx.de> Signed-off-by: Stefan Roese <sr@denx.de>
* | | Coding Style cleanup, update CHANGELOGWolfgang Denk2008-08-14-83/+83
| | | | | | | | | | | | Signed-off-by: Wolfgang Denk <wd@denx.de>
* | | Merge branch 'master' of git://git.denx.de/u-boot-nand-flashWolfgang Denk2008-08-14-39/+96
|\ \ \ | |_|/ |/| |
| * | Fix OneNAND build breakKyungmin Park2008-08-13-39/+96
| | | | | | | | | | | | | | | | | | | | | | | | | | | Since page size field is changed from oobblock to writesize. But OneNAND is not updated. - fix bufferram management at erase operation This patch includes the NAND/OneNAND state filed too. Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com> Signed-off-by: Scott Wood <scottwood@freescale.com>
* | | drivers/mtd/nand_legacy: Move conditional compilation to MakefileJean-Christophe PLAGNIOL-VILLARD2008-08-13-6/+4
| | | | | | | | | | | | Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
* | | drivers/mtd/nand: Move conditional compilation to MakefileJean-Christophe PLAGNIOL-VILLARD2008-08-13-36/+9
| | | | | | | | | | | | | | | | | | rename CFG_NAND_LEGACY to CONFIG_NAND_LEGACY Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
* | | drivers/mtd/onenand: Move conditional compilation to MakefileJean-Christophe PLAGNIOL-VILLARD2008-08-13-16/+2
| | | | | | | | | | | | Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
* | | drivers/mtd: Move conditional compilation to MakefileJean-Christophe PLAGNIOL-VILLARD2008-08-13-14/+3
|/ / | | | | | | | | | | rename CFG_FLASH_CFI_DRIVER to CONFIG_FLASH_CFI_DRIVER Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
* | OneNAND: Fill in MTD function pointers for OneNAND.Fathi BOUDRA2008-08-12-6/+18
| | | | | | | | | | | | | | | | | | | | onenand_print_device_info(): - Now returns a string to be placed in mtd->name, rather than calling printf. - Remove verbose parameter as it becomes useless. Signed-off-by: Fathi Boudra <fabo@debian.org> Signed-off-by: Scott Wood <scottwood@freescale.com>
* | NAND: chip->state does not always get set.Marcel Ziswiler2008-08-12-0/+1
| | | | | | | | | | | | | | Fixes an issue with chip->state not always being set causing troubles. Signed-off-by: Marcel Ziswiler <marcel@ziswiler.com> Signed-off-by: Scott Wood <scottwood@freescale.com>
* | NAND: Scan bad blocks lazily.Ilya Yanok2008-08-12-3/+7
| | | | | | | | | | | | | | | | | | | | Rather than scanning on boot, scan upon the first attempt to check the badness of a block. This speeds up boot when not using NAND, and reduces the likelihood of needing to reflash via JTAG if NAND becomes nonfunctional. Signed-off-by: Ilya Yanok <yanok@emcraft.com> Signed-off-by: Scott Wood <scottwood@freescale.com>
* | NAND read/write fixScott Wood2008-08-12-581/+181
| | | | | | | | | | | | | | | | Implement block-skipping read/write, based on a patch from Morten Ebbell Hestens <morten.hestnes@tandberg.com>. Signed-off-by: Morten Ebbell Hestnes <morten.hestnes@tandberg.com> Signed-off-by: Scott Wood <scottwood@freescale.com>
* | nand: fsl_upm: convert to updated MTD NAND infrastructureAnton Vorontsov2008-08-12-40/+28
| | | | | | | | | | Signed-off-by: Anton Vorontsov <avorontsov@ru.mvista.com> Signed-off-by: Scott Wood <scottwood@freescale.com>
* | fsl_elbc_nand: Hard-code the FBAR/FPAR split.Scott Wood2008-08-12-3/+2
| | | | | | | | | | | | | | | | The hardware has separate registers for block and page-within-block, but the division between the two has no apparent relation to the actual erase block size of the NAND chip. Signed-off-by: Scott Wood <scottwood@freescale.com>
* | fsl_elbc_nand: workaround for hangs during nand writeAnton Vorontsov2008-08-12-1/+10
| | | | | | | | | | | | | | | | Using current driver elbc sometimes hangs during nand write. Reading back last byte helps though (thanks to Scott Wood for the idea). Signed-off-by: Anton Vorontsov <avorontsov@ru.mvista.com> Signed-off-by: Scott Wood <scottwood@freescale.com>
* | Freescale eLBC FCM NAND driverScott Wood2008-08-12-0/+760
| | | | | | | | | | | | | | | | This is a driver for the Flash Control Machine of the enhanched Local Bus Controller found on some Freescale chips (such as the mpc8313 and the mpc8379). Signed-off-by: Scott Wood <scottwood@freescale.com>
* | Don't panic if a controller driver does ecc its own way.Scott Wood2008-08-12-2/+6
| | | | | | | | | | | | | | | | | | | | | | | | Some hardware, such as the enhanced local bus controller used on some mpc83xx chips, does ecc transparently when reading and writing data, rather than providing a generic calculate/correct mechanism that can be exported to the nand subsystem. The subsystem should not BUG() when calculate, correct, or hwctl are missing, if the methods that call them have been overridden. Signed-off-by: Scott Wood <scottwood@freescale.com>
* | NAND: Make NAND driver less verbose per defaultStefan Roese2008-08-12-6/+7
| | | | | | | | | | | | | | This patch turns off printing of bad blocks per default upon bootup. This can always be shown via the "nand bad" command later. Signed-off-by: Stefan Roese <sr@denx.de>
* | NAND: Change nand_wait_ready() to not call nand_wait()Stefan Roese2008-08-12-1/+10
| | | | | | | | | | | | | | | | This patch changes nand_wait_ready() to not just call nand_wait(), since this will send a new command to the NAND chip. We just want to wait for the chip to become ready here. Signed-off-by: Stefan Roese <sr@denx.de>
* | Fixing coding style issuesWilliam Juul2008-08-12-6/+6
| | | | | | | | | | | | | | | | | | - Fixing leading white spaces - Fixing indentation where 4 spaces are used instead of tab - Removing C++ comments (//), wherever I introduced them Signed-off-by: William Juul <william.juul@tandberg.com> Signed-off-by: Scott Wood <scottwood@freescale.com>
* | Remove white space at end.William Juul2008-08-12-7/+7
| | | | | | | | | | Signed-off-by: William Juul <william.juul@tandberg.com> Signed-off-by: Scott Wood <scottwood@freescale.com>
* | Update MTD to that of Linux 2.6.22.1William Juul2008-08-12-2299/+2753
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | A lot changed in the Linux MTD code, since it was last ported from Linux to U-Boot. This patch takes U-Boot NAND support to the level of Linux 2.6.22.1 and will enable support for very large NAND devices (4KB pages) and ease the compatibility between U-Boot and Linux filesystems. This patch is tested on two custom boards with PPC and ARM processors running YAFFS in U-Boot and Linux using gcc-4.1.2 cross compilers. MAKEALL ppc/arm has some issues: * DOC/OneNand/nand_spl is not building (I have not tried porting these parts, and since I do not have any HW and I am not familiar with this code/HW I think its best left to someone else.) Except for the issues mentioned above, I have ported all drivers necessary to run MAKEALL ppc/arm without errors and warnings. Many drivers were trivial to port, but some were not so trivial. The following drivers must be examined carefully and maybe rewritten to some degree: cpu/ppc4xx/ndfc.c cpu/arm926ejs/davinci/nand.c board/delta/nand.c board/zylonite/nand.c Signed-off-by: William Juul <william.juul@tandberg.com> Signed-off-by: Stig Olsen <stig.olsen@tandberg.com> Signed-off-by: Scott Wood <scottwood@freescale.com>
* | OneNAND: Remove unused parameters to onenand_verify_pageSteve Sakoman2008-08-11-4/+2
| | | | | | | | | | | | | | The block and page parameters of onenand_verify_page() are not used. This causes a compiler error when CONFIG_MTD_ONENAND_VERIFY_WRITE is enabled. Signed-off-by: Steve Sakoman <steve@sakoman.com> Signed-off-by: Dirk Behme <dirk.behme@gmail.com>
* | Merge branch 'master' of git://git.denx.de/u-boot-at91Wolfgang Denk2008-08-10-1/+14
|\ \
| * | DataFlash: AT45DB021 fix and AT45DB081 supportSergey Lapin2008-08-09-1/+14
| |/ | | | | | | | | | | | | Fix for page size of AT45DB021. Also adding bigger AT45DB081 which comes with some newer boards. Signed-off-by: Sergey Lapin <slapin@ossfans.org>
* | CFI: allow for dynamically determined flash sizes and addressesWolfgang Denk2008-08-08-6/+8
|/ | | | | | | | | | | The CFI driver allowed only for static initializers in the CFG_FLASH_BANKS_LIST definition, i. e. it did not allow to map several flash banks contiguously if the bank sizes were not known in advance, which kind of violates U-Boot's design philosophy. (will be used for example by the TQM8xxL boards) Signed-off-by: Wolfgang Denk <wd@denx.de>
* spi flash: Fix printf() format warningsHaavard Skinnemoen2008-07-23-3/+3
| | | | Signed-off-by: Haavard Skinnemoen <haavard.skinnemoen@atmel.com>
* cfi_flash: fix flash on BE machines with CFG_WRITE_SWAPPED_DATASebastian Siewior2008-07-17-1/+4
| | | | | | | | | | | | | | This got broken by commits 93c56f212c [cfi_flash: support of long cmd in U-boot.] That command needs to be in little endian format on BE machines with CFG_WRITE_SWAPPED_DATA. Without this patch, the command 0xf0 gets saved on stack as 0x00 00 00 f0 and 0x00 gets written into the cmdbuf in case portwidth = chipwidth = 8bit. Cc: Alexey Korolev <akorolev@infradead.org> Cc: Vasiliy Leonenko <vasiliy.leonenko@mail.ru> Signed-off-by: Sebastian Siewior <bigeasy@linutronix.de>
* cfi_flash: make the command u32 onlySebastian Siewior2008-07-15-4/+4
| | | | | | | | | | | | | This got changed by commit 93c56f212c [cfi_flash: support of long cmd in U-boot.] Long is the wrong type because it will behave differently on 64bit machines in a way that is probably not expected. u32 should be enough. Cc: Alexey Korolev <akorolev@infradead.org> Cc: Vasiliy Leonenko <vasiliy.leonenko@mail.ru> Signed-off-by: Sebastian Siewior <bigeasy@linutronix.de>
* Fix some more printf() format issues.Jean-Christophe PLAGNIOL-VILLARD2008-07-13-1/+1
| | | | Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
* DataFlash AT45DB021 supportSergey Lapin2008-07-10-0/+14
| | | | | | | | | Some boards based on AT91SAM926X-EK use smaller DF chips to keep bootstrap, u-boot and its environment, using NAND or other external storage for kernel and rootfs. This patch adds support for small 1024x263 chip. Signed-off-by: Sergey Lapin <slapin@ossfans.org>
* MTD/NAND: Fix printf format warning in nand codeStefan Roese2008-07-10-4/+4
| | | | | | | | | This patch fixes NAND related printf format warning. Those warnings are now visible since patch dc4b0b38d4aadf08826f6c31270f1eecd27964fd [Fix printf errors.] by Andrew Klossner has been applied. Thanks, this is really helpful. Signed-off-by: Stefan Roese <sr@denx.de>
* Merge branch 'master' of git://www.denx.de/git/u-boot-nand-flashWolfgang Denk2008-07-10-85/+123
|\
| * NAND: Rename DEBUG to MTDDEBUG to avoid namespace pollution.Scott Wood2008-07-09-85/+123
| | | | | | | | | | | | | | | | | | This is particularly problematic now that non-NAND-specific code is including <nand.h>, and thus all debugging code is being compiled regardless of whether it was requested, as reported by Scott McNutt <smcnutt@psyent.com>. Signed-off-by: Scott Wood <scottwood@freescale.com>
* | jedec_flash: Fix AM29DL800BB device IDStefan Roese2008-07-08-1/+1
|/ | | | | | | | As pointed out by Jerry Hicks, this patch corrects the device ID of the Spansion AM29DL800BB NOR device. Verified against latest Spansion datasheet (rev C4 from Dezember 2006). Signed-off-by: Stefan Roese <sr@denx.de>
* cfi-flash: Fix problem in flash_toggle(), busy was not detected reliablyStefan Roese2008-06-19-8/+4
| | | | | | | | | | | | | This patch simplifies flash_toggle() (AMD commandset), which is used to detect if a FLASH device is still busy with erase/program operations. On 800MHz Canyonlands/Glacier boards (460EX/GT) the current implementation did not detect the busy state reliably, resulting in non erased sectors etc. This patch now simplifies this function by "just" comparing the complete data-word instead of ANDing it with the command-word (0x40) before the compatison. It is done the same way in the Linux implementation chip_ready() in cfi_cmdset_0002.c. Signed-off-by: Stefan Roese <sr@denx.de>
* Merge branch 'master' of git://www.denx.de/git/u-boot-cfi-flashWolfgang Denk2008-06-11-7/+34
|\
| * cfi_flash: enable M18 flash chips family support.Vasiliy Leoenenko2008-06-03-2/+21
| | | | | | | | | | | | | | | | Added new command set ID. Buffered write command processing is changed in order to support M18 flash chips family. Signed-off-by: Alexey Korolev <akorolev@infradead.org> Signed-off-by: Vasiliy Leonenko <vasiliy.leonenko@mail.ru>
| * cfi_flash: support of long cmd in U-boot.Vasiliy Leoenenko2008-06-03-7/+15
| | | | | | | | | | | | | | | | | | Some NOR flash chips needs support of commands with length grether than max value size of uchar. For example all M18 family chips use 0x1ff command in buffered write mode as value of program loops count. Signed-off-by: Alexey Korolev <akorolev@infradead.org> Signed-off-by: Vasiliy Leonenko <vasiliy.leonenko@mail.ru>
* | NAND: Added support for 128-bit OOB, adaptedSergei Poselenov2008-06-11-13/+33
| | | | | | | | Signed-off-by: Sergei Poselenov <sposelenov@emcraft.com>
* | NAND FSL UPM: driver re-write using the hwcontrol callbackWolfgang Grandegger2008-06-10-82/+46
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This is a re-write of the NAND FSL UPM driver using the more universal hwcontrol callback (instead of the cmdfunc callback). Here is a brief list of furher modifications: - For the time being, the UPM setup writing the UPM array has been removed from the driver and must now be done by the board specific code. - The bus width definition in "struct fsl_upm_nand" is now in bits to comply with the corresponding Linux driver and 8, 16 and 32 bit accesses are supported. - chip->dev_read is only set if fun->dev_ready != NULL, which is required for boards not connecting the R/B pin. - A few issue have been fixed with MxMR bit manipulation like in the corresponding Linux driver. Note: I think the "io_addr" field of "struct fsl_upm" could be removed as well, because the address is already determined by "nand->IO_ADDR_[RW]", but I'm not 100% sure. This patch has been tested on a TQM8548 modules with the NAND chip Micron MT29F8G08FABWP. This patch is based on the following patches posted to this list a few minutes ago: PPC: add accessor macros to clear and set bits in one shot 83xx/85xx/86xx: add more MxMR local bus definitions Signed-off-by: Wolfgang Grandegger <wg@grandegger.com> Acked-by: Anton Vorontsov <avorontsov@ru.mvista.com>
* | SPI Flash subsystemHaavard Skinnemoen2008-06-03-0/+616
| | | | | | | | | | | | | | | | | | | | This adds a new SPI flash subsystem. Currently, only AT45 DataFlash in non-power-of-two mode is supported, but some preliminary support for other flash types is in place as well. Signed-off-by: Haavard Skinnemoen <haavard.skinnemoen@atmel.com>