summaryrefslogtreecommitdiffstats
path: root/drivers/mtd
Commit message (Collapse)AuthorAgeFilesLines
* 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>
* Merge branch 'for-next/ubi'Sascha Hauer2012-08-011-8/+27
|\
| * ubi: align ubi writes to LEB sizeSascha Hauer2012-07-311-7/+26
| | | | | | | | | | | | Otherwise incomplete LEBs are not written. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * ubi: cdev->write has to return the bytes read, not 0Sascha Hauer2012-07-311-1/+1
| | | | | | | | Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | Merge branch 'for-next/randconfig'Sascha Hauer2012-08-018-1824/+10
|\ \
| * | UBI: select crc32 supportSascha Hauer2012-07-251-0/+1
| | | | | | | | | | | | | | | | | | UBI needs this. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | mtd: scan_write_bbt is only needed with mtd write supportSascha Hauer2012-07-251-0/+2
| | | | | | | | | | | | Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | mtd omap: add prefix to omap specific decode_bch functionSascha Hauer2012-07-252-3/+3
| | | | | | | | | | | | | | | | | | So that it does not collide with our generic decode_bch function. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | mtd: remove dead disk-on-chip supportSascha Hauer2012-07-253-1820/+0
| | | | | | | | | | | | Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | mtd nand: Fix compilation without bbt supportSascha Hauer2012-07-251-1/+4
| |/ | | | | | | Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | Merge branch 'for-next/onfi'Sascha Hauer2012-08-012-30/+242
|\ \ | |/ |/|
| * nand_imx: update to support onfi & 4k flashsEric Bénard2012-07-051-5/+93
| | | | | | | | | | | | | | | | | | | | | | | | - add CMD_PARAM and read_param to get the ONFI structure - fix OOB size for flash with 224 OOB on i.MX51/3 - add the same ecc layout as the one in the kernel for 4k page flashs Tested on an i.MX53. Signed-off-by: Eric Bénard <eric@eukrea.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * nand_base: add ONFI flash detectionEric Bénard2012-07-051-25/+149
| | | | | | | | | | | | | | | | | | | | the code is taken from linux & u-boot implementations Validated on an i.MX53 which gives the following log : ONFI flash detected ... ONFI param page 0 valid NAND device: Manufacturer ID: 0x2c, Chip ID: 0x38 (Micron MT29F8G08ABABAWP), page size: 4096, OOB size: 224 Signed-off-by: Eric Bénard <eric@eukrea.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | NAND/Samsung: remove a leftover from architeture clean upsJuergen Beisert2012-07-201-1/+0
| | | | | | | | Signed-off-by: Juergen Beisert <jbe@pengutronix.de>
* | mtd: fix 'write: Invalid argument' while writing to nand-bb devicesJan Luebbe2012-07-161-3/+3
| | | | | | | | | | | | | | | | | | | | The 'off_t cur_ofs' variable was missed during the 64 bit conversion. For the MEMGETBADBLOCK ioctl, a pointer to a loff_t is needed. Also adjust the debug format strings. Signed-off-by: Jan Luebbe <jlu@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | mtd: fix bad block ioctlsSascha Hauer2012-07-101-2/+2
|/ | | | | | | | | | | | | | | | | | | | | | Since this commit we interpret the argument to the bad block ioctls as a pointer to a 64bit number: |commit e71c34366808bbe3ce0b166d8710749513af6d81 |Author: Sascha Hauer <s.hauer@pengutronix.de> |Date: Fri Oct 14 11:57:55 2011 +0200 | | mtd: fix arguments to bad block ioctls | | In the Kernel the mtd ioctls expect a pointer to the offset, whereas | barebox interprets the pointer itself as an offset. Since we want | to add 64bit support for file sizes a pointer may not be sufficient, | so align with the kernel and convert it to a pointer to the offset. | | Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de> This missed some places, fix them aswell. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* Merge branch 'for-next/mxs-nand'Sascha Hauer2012-07-023-0/+1265
|\ | | | | | | | | | | | | Conflicts: arch/arm/mach-mxs/Kconfig arch/arm/mach-mxs/Makefile drivers/Makefile
| * mtd nand: add mxs-nand driverWolfram Sang2012-06-303-0/+1265
| | | | | | | | | | | | | | | | | | | | Based on the U-Boot version. Changed to kernel style register layout, added MX23 support (WIP!), made MMU aware and adapted to barebox. Signed-off-by: Marek Vasut <marek.vasut@gmail.com> Signed-off-by: Wolfram Sang <w.sang@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de> Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
* | Merge branch 'for-next/sparse'Sascha Hauer2012-07-021-1/+0
|\ \
| * | define __user emptySascha Hauer2012-06-301-1/+0
| |/ | | | | | | | | | | | | There is no seperate user address space, so do not generate sparse warnings for this. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | use loff_t for file offsetsSascha Hauer2012-06-305-20/+27
| | | | | | | | | | | | | | This is a first step for 64bit file support: Make the file sizes/offsets 64bit. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | mtd: fix arguments to bad block ioctlsSascha Hauer2012-06-302-12/+13
|/ | | | | | | | | In the Kernel the mtd ioctls expect a pointer to the offset, whereas barebox interprets the pointer itself as an offset. Since we want to add 64bit support for file sizes a pointer may not be sufficient, so align with the kernel and convert it to a pointer to the offset. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* Make S3C24xx config options available for all S3CsAlexey Galakhov2012-05-211-5/+5
| | | | | Signed-off-by: Alexey Galakhov <agalakhov@gmail.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* fix typo funtion -> functionAntony Pavlov2012-05-131-1/+1
| | | | | Signed-off-by: Antony Pavlov <antonynpavlov@gmail.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* Merge branch 'master' into nextSascha Hauer2012-04-171-13/+23
|\
| * mtd: docg3 fixes backport from Linux kernelRobert Jarzmik2012-04-171-13/+23
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Backport 2 fixes back from Linux kernel (title verbatim from Linux kernel log) : - docg3 fix in-middle of blocks reads - docg3 reduce read alignment burden These 2 enable partial reads from the MTD (ie. read only the 111 first bytes), which enable linux kernel booting or UBIFS from barebox. Signed-off-by: Robert Jarzmik <robert.jarzmik@free.fr> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | Use DEVICE_ID_DYNAMIC where applicableSascha Hauer2012-04-161-1/+1
|/ | | | | | | We now have DEVICE_ID_DYNAMIC for dynamic allocation of device ids, Use it where applicable. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* Merge branch 'next'Sascha Hauer2012-04-052-2/+9
|\
| * atmel_nand: add on_flash_btt option to enable bbt optionJean-Christophe PLAGNIOL-VILLARD2012-04-021-0/+6
| | | | | | | | | | Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * drivers/mtd: improve docg3 write speedRobert Jarzmik2012-03-131-2/+3
| | | | | | | | | | | | | | | | | | | | When programming or erasing a page, don't wait systematically for 3s, but finish the operation as soon as the hardware has finished, and timeout if 3 seconds have passed. Signed-off-by: Robert Jarzmik <robert.jarzmik@free.fr> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | mtd: fix compiler warningSascha Hauer2012-04-051-0/+2
|/ | | | | | | | | Fixes: drivers/mtd/core.c: In function 'mtd_ioctl': drivers/mtd/core.c:122:24: warning: unused variable 'ecc' [-Wunused-variable] Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* commands: remove struct command pointer from commandsSascha Hauer2012-02-271-1/+1
| | | | | | This is unused in all commands and thus can be removed. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>