summaryrefslogtreecommitdiffstats
path: root/drivers/mtd
Commit message (Collapse)AuthorAgeFilesLines
* Merge branch 'for-next/mtd'Sascha Hauer2012-12-073-60/+6
|\
| * mtd core: call driver write function with complete bufferSascha Hauer2012-12-071-53/+3
| | | | | | | | | | | | | | | | | | | | mtd->write is supposed to loop around pages internally, no need to do this in mtd_write. This fixes a huge write performance drop with the m25p80 driver when it was converted to a mtd driver recently. Since mtd->writesize is 1 for this driver mtd_write ended up doing single byte writes on the flash. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * mtd nand: allow partial page writesSascha Hauer2012-12-071-7/+0
| | | | | | | | | | | | | | | | | | | | | | The nand layer handles partial page writes just fine. If the start or end of the data is not page aligned, the nand layer will copy the data to a temporary page buffer. Remove the check which disallows partial page writes since this is what we want to do on barebox when for example an image is written to nand which is not padded to page size. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * mtd oob: do not register oob device for devices without oobSascha Hauer2012-11-291-0/+3
| | | | | | | | Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | mtd: nand: mxs: reset BCH earlier, too, to avoid NAND startup problemsWolfram Sang2012-12-061-3/+10
|/ | | | | | | | | | | It could happen (1 out of 100 times) that NAND did not start up correctly after warm rebooting, so barebox could not find its environment or DMA timed out due to a stalled BCH. When resetting BCH together with GPMI, the issue could not be observed anymore. We probably need the consistent state already before sending commands to NAND. Signed-off-by: Wolfram Sang <w.sang@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* Revert "mtd: atmel_nand: optimize read/write buffer functions"Jean-Christophe PLAGNIOL-VILLARD2012-11-261-8/+25
| | | | | | | | | | | As in the kernel we revert as this was supposed to work but does not yet this may need more work on the smc to be able to use it So for now revert it This reverts commit 809f0f6327241504b5071622a8d573255f91a875. Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* atmel_nand: fix pmecc timeoutJean-Christophe PLAGNIOL-VILLARD2012-11-261-1/+1
| | | | | | | | | | the timeout is 100ms not 100ns on sam9x5 the SoC is fast enough so we can not see it but not on sam9n12 Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* m25p80: sync flash support with the kernelJean-Christophe PLAGNIOL-VILLARD2012-11-201-9/+33
| | | | | Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* m25p80: re-import it againt mtd_add_hostJean-Christophe PLAGNIOL-VILLARD2012-11-203-0/+965
| | | | | | | | | | | | so we now create the cdev via mtd This will also simplify sync with linux to avoid the m25p8000 or m25p00 the cdev is still named name m25p and the drivers m25p80 Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* nand-bb: Fix remove of nand-bb device.Juergen Kilb2012-11-201-0/+1
| | | | | | | | Fixed possible crashs if nand-bb device is removed and the list entry was not deleted from the list. Signed-off-by: Juergen Kilb <J.Kilb@phytec.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* Merge branch 'for-next/mxs'Sascha Hauer2012-11-161-3/+9
|\
| * mtd: nand: mxs: check for errors when resetting ip coreWolfram Sang2012-10-311-3/+9
| | | | | | | | | | Signed-off-by: Wolfram Sang <w.sang@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | Merge branch 'for-next/mtd'Sascha Hauer2012-11-1616-53/+1793
|\ \ | | | | | | | | | | | | Conflicts: arch/arm/configs/at91sam9x5ek_defconfig
| * | mtd: introduce mtd_block_isbadJean-Christophe PLAGNIOL-VILLARD2012-11-034-5/+14
| | | | | | | | | | | | | | | | | | | | | | | | this allow to do not provide block_isbad at mtd driver level as example spi flash Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | mtd: dataflash: fix spi_transfer initJean-Christophe PLAGNIOL-VILLARD2012-11-021-0/+6
| | | | | | | | | | | | | | | | | | | | | | | | on some system as the spi_transfer is not set to 0 if the rx_buf or tx_buf are not used they are not set to NULL Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | nand: atmel add pmecc supportJean-Christophe PLAGNIOL-VILLARD2012-10-213-45/+859
| | | | | | | | | | | | | | | | | | | | | This patch is from linux 3.7-rc1 and adapt to Barebox Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | mtd: add parent supportJean-Christophe PLAGNIOL-VILLARD2012-10-179-2/+14
| | | | | | | | | | | | | | | Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | mtd: register device a pure deviceJean-Christophe PLAGNIOL-VILLARD2012-10-161-1/+1
| | | | | | | | | | | | | | | | | | | | | as we do not need to probe them and they have no driver or bus attached Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | mtd: add dataflash supportJean-Christophe PLAGNIOL-VILLARD2012-10-153-0/+899
| | | | | | | | | | | | | | | | | | from linux 3.6 Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
* | | Merge branch 'for-next/misc'Sascha Hauer2012-11-161-3/+3
|\ \ \ | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: commands/Makefile Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | | nomadik_nand: switch to named resourceJean-Christophe PLAGNIOL-VILLARD2012-10-301-3/+3
| | | | | | | | | | | | | | | | | | | | Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | | | Merge branch 'for-next/imx'Sascha Hauer2012-11-161-7/+0
|\ \ \ \ | |_|_|/ |/| | | | | | | | | | | | | | | | | | | Conflicts: arch/arm/boards/guf-neso/lowlevel.c arch/arm/boards/pcm038/lowlevel.c commands/Makefile
| * | | ARM i.MX: get rid of imx-regs.hSascha Hauer2012-10-171-1/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - remove now unused __REG definitions - include individual SoC register files instead of imx-regs.h - move IMX_GPIO_NR to generic.h - finally remove imx-regs.h Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | | Merge branch 'for-next/clk' into for-next/imxSascha Hauer2012-10-171-6/+0
| |\ \ \ | | |_|/ | |/| | | | | | | | | | Conflicts: drivers/net/fec_imx.c
| | * | ARM i.MX: Enable clocks in common placeSascha Hauer2012-10-101-6/+0
| | |/ | | | | | | | | | | | | | | | | | | | | | On i.MX we enable all necessary clocks during startup of the clock controller driver, so we do not need the register hacking in the drivers anymore. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | | mtd nand i.MX: fix compilation for unsupported SoCSascha Hauer2012-10-261-0/+3
| | | | | | | | | | | | | | | | | | | | | Add a default case when all if(nfc_is_*) else if() return false to prevent a compiler warning. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | | mtd mxs nand: select NAND_BBTSascha Hauer2012-10-261-0/+1
| | | | | | | | | | | | | | | | | | The driver won't compile without it, so select it. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | | mtd: fix mtdraw_write/mtdraw_erase argumentsSascha Hauer2012-10-261-2/+2
| | | | | | | | | | | | | | | | | | | | | For the !CONFIG_MTD_WRITE case they still have ulong as offset argument. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | | mtd: ubi: fix typos in comment of build.cWolfram Sang2012-10-251-1/+1
| | | | | | | | | | | | | | | Signed-off-by: Wolfram Sang <w.sang@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | | mtd: ubi: cdev: fix build warning for 64-bitWolfram Sang2012-10-231-1/+1
|/ / | | | | | | | | | | | | | | | | | | Got this when compiling sandbox on a 64-bit system: drivers/mtd/ubi/cdev.c: In function ‘ubi_volume_cdev_read’: drivers/mtd/ubi/cdev.c:26:2: warning: format ‘%d’ expects argument of type ‘int’, but argument 3 has type ‘size_t’ [-Wformat] Signed-off-by: Wolfram Sang <w.sang@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* / mtd-core: add writesize in MEMGETINFO ioctlAlexander Aring2012-10-131-0/+1
|/ | | | | | | Add writesize in MEMGETINFO ioctl. Signed-off-by: Alexander Aring <alex.aring@gmail.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* switch all platform_bus device/driver registering to ↵Jean-Christophe PLAGNIOL-VILLARD2012-10-048-8/+8
| | | | | | | | platform_driver/device_register now register_driver and register_device are for bus only usage. Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
* Merge branch 'for-next/remove-fsf-address'Sascha Hauer2012-10-0317-51/+0
|\ | | | | | | | | | | Conflicts: drivers/net/miidev.c include/miidev.h
| * Treewide: remove address of the Free Software FoundationSascha Hauer2012-09-1717-51/+0
| | | | | | | | | | | | | | The FSF address has changed in the past. Instead of updating it each time the address changes, just drop it completely treewide. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | Merge branch 'for-next/mtd'Sascha Hauer2012-10-032-19/+108
|\ \
| * | mtd: nand: extend NAND flash detection to new MLC chipsMarcus Folkesson2012-09-162-19/+108
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Some of the newer MLC devices have a 6-byte ID sequence in which several field definitions differ from older chips in a manner that is not backward compatible. This method is already used in the Linux Kernel. Signed-off-by: Marcus Folkesson <marcus.folkesson@gmail.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | | mtd mtdraw: fix fixing partial page readSascha Hauer2012-09-201-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | toread is unitialized. We have to use count instead. | commit 992c291e9561381cf86d4a7fc9271c2b60fea0c1 | Author: Sascha Hauer <s.hauer@pengutronix.de> | Date: Sat Sep 15 16:54:47 2012 +0200 | | mtd mtdraw: Fix partial page read | | When reading parts of a page we have to limit the maximum bytes copied | to the remaining bytes of a page. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | | mtd mtdraw: Fix partial page readSascha Hauer2012-09-161-1/+2
| |/ |/| | | | | | | | | | | | | When reading parts of a page we have to limit the maximum bytes copied to the remaining bytes of a page. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de> Acked-by: Robert Jarzmik <robert.jarzmik@free.fr>
* | mtd/mtdraw: fix format specifier for ssize_tJan Luebbe2012-09-071-1/+1
| | | | | | | | | | Signed-off-by: Jan Luebbe <jlu@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | mtd: use correct format specifierJan Luebbe2012-09-071-2/+2
|/ | | | | | | | | For the size_t type the format specifier %zu or %zx must be used. See Documentation/printk-formats.txt in the kernel for details. Signed-off-by: Jan Luebbe <jlu@pengutronix.de> Acked-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* Merge branch 'for-next/pbl'Sascha Hauer2012-09-052-0/+11
|\
| * ARM boards: Make boards pbl safeSascha Hauer2012-08-121-0/+1
| | | | | | | | | | | | | | | | With pbl support enabled most boards need a pbl-y for their lowlevel stuff. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de> Acked-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
| * ARM s3c boards: Do not hardcode image sizesSascha Hauer2012-08-121-0/+10
| | | | | | | | | | | | | | | | | | | | The existing nand_boot functions all do the same, so move it to a common place. To be flexible enough for future boards the real image size is used instead of hardcoded 256k. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de> Acked-by: Juergen Beisert <jbe@pengutronix.de> Acked-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
* | Merge branch 'for-next/omap'Sascha Hauer2012-09-052-44/+153
|\ \
| * | mtd OMAP NAND: implement buswidth autodetection supportSascha Hauer2012-08-031-13/+31
| | | | | | | | | | | | Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | mtd nand: implement buswidth detectionSascha Hauer2012-08-031-4/+16
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This introduces a new NAND_BUSWIDTH_AUTO flag which can be used to automatically detect the nand buswidth. The id is always read in 8bit mode. An additional callback is needed to switch the nand controller into 16bit mode. This currently depends on a safe read_byte (always) and read_buf (for onfi-only flashes) callback. It has been tested on OMAP, but is not something that generally works. For this reason the existence of the set_buswidth callback is used to determine whether we are able to do autodetection or not. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | mtd OMAP NAND: Use prefetch engineSascha Hauer2012-08-031-0/+100
| | | | | | | | | | | | | | | | | | | | | | | | Use the prefetch engine to improve NAND performance. The howto is derived from the Kernel. Unlike the kernel we do not make the access mode configurable. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | mtd OMAP NAND: Fix dev_ready handlingSascha Hauer2012-08-021-28/+7
| |/ | | | | | | | | | | | | | | | | | | | | | | | | | | - dev_ready is supposed to return whether the device is ready or not, not to poll until the device is ready. - dev_ready should return true for ready and false for not ready - waitpin polarity is not needed (at least the kernel does not have it) - wait_mon_mask must be 32bit. The code was unused since no board specified a wait pin, so no breakage included. This also removes the now unused timeout variable from platformdata. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | mtd: add private data to mtddev-hookAlexander Aring2012-09-034-6/+35
| | | | | | | | | | | | | | | | | | The mtdoob and mtdraw device don't clean up correctly. Added a private data element to hold allocated memory. Fix remove of mtdoob and mtdraw device. Signed-off-by: Alexander Aring <alex.aring@gmail.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | mtd: fix compiler warningsAlexander Aring2012-09-032-5/+5
|/ | | | | | | Fix some compiler warnings. Signed-off-by: Alexander Aring <alex.aring@gmail.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>