summaryrefslogtreecommitdiff
path: root/drivers/mtd
AgeCommit message (Collapse)Author
2013-09-09mtd/nand: fsl_nfc: add option for 8-bit wide bus widthMarcel Ziswiler
Add configuration option CONFIG_NAND_FSL_NFC_8BIT to be able to specify narrow 8-bit wide bus width in connecting NAND chips.
2013-09-08NAND Boot:Dan Douglass
- nb_update tool in fsl_nfc driver rewritten to write FCB, BBT, and image to NAND. - vybrid_nand board config added. - NAND read commands added to DCD that force NFC controller to read NAND page twice to prevent NFC hang.
2012-09-07Add NFC support for faraday boardJason Jin
Signed-off-by: Jason Jin <Jason.jin@freescale.com>
2012-03-21cfi: fix the incomplete erased status check in buffer writeTao Hou
Without the fix, flash_write_cfibuffer will terminate the erased status check once an all-0xFF word has been found instead of continuing the erased status check utill the first non-0xFF word. Signed-off-by: Tao Hou <hotforest@gmail.com> Cc: Stefan Roese <sr@denx.de> Signed-off-by: Stefan Roese <sr@denx.de>
2012-02-28mtd/nand:Fix wrong usage of is_blank() in fsl_ifc_run_commandPrabhakar Kushwaha
Freescale IFC NAND Machine calculates ECC on 512byte sector and same is used in fsl_ifc_run_command() during ECC status verification. Also this sector is passed to is_blank() for blank checking. It is wrong at first place because is_blank()'s implementation checks for Page size and OOB area size. is_blank() should be called per page for main and OOB area verification. Variables name are redefined to avoid confusion between buffer and ecc sector. Signed-off-by: Poonam Aggrwal <poonam.aggrwal@freescale.com> Signed-off-by: Prabhakar Kushwaha <prabhakar@freescale.com> Signed-off-by: Scott Wood <scottwood@freescale.com>
2012-02-28mtd/nand: Fix IFC driver to support 2K NAND pagePrabhakar Kushwaha
1) OOB area should be updated irrespective of NAND page size. Earlier it was updated only for 512byte NAND page. 2) During OOB update fbcr should be equal to OOB size. Signed-off-by: Poonam Aggrwal <poonam.aggrwal@freescale.com> Signed-off-by: Prabhakar Kushwaha <prabhakar@freescale.com> Signed-off-by: Scott Wood <scottwood@freescale.com>
2012-02-28nand: reinstate lazy bad block scanningScott Wood
commit 2a8e0fc8b3dc31a3c571e439fbf04b882c8986be ("nand: Merge changes from Linux nand driver") accidentally reverted commit 13f0fd94e3cae6f8a0d9fba5d367e311edc8ebde ("NAND: Scan bad blocks lazily."). Reinstate the change, as amended by commit ff49ea8977b56916edd5b1766d9939010e30b181 ("NAND: Mark the BBT as scanned prior to calling scan_bbt."). Signed-off-by: Scott Wood <scottwood@freescale.com>
2012-02-28Revert "nand: make 1-bit software ECC configurable"Scott Wood
This reverts commit 4fee6c2f295f932b8febdc7ce8731ba045695fa5. It breaks boards that currently rely on soft-ecc, as pointed out here: http://patchwork.ozlabs.org/patch/140872/ The reverted patch should be resubmitted with documentation, and with the CONFIG_MTD_ECC_SOFT selected from every board that needs it. We could start by looking at what NAND driver the board selects, and whether that driver ever asks for soft ECC. Signed-off-by: Scott Wood <scottwood@freescale.com>
2012-02-13Merge branch 'sf' of git://git.denx.de/u-boot-blackfinWolfgang Denk
* 'sf' of git://git.denx.de/u-boot-blackfin: README: Add description of SPI Flash (SF) command configuration sf command: allow default bus and chip selects sf: eeprom_m95xxx: set a sane default timeout sf: eeprom_m95xxx: fix up style
2012-02-12sf: eeprom_m95xxx: set a sane default timeoutMike Frysinger
Every board currently defines this to the same value, so just default to that to avoid having to make everyone do the same thing. Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2012-02-12sf: eeprom_m95xxx: fix up styleMike Frysinger
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2012-02-12Blackfin: bfin_nand: mark local func staticMike Frysinger
This devready func is only used in this driver, so mark it static. Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2012-02-11Merge branch 'master' of git://git.denx.de/u-boot-cfi-flashWolfgang Denk
* 'master' of git://git.denx.de/u-boot-cfi-flash: add STM29F400BB to table of supported legacy flashs * Fix: watchdog timed out, if flash blank (0xFF) blocks
2012-02-09add STM29F400BB to table of supported legacy flashsDavid Müller (ELSOFT AG)
Signed-off-by: David Mueller <d.mueller@elsoft.ch> Signed-off-by: Stefan Roese <sr@denx.de>
2012-02-09* Fix: watchdog timed out, if flash blank (0xFF) blocksJens Scharsig (BuS Elektronik)
The current implementation of cfi_flash uses udelay to reset watchdog. If several blocks are blank (0xff filled) the watchdog timed out. The reason is, udelay is never called, if flash device is ready to fast. e.g. mw.w $(copy_addr) FFFF 10000;cp.b $(copy_addr) 10880000 20000 -> watchdog timed out mw.w $(copy_addr) 0000 10000;cp.b $(copy_addr) 10880000 20000 -> watchdog not timed out This patch adds an extra watchdog reset in front of flash ready check. Signed-off-by: Jens Scharsig (BuS Elektronik) <esw@bus-elektronik.de> Signed-off-by: Stefan Roese <sr@denx.de>
2012-01-26nand/fsl_elbc: Convert to self-initScott Wood
This driver doesn't yet make use of the added flexibility (not that that should stop anyone from converting...), but it will with the in-progress hack to support 4k-page NAND. Signed-off-by: Scott Wood <scottwood@freescale.com>
2012-01-26nand: Introduce CONFIG_SYS_NAND_SELF_INITScott Wood
This allows a driver to run code between nand_scan_ident() and nand_scan_tail(), among other things. See the additions to doc/README.nand for details. To allow a gradual transition, Boards that don't set CONFIG_SYS_NAND_SELF_INIT will still be initialized the old way, but new drivers should not require this, and existing drivers should be converted when convenient. Signed-off-by: Scott Wood <scottwood@freescale.com>
2012-01-26mtd/nand: Add ONFI support for FSL NAND controllerShengzhou Liu
- fix NAND_CMD_READID command for ONFI detect. - add NAND_CMD_PARAM command to read the ONFI parameter page. Signed-off-by: Shengzhou Liu <Shengzhou.Liu@freescale.com> Signed-off-by: Scott Wood <scottwood@freescale.com>
2012-01-26nand: make 1-bit software ECC configurableChristian Hitz
The software ECC algorithm is not necessary when hardware ECC is available and can be left out for a smaller image size. Enable with CONFIG_MTD_ECC_SOFT. Signed-off-by: Christian Hitz <christian.hitz@aizo.com> Cc: Scott Wood <scottwood@freescale.com> Signed-off-by: Scott Wood <scottwood@freescale.com>
2012-01-26nand: Sanitize ONFI strings.Christian Hitz
[backport from linux commit 02f8c6aee8df3cdc935e9bdd4f2d020306035dbe] This is part of the synchronization with the nand driver to the Linux 3.0 state. Signed-off-by: Christian Hitz <christian.hitz@aizo.com> Cc: Scott Wood <scottwood@freescale.com> Signed-off-by: Scott Wood <scottwood@freescale.com>
2012-01-26nand: Merge changes to BBT from Linux nand driverChristian Hitz
[backport from linux commit 02f8c6aee8df3cdc935e9bdd4f2d020306035dbe] This patch synchronizes the nand driver with the Linux 3.0 state. Signed-off-by: Christian Hitz <christian.hitz@aizo.com> Cc: Scott Wood <scottwood@freescale.com> Signed-off-by: Scott Wood <scottwood@freescale.com>
2012-01-26nand: Merge changes from Linux nand driverChristian Hitz
[backport from linux commit 02f8c6aee8df3cdc935e9bdd4f2d020306035dbe] This patch synchronizes the nand driver with the Linux 3.0 state. Signed-off-by: Christian Hitz <christian.hitz@aizo.com> Cc: Scott Wood <scottwood@freescale.com> [scottwood@freescale.com: minor fixes] Signed-off-by: Scott Wood <scottwood@freescale.com>
2012-01-26nand: cleanup whitespaceChristian Hitz
Bring up to date with corresponding file from linux. Signed-off-by: Christian Hitz <christian.hitz@aizo.com> Cc: Scott Wood <scottwood@freescale.com> Signed-off-by: Scott Wood <scottwood@freescale.com>
2012-01-26nand: Add more NAND types from Linux nand driverChristian Hitz
[backport from linux commit 02f8c6aee8df3cdc935e9bdd4f2d020306035dbe] This patch merges the additional NAND flash types from the 3.0 Linux kernel. Signed-off-by: Christian Hitz <christian.hitz@aizo.com> Cc: Scott Wood <scottwood@freescale.com> Signed-off-by: Scott Wood <scottwood@freescale.com>
2012-01-26nand: Merge BCH code from Linux nand driverChristian Hitz
[backport from linux commit 02f8c6aee8df3cdc935e9bdd4f2d020306035dbe] This patch merges the BCH ECC algorithm from the 3.0 Linux kernel. This enables U-Boot to support modern NAND flash chips that require more than 1-bit of ECC in software. Signed-off-by: Christian Hitz <christian.hitz@aizo.com> Cc: Scott Wood <scottwood@freescale.com> Signed-off-by: Scott Wood <scottwood@freescale.com>
2012-01-26nand_spl_simple: store ecc data on the stackStefano Babic
Currently nand_spl_simple puts it's temp data at 0x10000 offset in SDRAM which is likely to contain already loaded data. The patch saves the oob data and the ecc on the stack replacing the fixed address in RAM. Signed-off-by: Stefano Babic <sbabic@denx.de> CC: Ilya Yanok <yanok@emcraft.com> CC: Scott Wood <scottwood@freescale.com> CC: Tom Rini <tom.rini@gmail.com> CC: Simon Schwarz <simonschwarzcor@googlemail.com> CC: Wolfgang Denk <wd@denx.de> Signed-off-by: Scott Wood <scottwood@freescale.com>
2011-12-24sf: Add spi_boot() to allow booting from SPI flash in an SPLChristian Riesch
Signed-off-by: Christian Riesch <christian.riesch@omicron.at> Cc: Heiko Schocher <hs@denx.de> Cc: Mike Frysinger <vapier@gentoo.org> Cc: Scott Wood <scottwood@freescale.com> Acked-by: Mike Frysinger <vapier@gentoo.org>
2011-12-07drivers/mtd/nand/nand_spl_load.c: Fix GCC 4.6 warningAnatolij Gustschin
Fix: nand_spl_load.c: In function 'nand_boot': nand_spl_load.c:31:6: warning: variable 'ret' set but not used [-Wunused-but-set-variable] Signed-off-by: Anatolij Gustschin <agust@denx.de> Cc: Heiko Schocher <hs@denx.de> Cc: Scott Wood <scottwood@freescale.com> Acked-by: Heiko Schocher <hs@denx.de> Acked-by: Marek Vasut <marek.vasut@gmail.com> Signed-off-by: Scott Wood <scottwood@freescale.com>
2011-12-07drivers/mtd/nand/nand_spl_simple.c: Fix GCC 4.6 warningsAnatolij Gustschin
Fix warnings for both cases: definded CONFIG_SYS_NAND_HW_ECC_OOBFIRST: nand_spl_simple.c: In function 'nand_read_page': nand_spl_simple.c:156:6: warning: variable 'stat' set but not used [-Wunused-but-set-variable] not definded CONFIG_SYS_NAND_HW_ECC_OOBFIRST: nand_spl_simple.c: In function 'nand_read_page': nand_spl_simple.c:196:6: warning: variable 'stat' set but not used [-Wunused-but-set-variable] Signed-off-by: Anatolij Gustschin <agust@denx.de> Cc: Heiko Schocher <hs@denx.de> Cc: Scott Wood <scottwood@freescale.com> Acked-by: Heiko Schocher <hs@denx.de> Acked-by: Marek Vasut <marek.vasut@gmail.com> Signed-off-by: Scott Wood <scottwood@freescale.com>
2011-12-06omap_gpmc: use SOFTECC in SPL if it's enabledIlya Yanok
Use software ECC for the SPL build if support for software ECC in SPL is enabled. Signed-off-by: Ilya Yanok <yanok@emcraft.com> Acked-by: Scott Wood <scottwood@freescale.com>
2011-12-06nand_spl_simple: add support for software ECCIlya Yanok
This patch adds support for software ECC to the nand_spl_simple driver. To enable this one have to define CONFIG_SPL_NAND_SOFTECC. Tested on OMAP3. Signed-off-by: Ilya Yanok <yanok@emcraft.com> Acked-by: Scott Wood <scottwood@freescale.com>
2011-12-06Fix regression in SMDK6400Simon Schwarz
s3c64xx.c implemented its own nand_read_byte, nand_write_buf and nand_read_buf functions. This provoked a regression when these functions were made public by patch 55f429bb39614a16b1bacc9a8bea9ac01a60bfc8. This deletes these duplicated functions from s3c64xx.c and adds the generic implementations in nand_base.c to the spl Makefile. It also adds -ffcuntion-sections and -gc-sections to the compilation flags of the SPL to avoid errors originating from unused functions in nand_base.c. Description of the regression: http://article.gmane.org/gmane.comp.boot-loaders.u-boot/108873 Signed-off-by: Simon Schwarz <simonschwarzcor@gmail.com> Cc: scottwood@freescale.com Cc: s-paulraj@ti.com Cc: albert.u.boot@aribaud.net
2011-12-06nand: Add common functions to linux/mtd/nand.hSimon Schwarz
Functions often used in SPL are now part of linux/mtd/nand.h. Static modifiers are removed from these functions in drivers/mtd/nand/nand_base.c. Signed-off-by: Simon Schwarz <simonschwarzcor@gmail.com> Cc: scottwood@freescale.com Cc: s-paulraj@ti.com Cc: albert.u.boot@aribaud.net Acked-by: Scott Wood <scottwood@freescale.com>
2011-12-05sf: fix erase debug outputVadim Bendebury
We want to show the length, so multiplying by sector size makes no sense. This is a hold over from the erase code before the big refactor. Signed-off-by: Vadim Bendebury <vbendeb@chromium.org> Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2011-11-29Fix Stelian's email addressStelian Pop
Change my old email address which is no longer valid. Signed-off-by: Stelian Pop <stelian@popies.net> Signed-off-by: Anatolij Gustschin <agust@denx.de>
2011-11-23Merge branch 'hs@denx.de' of git://git.denx.de/u-boot-stagingWolfgang Denk
* 'hs@denx.de' of git://git.denx.de/u-boot-staging: drivers/net/dnet.c: Fix GCC 4.6 warnings board/xaeniax/flash.c: Fix GCC 4.6 warnings net/bootp.c: Fix GCC 4.6 warning common/cmd_bootm.c: Fix GCC 4.6 warnings board/mx1ads/mx1ads.c: Fix GCC 4.6 warning board/mx1ads/syncflash.c: Fix GCC 4.6 warnings board/lubbock/flash.c: Fix GCC 4.6 warnings drivers/net/cs8900.c: Fix GCC 4.6 warning arch/arm/cpu/arm926ejs/omap/cpuinfo.c: Fix GCC 4.6 warnings drivers/net/lan91c96.c: Fix GCC 4.6 warning board/ronetix/pm9263/pm9263.c: Fix GCC 4.6 warning drivers/mtd/onenand/samsung.c: Fix GCC 4.6 warning drivers/usb/musb/musb_hcd.c: Fix GCC 4.6 warning
2011-11-23drivers/mtd/onenand/samsung.c: Fix GCC 4.6 warningAnatolij Gustschin
Fix: samsung.c: In function 's3c_onenand_check_lock_status': samsung.c:486:6: warning: variable 'tmp' set but not used [-Wunused-but-set-variable] Signed-off-by: Anatolij Gustschin <agust@denx.de>
2011-11-16drivers/mtd/dataflash.c: Fix GCC 4.6 warningAnatolij Gustschin
Fix: dataflash.c: In function 'AT91F_DataflashInit': dataflash.c:42:6: warning: variable 'last_part' set but not used [-Wunused-but-set-variable] Signed-off-by: Anatolij Gustschin <agust@denx.de>
2011-11-15GCC4.6: Squash warnings in onenand_base.cMarek Vasut
onenand_base.c: In function ‘onenand_do_lock_cmd’: onenand_base.c:1946:6: warning: variable ‘wp_status_mask’ set but not used [-Wunused-but-set-variable] onenand_base.c: In function ‘onenand_check_maf’: onenand_base.c:2229:8: warning: variable ‘name’ set but not used [-Wunused-but-set-variable] onenand_base.c: In function ‘flexonenand_get_boundary’: onenand_base.c:2258:6: warning: variable ‘ret’ set but not used [-Wunused-but-set-variable] Signed-off-by: Marek Vasut <marek.vasut@gmail.com> Cc: Wolfgang Denk <wd@denx.de> Cc: Scott Wood <scottwood@freescale.com> Cc: Kyungmin Park <kyungmin.park@samsung.com>
2011-11-15OneNAND: Add simple OneNAND SPLMarek Vasut
This introduces small OneNAND loader, fitting into 1kB of space (smallest possible OneNAND RAM size). Some devices equipped with such crappy chips will use this. Signed-off-by: Marek Vasut <marek.vasut@gmail.com> Cc: Albert ARIBAUD <albert.u.boot@aribaud.net> Cc: Kyungmin Park <kyungmin.park@samsung.com> Cc: Scott Wood <scottwood@freescale.com> V2: Introduce spl_onenand_load_image() to load data from OneNAND in SPL V3: Cleanup, align with nand_spl. Skip whole blocks.
2011-11-11iMX28: Add GPMI NAND driverMarek Vasut
Signed-off-by: Marek Vasut <marek.vasut@gmail.com> Cc: Scott Wood <scottwood@freescale.com> Cc: Stefano Babic <sbabic@denx.de> Cc: Wolfgang Denk <wd@denx.de> Cc: Detlev Zundel <dzu@denx.de>
2011-11-03spl, nand: add 4bit HW ecc oob first nand_read_page functionHeiko Schocher
similiar to commit dc7cd8e59ba077f3b4c1a4557c9cd86a31b9ab1f, only adapted for the new spl framework. Signed-off-by: Heiko Schocher <hs@denx.de> Acked-by: Tom Rini <trini@ti.com> Acked-by: Scott Wood <scottwood@freescale.com> Cc: Albert ARIBAUD <albert.u.boot@aribaud.net> Cc: Sandeep Paulraj <s-paulraj@ti.com> Signed-off-by: Sandeep Paulraj <s-paulraj@ti.com>
2011-11-03arm, davinci: add support for new spl frameworkHeiko Schocher
Signed-off-by: Heiko Schocher <hs@denx.de> Cc: Albert ARIBAUD <albert.u.boot@aribaud.net> Cc: Sandeep Paulraj <s-paulraj@ti.com> Cc: Scott Wood <scottwood@freescale.com> Signed-off-by: Sandeep Paulraj <s-paulraj@ti.com>
2011-10-27GCC4.6: Use debug() instead of debugX() in s3c24xx_nand.cMarek Vasut
The debugX() macro was always used with debug level 1. There is no point to use it here instead of debug(). Signed-off-by: Marek Vasut <marek.vasut@gmail.com> Cc: Wolfgang Denk <wd@denx.de> Cc: Simon Glass <sjg@chromium.org> Cc: Mike Frysinger <vapier@gentoo.org>
2011-10-27GCC4.6: Squash warning in jedec_flash.cMarek Vasut
jedec_flash.c: In function 'fill_info': jedec_flash.c:393: warning: format '%x' expects type 'unsigned int', but argument 2 has type 'ulong' jedec_flash.c:393: warning: format '%x' expects type 'unsigned int', but argument 3 has type 'ulong' jedec_flash.c:402: warning: format '%d' expects type 'int', but argument 2 has type 'ulong' jedec_flash.c:402: warning: format '%d' expects type 'int', but argument 3 has type 'ulong' Signed-off-by: Marek Vasut <marek.vasut@gmail.com> Cc: Wolfgang Denk <wd@denx.de> Cc: Simon Glass <sjg@chromium.org> Cc: Mike Frysinger <vapier@gentoo.org> Cc: Scott Wood <scottwood@freescale.com>
2011-10-27GCC4.6: Squash warning in cfi_flash.cMarek Vasut
cfi_flash.c: In function 'flash_protect_default': cfi_flash.c:2152: warning: format '%08x' expects type 'unsigned int', but argument 2 has type 'ulong' cfi_flash.c:2152: warning: format '%08x' expects type 'unsigned int', but argument 3 has type 'long unsigned int' Signed-off-by: Marek Vasut <marek.vasut@gmail.com> Cc: Wolfgang Denk <wd@denx.de> Cc: Simon Glass <sjg@chromium.org> Cc: Mike Frysinger <vapier@gentoo.org> Cc: Scott Wood <scottwood@freescale.com>
2011-10-23spi/eon: add support for new EON spi flash EN25Q32BShaohui Xie
Signed-off-by: Shaohui Xie <Shaohui.Xie@freescale.com>
2011-10-12Merge branch 'master' of git://git.denx.de/u-boot-mipsWolfgang Denk
* 'master' of git://git.denx.de/u-boot-mips: MIPS: Jz4740: Add qi_lb60 board support MIPS: Jz4740: Add NAND driver MIPS: Ingenic XBurst Jz4740 processor support
2011-10-12Merge branch 'master' of git://git.denx.de/u-boot-ubiWolfgang Denk
* 'master' of git://git.denx.de/u-boot-ubi: UBI: init eba tables before wl when attaching a device ubifs bad superblock bug
2011-10-12MIPS: Jz4740: Add NAND driverXiangfu Liu
Jz4740 NAND flash controller can support: * MLC NAND as well as SLC NAND * all 8-bit/16-bit NAND flash devices * HAMMING and RS hardware ECC * automatic boot up from NAND flash devices nand_ecclayout is set up for 2GiB NAND chip mounted in Qi LB60. We'll bring up boot-from-NAND support in nand_spl/ in the future. Signed-off-by: Xiangfu Liu <xiangfu@openmobilefree.net> Acked-by: Daniel <zpxu@ingenic.cn> Signed-off-by: Shinya Kuribayashi <skuribay@pobox.com>