summaryrefslogtreecommitdiff
path: root/drivers/mtd
AgeCommit message (Collapse)Author
2008-09-09Update i386 code (sc520_cdp)Graeme Russ
Attempt to bring i386 / sc520 inline with master Signed-off-by: Graeme Russ <graeme.russ@gmail.com>
2008-08-31NAND: add NAND driver for S3C64XXGuennadi Liakhovetski
Based on the original S3C64XX NAND driver by Samsung for U-Boot 1.1.6. Signed-off-by: Guennadi Liakhovetski <lg@denx.de>
2008-08-25Minor coding style cleanup, updte CHANGELOGWolfgang Denk
Signed-off-by: Wolfgang Denk <wd@denx.de>
2008-08-21Fix OneNAND read_oob/write_oob functions compatabilityKyungmin Park
Also sync with kernel OneNAND codes Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com> Signed-off-by: Scott Wood <scottwood@freescale.com>
2008-08-20CFI: Add CFI_CMDSET_INTEL_EXTENDED to fix flash_real_protect()Nick Spence
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>
2008-08-20CFI: Fix AMD Legacy sector protectTsiChung Liew
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>
2008-08-14Merge branch 'master' of git://git.denx.de/u-boot-cfi-flashWolfgang Denk
2008-08-14Coding Style cleanup, update CHANGELOGWolfgang Denk
Signed-off-by: Wolfgang Denk <wd@denx.de>
2008-08-14Merge branch 'master' of git://git.denx.de/u-boot-nand-flashWolfgang Denk
2008-08-14Merge branch 'master' of /home/stefan/git/u-boot/u-boot into nextStefan Roese
2008-08-13Fix OneNAND build breakKyungmin Park
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>
2008-08-13drivers/mtd/nand_legacy: Move conditional compilation to MakefileJean-Christophe PLAGNIOL-VILLARD
Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
2008-08-13drivers/mtd/nand: Move conditional compilation to MakefileJean-Christophe PLAGNIOL-VILLARD
rename CFG_NAND_LEGACY to CONFIG_NAND_LEGACY Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
2008-08-13drivers/mtd/onenand: Move conditional compilation to MakefileJean-Christophe PLAGNIOL-VILLARD
Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
2008-08-13drivers/mtd: Move conditional compilation to MakefileJean-Christophe PLAGNIOL-VILLARD
rename CFG_FLASH_CFI_DRIVER to CONFIG_FLASH_CFI_DRIVER Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
2008-08-12OneNAND: Fill in MTD function pointers for OneNAND.Fathi BOUDRA
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>
2008-08-12NAND: chip->state does not always get set.Marcel Ziswiler
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>
2008-08-12NAND: Scan bad blocks lazily.Ilya Yanok
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>
2008-08-12NAND read/write fixScott Wood
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>
2008-08-12nand: fsl_upm: convert to updated MTD NAND infrastructureAnton Vorontsov
Signed-off-by: Anton Vorontsov <avorontsov@ru.mvista.com> Signed-off-by: Scott Wood <scottwood@freescale.com>
2008-08-12fsl_elbc_nand: Hard-code the FBAR/FPAR split.Scott Wood
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>
2008-08-12fsl_elbc_nand: workaround for hangs during nand writeAnton Vorontsov
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>
2008-08-12Freescale eLBC FCM NAND driverScott Wood
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>
2008-08-12Don't panic if a controller driver does ecc its own way.Scott Wood
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>
2008-08-12NAND: Make NAND driver less verbose per defaultStefan Roese
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>
2008-08-12NAND: Change nand_wait_ready() to not call nand_wait()Stefan Roese
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>
2008-08-12Fixing coding style issuesWilliam Juul
- 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>
2008-08-12Remove white space at end.William Juul
Signed-off-by: William Juul <william.juul@tandberg.com> Signed-off-by: Scott Wood <scottwood@freescale.com>
2008-08-12Update MTD to that of Linux 2.6.22.1William Juul
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>
2008-08-11OneNAND: Remove unused parameters to onenand_verify_pageSteve Sakoman
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>
2008-08-10Merge branch 'master' of git://git.denx.de/u-boot-at91Wolfgang Denk
2008-08-09DataFlash: AT45DB021 fix and AT45DB081 supportSergey Lapin
Fix for page size of AT45DB021. Also adding bigger AT45DB081 which comes with some newer boards. Signed-off-by: Sergey Lapin <slapin@ossfans.org>
2008-08-08CFI: allow for dynamically determined flash sizes and addressesWolfgang Denk
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>
2008-08-06cfi-flash: Added support to flash_real_protect for Atmel flash devicesRafael Campos
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>
2008-08-06cfi-flash: Add definition for the AM29LV800BB AMD NOR-flashGuennadi Liakhovetski
Signed-off-by: Guennadi Liakhovetski <lg@denx.de> Signed-off-by: Stefan Roese <sr@denx.de>
2008-07-23spi flash: Fix printf() format warningsHaavard Skinnemoen
Signed-off-by: Haavard Skinnemoen <haavard.skinnemoen@atmel.com>
2008-07-17cfi_flash: fix flash on BE machines with CFG_WRITE_SWAPPED_DATASebastian Siewior
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>
2008-07-15cfi_flash: make the command u32 onlySebastian Siewior
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>
2008-07-13Fix some more printf() format issues.Jean-Christophe PLAGNIOL-VILLARD
Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
2008-07-10DataFlash AT45DB021 supportSergey Lapin
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>
2008-07-10MTD/NAND: Fix printf format warning in nand codeStefan Roese
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>
2008-07-10Merge branch 'master' of git://www.denx.de/git/u-boot-nand-flashWolfgang Denk
2008-07-09NAND: Rename DEBUG to MTDDEBUG to avoid namespace pollution.Scott Wood
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>
2008-07-08jedec_flash: Fix AM29DL800BB device IDStefan Roese
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>
2008-06-19cfi-flash: Fix problem in flash_toggle(), busy was not detected reliablyStefan Roese
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>
2008-06-11Merge branch 'master' of git://www.denx.de/git/u-boot-cfi-flashWolfgang Denk
2008-06-11NAND: Added support for 128-bit OOB, adaptedSergei Poselenov
Signed-off-by: Sergei Poselenov <sposelenov@emcraft.com>
2008-06-10NAND FSL UPM: driver re-write using the hwcontrol callbackWolfgang Grandegger
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>
2008-06-03cfi_flash: enable M18 flash chips family support.Vasiliy Leoenenko
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>
2008-06-03cfi_flash: support of long cmd in U-boot.Vasiliy Leoenenko
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>