summaryrefslogtreecommitdiff
path: root/drivers/mtd/nand/nand.c
Commit message (Collapse)AuthorAgeLines
* nand: Introduce CONFIG_SYS_NAND_SELF_INITScott Wood2012-01-26-37/+59
| | | | | | | | | | | | | 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>
* nand: fix bug with multiple NAND devices if CONFIG_MTD_DEVICE is defined.Alexander Holler2011-01-12-1/+1
| | | | | | The variable i has to be static, otherwise it would be always zero. Signed-off-by: Alexander Holler <holler@ahsoftware.de>
* Replace CONFIG_RELOC_FIXUP_WORKS by CONFIG_NEEDS_MANUAL_RELOCWolfgang Denk2010-10-29-1/+1
| | | | | | | | | | | By now, the majority of architectures have working relocation support, so the few remaining architectures have become exceptions. To make this more obvious, we make working relocation now the default case, and flag the remaining cases with CONFIG_NEEDS_MANUAL_RELOC. Signed-off-by: Wolfgang Denk <wd@denx.de> Tested-by: Heiko Schocher <hs@denx.de> Tested-by: Reinhard Meyer <u-boot@emk-elektronik.de>
* Conditionally perform common relocation fixupsPeter Tyser2009-10-03-0/+2
| | | | | | | | | | | Add #ifdefs where necessary to not perform relocation fixups. This allows boards/architectures which support relocation to trim a decent chunk of code. Note that this patch doesn't add #ifdefs to architecture-specific code which does not support relocation. Signed-off-by: Peter Tyser <ptyser@xes-inc.com>
* mtd: Introduce CONFIG_MTD_DEVICE to select compilation of mtdcore.oStefan Roese2009-06-12-1/+1
| | | | | | | | | | | | | This new define enables mtdcore.c compilation and with this we can select the MTD device infrastructure needed for the reworked mtdparts command. We now have the 2 MTD infrastructure defines, CONFIG_MTD_DEVICE and CONFIG_MTD_PARTITIONS. CONFIG_MTD_DEVICE is needed (as explained above) for the "mtdparts" command and CONFIG_MTD_PARTITIONS is needed for UBI. Signed-off-by: Stefan Roese <sr@denx.de> Cc: Scott Wood <scottwood@freescale.com>
* mtd: nand/onenand: Register mtd device upon device scanningStefan Roese2009-04-28-0/+12
| | | | | | | | | With this patch the NAND and OneNAND devices are registered in the MTD subsystem and can then be referenced by the mtdcore code (e.g. get_mtd_device_nm()). This is needed for the new "ubi part" command syntax without the flash type parameter (nor|nand|onenand). Signed-off-by: Stefan Roese <sr@denx.de>
* Enable multi chip support in the NAND layerWolfgang Grandegger2009-03-23-1/+5
| | | | | | | | | | This patch adds support for NAND_MAX_CHIPS to the MTD NAND layer. Multi-chips devices are displayed as shown: Device 0: 2x NAND 512MiB 3,3V 8-bit, sector size 128 KiB Signed-off-by: Wolfgang Grandegger <wg@grandegger.com> Signed-off-by: Scott Wood <scottwood@freescale.com>
* NAND: Fixed invalid pointers to static relocated chip namesValeriy Glushkov2009-02-06-0/+4
| | | | | | | | | | Dear Wolfgang, You are right, the patch was ugly. The new one seems to be better. Signed-off-by: Valeriy Glushkov <gvv@lstec.com> Signed-off-by: Scott Wood <scottwood@freescale.com>
* NAND: move board_nand_init to nand.hMike Frysinger2009-01-23-2/+0
| | | | | | | | | | | Rather than putting the function prototype for board_nand_init() in the one place where it gets called, put it into nand.h so that every place that also defines it gets the prototype. Otherwise, errors can go silently unnoticed such as using the wrong return value (void rather than int) when defining the function. Signed-off-by: Mike Frysinger <vapier@gentoo.org> Signed-off-by: Scott Wood <scottwood@freescale.com>
* rename CFG_ macros to CONFIG_SYSJean-Christophe PLAGNIOL-VILLARD2008-10-18-7/+7
| | | | Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
* Fix the NAND size overflow issue.Jason Jin2008-10-14-2/+2
| | | | | | | | | | | | | When the total size of all NAND devices exceeds 4 GiB, the size will overflow. This patch tries to fix this. Note that we still have a problem when a single NAND device is bigger than 4 GiB: then the overflow would actually happen earlier, i. e. when storing the size in nand_info[].size, as nand_info[].size is an "u_int32_t". Signed-off-by: Jason Jin <Jason.jin@freescale.com> Signed-off-by: Wolfgang Denk <wd@denx.de>
* drivers/mtd/nand: Move conditional compilation to MakefileJean-Christophe PLAGNIOL-VILLARD2008-08-13-5/+0
| | | | | | rename CFG_NAND_LEGACY to CONFIG_NAND_LEGACY Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
* MTD/NAND: Fix printf format warning in nand codeStefan Roese2008-07-10-1/+1
| | | | | | | | | 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>
* drivers/mtd : move mtd drivers to drivers/mtdJean-Christophe PLAGNIOL-VILLARD2007-11-25-0/+83
Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>