summaryrefslogtreecommitdiffstats
path: root/drivers/mtd
Commit message (Collapse)AuthorAgeFilesLines
* s5pc1xx: support onenand driverMinkyu Kang2009-10-132-0/+637
| | | | | | | This patch includes the onenand driver for s5pc100 Signed-off-by: Minkyu Kang <mk7.kang@samsung.com> Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
* Conditionally perform common relocation fixupsPeter Tyser2009-10-031-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>
* NAND: davinci: Fix warnings when 4-bit ECC not usedScott Wood2009-09-281-2/+1
| | | | | | | | | I accidentally left v2 of "NAND: DaVinci:Adding 4 BIT ECC support" applied when I pushed the tree last merge window, and missed these fixes which were in v3 of that patch. Signed-off-by: Sandeep Paulraj <s-paulraj@ti.com> Signed-off-by: Scott Wood <scottwood@freescale.com>
* mpc512x. Micron nand flash needs a reset before a read command is issued.Paul Gibson2009-09-221-0/+1
| | | | | Micron nand flash needs a reset before a read command is issued. The current mpc5121_nfc driver ignores the reset command.
* ppc4xx: Big cleanup of PPC4xx definesStefan Roese2009-09-111-2/+2
| | | | | | | | | | | | | | | | This patch cleans up multiple issues of the 4xx register (mostly DCR, SDR, CPR, etc) definitions: - Change lower case defines to upper case (plb4_acr -> PLB4_ACR) - Change the defines to better match the names from the user's manuals (e.g. cprpllc -> CPR0_PLLC) - Removal of some unused defines Please test this patch intensive on your PPC4xx platform. Even though I tried not to break anything and tested successfully on multiple 4xx AMCC platforms, testing on custom platforms is recommended. Signed-off-by: Stefan Roese <sr@denx.de>
* mxc_nand: Remove Freescale's "All Rights Reserved."Scott Wood2009-09-041-1/+1
| | | | Signed-off-by: Scott Wood <scottwood@freescale.com>
* NAND: DaVinci: V2 Adding 4 BIT ECC supportSandeep Paulraj2009-08-261-2/+282
| | | | | | | | This patch adds 4 BIT ECC support in the DaVinci NAND driver. Tested on both the DM355 and DM365. Signed-off-by: Sandeep Paulraj <s-paulraj@ti.com> Signed-off-by: Scott Wood <scottwood@freescale.com>
* MTD:NAND: ADD new ECC mode NAND_ECC_HW_OOB_FIRSTSandeep Paulraj2009-08-261-0/+59
| | | | | | | | | | | | | | | | | This patch adds the new mode NAND_ECC_HW_OOB_FIRST in the nand code to support 4-bit ECC on TI DaVinci devices with large page (up to 2K) NAND chips. This ECC mode is similar to NAND_ECC_HW, with the exception of read_page API that first reads the OOB area, reads the data in chunks, feeds the ECC from OOB area to the ECC hw engine and perform any correction on the data as per the ECC status reported by the engine. This patch has been accepted by Andrew Morton and can be found at http://userweb.kernel.org/~akpm/mmotm/broken-out/mtd-nand-add-new-ecc-mode-ecc_hw_oob_first.patch Signed-off-by: Sandeep Paulraj <s-paulraj@ti.com> Signed-off-by: Sneha Narnakaje <nsnehaprabha@ti.com> Signed-off-by: Scott Wood <scottwood@freescale.com>
* mxc_nand: add nand driver for MX2/MX3Ilya Yanok2009-08-262-0/+881
| | | | | | | | | Driver for NFC NAND controller found on Freescale's MX2 and MX3 processors. Ported from Linux. Tested only with i.MX27 but should works with other MX2 and MX3 processors too. Signed-off-by: Ilya Yanok <yanok@emcraft.com> Signed-off-by: Scott Wood <scottwood@freescale.com>
* NAND: ADD page Parameter to all read_page/read_page_raw API'sSandeep Paulraj2009-08-262-8/+10
| | | | | | | | | | | | | | | | This patch adds a new "page" parameter to all NAND read_page/read_page_raw APIs. The read_page API for the new mode ECC_HW_OOB_FIRST requires the page information to send the READOOB command and read the OOB area before the data area. This patch has been accepted by Andrew Morton and can be found at http://userweb.kernel.org/~akpm/mmotm/broken-out/mtd-nand-add-page-parameter-to-all-read_page-read_page_raw-apis.patch WE would like this to become part of the u-boot GIT as well Signed-off-by: Sandeep Paulraj <s-paulraj@ti.com> Signed-off-by: Sneha Narnakaje <nsnehaprabha@ti.com> Signed-off-by: Scott Wood <scottwood@freescale.com>
* 83xx, kmeter1: added NAND supportHeiko Schocher2009-08-262-0/+136
| | | | | Signed-off-by: Heiko Schocher <hs@denx.de> Signed-off-by: Scott Wood <scottwood@freescale.com>
* OneNAND: Remove unused read_spareramKyungmin Park2009-08-261-3/+1
| | | | | | | Remove unused read_spareram and add unlock_all as kernel does Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com> Signed-off-by: Scott Wood <scottwood@freescale.com>
* KB9202: Add NAND supportMatthias Kaehlcke2009-08-262-0/+151
| | | | | | | Add KB9202 NAND driver Signed-off-by: Matthias Kaehlcke <matthias@kaehlcke.net> Signed-off-by: Scott Wood <scottwood@freescale.com>
* Support up to 7 banks for ids as specified in JEDEC JEP106ZNiklaus Giger2009-08-262-2/+80
| | | | | | | | see http://www.jedec.org/download/search/jep106Z.pdf Add some second source legacy flash chips 256x8. Signed-off-by: Niklaus Giger <niklaus.giger@member.fsf.org> Signed-off-by: Stefan Roese <sr@denx.de>
* ppc4xx: Fix ECC Correction bug with SMC ordering for NDFC driverFeng Kan2009-08-251-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | Fix ECC Correction bug where the byte offset location were double flipped causing correction routine to toggle the wrong byte location in the ECC segment. The ndfc_calculate_ecc routine change the order of getting the ECC code. /* The NDFC uses Smart Media (SMC) bytes order */ ecc_code[0] = p[2]; ecc_code[1] = p[1]; ecc_code[2] = p[3]; But in the Correction algorithm when calculating the byte offset location, the s1 is used as the upper part of the address. Which again reverse the order making the final byte offset address location incorrect. byteoffs = (s1 << 0) & 0x80; . . byteoffs |= (s0 >> 4) & 0x08; The order is change to read it in straight and let the correction function to revert it to SMC order. Signed-off-by: Feng Kan <fkan@amcc.com> Acked-by: Victor Gallardo <vgallardo@amcc.com> Acked-by: Prodyut Hazarika <phazarika@amcc.com> Signed-off-by: Stefan Roese <sr@denx.de>
* eeprom_m95xxx: remove unused variable iJean-Christophe PLAGNIOL-VILLARD2009-08-211-1/+0
| | | | Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
* add WATCHDOG_RESET() on nand write and readGiulio Benetti2009-08-211-0/+4
| | | | | | Signed-off-by: giulio.benetti@micronovasrl.com Acked-by: Wolfgang Denk <wd@denx.de> Signed-off-by: Scott Wood <scottwood@freescale.com>
* flash: Fix CFI buffer size bugJohn Schmoller2009-08-131-1/+1
| | | | | | | | | | | | Fix bug introduced by 9c048b523413ae5f3ff34e00cf57569c3368ab51. The cfi_flash.c driver cast the flash buffer size to a uchar in flash_write_cfibuffer(). On some flash parts, (tested on Numonyx part PC32F512M29EWH), the buffer size is 1KB. Remove the cast to uchar to enable buffer sizes to be larger. Signed-off-by: John Schmoller <jschmoller@xes-inc.com> Signed-off-by: Stefan Roese <sr@denx.de>
* Add driver for the ST M95xxx SPI EEPROMAlbin Tonnerre2009-08-092-0/+118
| | | | | | | | This chip is used in a number of boards manufactured by Calao-Systems which should be supported soon. This driver provides the necessary spi_read and spi_write functions necessary to communicate with the chip. Signed-off-by: Albin Tonnerre <albin.tonnerre@free-electrons.com>
* omap3: replace all instances of gpmc config struct by one globalDirk Behme2009-08-081-17/+16
| | | | | Signed-off-by: Matthias Ludwig <mludwig@ultratronik.de> Signed-off-by: Dirk Behme <dirk.behme@googlemail.com>
* omap3: remove typedefs for configuration structsDirk Behme2009-08-081-1/+1
| | | | | Signed-off-by: Matthias Ludwig <mludwig@ultratronik.de> Signed-off-by: Dirk Behme <dirk.behme@googlemail.com>
* omap3: embedd gpmc_cs into gpmc config structMatthias Ludwig2009-08-071-15/+7
| | | | | | | | | Embedd chip select configuration into struct for gpmc config instead of having it completely separated as suggested by Wolfgang Denk on http://lists.denx.de/pipermail/u-boot/2009-May/052247.html Signed-off-by: Matthias Ludwig <mludwig@ultratronik.de>
* Remove legacy NAND and disk on chip code.Scott Wood2009-07-164-1663/+0
| | | | | | | | | | | | | Legacy NAND had been scheduled for removal. Any boards that use this were already not building in the previous release due to an #error. The disk on chip code in common/cmd_doc.c relies on legacy NAND, and it has also been removed. There is newer disk on chip code in drivers/mtd/nand; someone with access to hardware and sufficient time and motivation can try to get that working, but for now disk on chip is not supported. Signed-off-by: Scott Wood <scottwood@freescale.com>
* nand: ndfc: Remove unnecessary #ifdef'sStefan Roese2009-07-161-6/+0
| | | | | | | | | Now that the 4xx NAND driver ndfc is moved to the common NAND driver directory we don't need this #ifdef's anymore. Signed-off-by: Stefan Roese <sr@denx.de> Cc: Scott Wood <scottwood@freescale.com> Signed-off-by: Scott Wood <scottwood@freescale.com>
* nand/ppc4xx: Move PPC4xx NAND driver to common NAND driver directoryStefan Roese2009-07-162-0/+224
| | | | | | Signed-off-by: Stefan Roese <sr@denx.de> Cc: Scott Wood <scottwood@freescale.com> Signed-off-by: Scott Wood <scottwood@freescale.com>
* nand: fixed failed reads on corrected ECC errors in nand_util.cValeriy Glushkov2009-07-161-5/+5
| | | | | | Signed-off-by: Valeriy Glushkov <gvv@lstec.com> Signed-off-by: Paulraj, Sandeep <s-paulraj@ti.com> Signed-off-by: Scott Wood <scottwood@freescale.com>
* Typo fix: use CONFIG_SOC_DM644X, not CONFIG_SOC_DM646.David Brownell2009-07-161-1/+1
| | | | | Signed-off-by: David Brownell <dbrownell@users.sourceforge.net> Signed-off-by: Scott Wood <scottwood@freescale.com>
* mtd: cfi - if defined, use MAX_FLASH_BANKS_DETECT for static declarationsKim Phillips2009-07-161-2/+9
| | | | | | | | | | | | | a.k.a cfi_mtd.c does as cfi_flash.c does. This also prevents the TQM834x build from doing a: cfi_mtd.c:36: error: variably modified 'cfi_mtd_info' at file scope cfi_mtd.c:37: error: variably modified 'cfi_mtd_names' at file scope using gcc 4.4. Signed-off-by: Kim Phillips <kim.phillips@freescale.com> Signed-off-by: Stefan Roese <sr@denx.de>
* Merge branch 'master' of git://git.denx.de/u-boot-armWolfgang Denk2009-07-132-0/+83
|\
| * nand: Add Marvell Kirkwood NAND driverPrafulla Wadaskar2009-07-082-0/+83
| | | | | | | | | | | | | | This patch adds a NAND driver for the Marvell Kirkwood SoC's Signed-off-by: Prafulla Wadaskar <prafulla@marvell.com> Acked-by: Scott Wood <scottwood@freescale.com>
* | issue write command to base for JEDEC flashPo-Yu Chuang2009-07-131-3/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | For JEDEC flash, we should issue word programming command relative to base address rather than sector base address. Original source makes SST Flash fails to program sectors which are not on the 0x10000 boundaries. e.g. SST39LF040 uses addr1=0x5555 and addr2=0x2AAA, however, each sector is 0x1000 bytes. Thus, if we issue command to "sector base (0x41000) + offset(0x5555)", it sends to 0x46555 and the chip fails to recognize that address. This patch is tested with SST39LF040. Signed-off-by: Po-Yu Chuang <ratbert@faraday-tech.com> Signed-off-by: Stefan Roese <sr@denx.de>
* | fsl_elbc_nand: redirect the pointer of bbt pattern to RAMMingkai Hu2009-07-071-0/+4
| | | | | | | | | | | | | | | | | | | | | | The bbt descriptors contains the pointer to the bbt pattern which are statically initialized memory struct. When relocated to RAM, these pointers will continue point to NOR flash(or L2 SRAM, or other boot device). If the contents of NOR flash changed or L2 SRAM disabled, it'll hang the system. Signed-off-by: Mingkai Hu <Mingkai.hu@freescale.com> Signed-off-by: Scott Wood <scottwood@freescale.com>
* | Bug-fix in drivers mtd nand Makefilekevin.morfitt@fearnside-systems.co.uk2009-07-071-1/+1
| | | | | | | | | | | | | | | | The S3C2410 NAND driver source file is included in the makefile instead of the object file. Signed-off-by: Kevin Morfitt <kevin.morfitt@fearnside-systems.co.uk> Signed-off-by: Scott Wood <scottwood@freescale.com>
* | mtd: nand: use loff_t for offsetJean-Christophe PLAGNIOL-VILLARD2009-07-071-10/+10
| | | | | | | | | | | | | | | | nand_util currently uses size_t which is arch dependent and not always a unsigned long. Now use loff_t, as does the linux mtd layer. Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com> Signed-off-by: Scott Wood <scottwood@freescale.com>
* | mtd: nand: new base driver for memory mapped nand devicesMike Frysinger2009-07-072-0/+54
| | | | | | | | | | | | | | | | | | The BF537-STAMP Blackfin board had a driver for working with NAND devices that are simply memory mapped. Since there is nothing Blackfin specific about this, generalize the driver a bit so that everyone can leverage it. Signed-off-by: Mike Frysinger <vapier@gentoo.org> Signed-off-by: Scott Wood <scottwood@freescale.com>
* | davinci_nand chipselect/init cleanupDavid Brownell2009-07-071-20/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Update chipselect handling in davinci_nand.c so that it can handle 2 GByte chips the same way Linux does: as one device, even though it has two halves with independent chip selects. For such chips the "nand info" command reports: Device 0: 2x nand0, sector size 128 KiB Switch to use the default chipselect function unless the board really needs its own. The logic for the Sonata board moves out of the driver into board-specific code. (Which doesn't affect current build breakage if its NAND support is enabled...) Signed-off-by: David Brownell <dbrownell@users.sourceforge.net> Signed-off-by: Scott Wood <scottwood@freescale.com>
* | davinci_nand: cleanup II (CONFIG_SYS_DAVINCI_BROKEN_ECC)David Brownell2009-07-071-205/+13
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Remove CONFIG_SYS_DAVINCI_BROKEN_ECC option. It's not just nasty; it's also unused by any current boards, and doesn't even match the main U-Boot distributions from TI (which use soft ECC, or 4-bit ECC on newer chips that support it). DaVinci GIT kernels since 2.6.24, and mainline Linux since 2.6.30, match non-BROKEN code paths for 1-bit HW ECC. The BROKEN code paths do seem to partially match what MontaVista/TI kernels (4.0/2.6.10, and 5.0/2.6.18) do ... but only for small pages. Large page support is really broken (and it's unclear just what software it was trying to match!), and the ECC layout was making three more bytes available for use by filesystem (or whatever) code. Since this option itself seems broken, remove it. Add a comment about the MV/TI compat issue, and the most straightforward way to address it (should someone really need to solve it). Signed-off-by: David Brownell <dbrownell@users.sourceforge.net> Signed-off-by: Scott Wood <scottwood@freescale.com>
* | davinci_nand: cleanup I (minor)David Brownell2009-07-071-33/+22
|/ | | | | | | | | | | | | | | | | | | | | | | | Minor cleanup for DaVinci NAND code: - Use I/O addresses from nand_chip; CONFIG_SYS_NAND_BASE won't be defined when there are multiple chipselect lines in use (as with common 2 GByte chips). - Cleanup handling of EMIF control registers * Only need one pointer pointing to them * Remove incorrect and unused struct supersetting them - Use the standard waitfunc; we don't need a custom version - Partial legacy cleanup: * Don't initialize every board like it's a DM6446 EVM * #ifdef a bit more code for BROKEN_ECC Sanity checked with small page NAND on dm355 and dm6446 EVMs; and large page on dm355 EVM (packaged as two devices, not one). Signed-off-by: David Brownell <dbrownell@users.sourceforge.net> Signed-off-by: Scott Wood <scottwood@freescale.com>
* Merge branch 'master' of git://git.denx.de/u-boot-armWolfgang Denk2009-07-071-9/+3
|\ | | | | | | | | | | | | Conflicts: drivers/spi/Makefile Signed-off-by: Wolfgang Denk <wd@denx.de>
| * ARM DaVinci: EMIF settingsThomas Lange2009-07-061-9/+3
| | | | | | | | | | | | | | | | | | | | | | NAND module should not modify EMIF registers unrelated to CS2 that is used for NAND, i.e. do not modify EWAIT config register or registers for other Chip Selects. Without this patch, EMIF configurations made in board_init() will be invalidated. Signed-off-by: Thomas Lange <thomas@corelatus.se>
* | Merge branch 'master' of git://git.denx.de/u-boot-ubiWolfgang Denk2009-07-071-1/+1
|\ \
| * | UBI: Fix build problem noticed on Apollon (arm/testing repo)Stefan Roese2009-07-071-1/+1
| |/ | | | | | | | | | | | | | | | | This patch fixes a build problem noticed on Apollon by using mtd_dev_by_eb() instead of "/" as done in the Linux UBI version. So this brings the U-Boot UBI version more in sync with the Linux version again. Signed-off-by: Stefan Roese <sr@denx.de>
* | sf: Macronix additional chips supportedPrafulla Wadaskar2009-07-061-12/+37
| | | | | | | | | | | | | | | | | | | | | | | | | | new chips supported:- MX25L1605D, MX25L3205D, MX25L6405D, MX25L12855E out of which MX25L6405D and MX25L12855E tested on Kirkwood platforms Modified the Macronix flash support to use 2 bytes of device id instead of 1 This was required to support MX25L12855E Signed-off-by: Piyush Shah <spiyush@marvell.com> Signed-off-by: Prafulla Wadaskar <prafulla@marvell.com> Signed-off-by: Mike Frysinger <vapier@gentoo.org>
* | sf: sst: add sst25vf###b idsMike Frysinger2009-07-061-0/+16
| | | | | | | | Signed-off-by: Mike Frysinger <vapier@gentoo.org>
* | sf: sst: fix sector sizeMike Frysinger2009-07-061-4/+4
|/ | | | | | | | Looks like when I was encoding the sector sizes, I forgot to divide by 8 (due to the stupid marketing driven process that declares all sizes in useless megabits and not megabytes). Signed-off-by: Mike Frysinger <vapier@gentoo.org>
* nand/mpc512x: Add MPC512x NAND support (NFC)Stefan Roese2009-06-122-0/+693
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch adds NAND Flash Controller driver for MPC5121 revision 2. All device features, except hardware ECC and power management, are supported. This NFC driver replaces the one orignally posted by John Rigby: "[PATCH] Freescale NFC NAND driver" It's a port of the Linux driver version posted by Piotr Ziecik a few weeks ago. Using this driver has the following advantages (from my point of view): - Compatibility with the Linux NAND driver (e.g. ECC usage) - Better code quality in general - Resulting U-Boot image is a bit smaller (approx. 3k) - Better to sync with newer Linux driver versions The only disadvantage I can see, is that HW-ECC is not supported right now. But this could be added later (e.g. port from Linux driver after it's supported there). Using HW-ECC on the MCP5121 NFC has a general problem because of the ECC usage in the spare area. This collides with JFFS2 for example. Signed-off-by: Stefan Roese <sr@denx.de> Cc: Piotr Ziecik <kosmo@semihalf.com> Cc: Wolfgang Denk <wd@denx.de> Cc: John Rigby <jcrigby@gmail.com> Cc: Scott Wood <scottwood@freescale.com>
* UBI: Add compile-time check for correct malloc area configurationStefan Roese2009-06-121-0/+4
| | | | | | | | UBI is quite memory greedy and requires at least approx. 512k of malloc area. This patch adds a compile-time check, so that boards will not build with less memory reserved for this area (CONFIG_SYS_MALLOC_LEN). Signed-off-by: Stefan Roese <sr@denx.de>
* sf: new Macronix MX25xx SPI flash driverPrafulla Wadaskar2009-06-124-0/+319
| | | | | | | | | Added macronix SF driver for MTD framework MX25L12805D is supported and tested TBD: sector erase implementation, other deivces support Signed-off-by: Prafulla Wadaskar <prafulla@marvell.com> Signed-off-by: Mike Frysinger <vapier@gentoo.org>
* sf: atmel: implement power-of-two write/erase funcsTodor I Mollov2009-06-121-0/+139
| | | | | | Signed-off-by: Todor I Mollov <tmollov@ucsd.edu> Signed-off-by: Mike Frysinger <vapier@gentoo.org> CC: Haavard Skinnemoen <haavard.skinnemoen@atmel.com>
* mtd: Introduce CONFIG_MTD_DEVICE to select compilation of mtdcore.oStefan Roese2009-06-123-3/+4
| | | | | | | | | | | | | 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>
OpenPOWER on IntegriCloud