summaryrefslogtreecommitdiffstats
path: root/commands/nandtest.c
Commit message (Collapse)AuthorAgeFilesLines
* nandtest: fix length calculationAlexander Aring2013-02-201-4/+4
| | | | | Signed-off-by: Alexander Aring <alex.aring@gmail.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* fs: add pread and pwrite functionsAlexander Aring2013-02-201-30/+6
| | | | | | | | | | | | | | | Add pread and pwrite functions. Split read and write functions to save some space. The functions pread and pwrite saves and sets the file position to a given offset and restore them afterwards. This also makes the nandtest command use these function which is necessary to not break compilation for the nandtest command. Signed-off-by: Alexander Aring <alex.aring@gmail.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* nandtest: add another constraints checkAlexander Aring2012-10-231-0/+7
| | | | | | | Add check if writesize is a multiple of erasesize. Signed-off-by: Alexander Aring <alex.aring@gmail.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* nandtest: use loff_t instead off_tAlexander Aring2012-10-231-29/+28
| | | | | | | | Use the same offset type like mtd interface. Replace modulo operation with IS_ALIGNED macro. Signed-off-by: Alexander Aring <alex.aring@gmail.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* nandtest: clean up codeAlexander Aring2012-10-231-18/+16
| | | | | | | | | | | | Clean up code: - change 'i+i' to 'i + i'. - change counter variable to unsigned int. - use spaces instead of tabs in help text. - remove __test_ofs variable. Signed-off-by: Alexander Aring <alex.aring@gmail.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* nandtest: use get_random_bytes instead of for loopAlexander Aring2012-10-231-4/+1
| | | | | | | Use already builtin get_random_bytes instead of for loop. Signed-off-by: Alexander Aring <alex.aring@gmail.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* nandtest: change flash length variable typeAlexander Aring2012-10-231-7/+6
| | | | | | | Change flash 'length' variable type to off_t instead of int. Signed-off-by: Alexander Aring <alex.aring@gmail.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* nandtest: rename command argument p to iAlexander Aring2012-10-231-8/+8
| | | | | | | Rename command argument p for 'passes' to 'i' iteration. Signed-off-by: Alexander Aring <alex.aring@gmail.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* nandtest: add progressbar instead of offset printAlexander Aring2012-10-231-17/+25
| | | | | | | Add progressbar and remove other outputs of current flash offset. Signed-off-by: Alexander Aring <alex.aring@gmail.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* nandtest: stat ecc per page not per eraseblockAlexander Aring2012-10-231-31/+39
| | | | | | | Collect ecc statistics per page not per eraseblock. Signed-off-by: Alexander Aring <alex.aring@gmail.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* Treewide: remove address of the Free Software FoundationSascha Hauer2012-09-171-3/+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>
* 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>
* 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>
* nandtest: fix typoAlexander Aring2012-01-061-1/+1
| | | | | | | Fix typo nand -> nandtest. Signed-off-by: Alexander Aring <a.aring@phytec.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* nandtest: add nandtest commandAlexander Aring2012-01-041-0/+364
Add nandtest command to test nand devices and display ecc stats at the end of test. Signed-off-by: Alexander Aring <a.aring@phytec.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>