summaryrefslogtreecommitdiffstats
path: root/commands/nandtest.c
Commit message (Collapse)AuthorAgeFilesLines
* commands: nandtest: provide readonly testJan Remmet2019-02-271-42/+83
| | | | | | | Test will read the device and report the corrected or failed ECC states. Signed-off-by: Jan Remmet <j.remmet@phytec.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* commands: nandtest: Fix wrong format specifierSascha Hauer2016-03-301-1/+1
| | | | | | Fixes: 1e009bf mtd: Make erase_info structs 64bit where necessary Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* commands: harmonize in-barebox documentationHolger Schurig2014-05-141-10/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch does probably too much, but it's hard (and very cumbersome/time consuming) to break it out. What is does is this: * each command has one short description, e.g. "list MUX configuration" * made sure the short descriptions start lowercase * each command has one usage. That string contains just the options, e.g. "[-npn]". It's not part of the long help text. * that is, it doesn't say "[OPTIONS]" anymore, every usable option is listed by character in this (short) option string (the long description is in the long help text, as before) * help texts have been reworked, to make them - sometimes smaller - sometimes describe the options better - more often present themselves in a nicer format * all long help texts are now created with BUSYBOX_CMD_HELP_ macros, no more 'static const __maybe_unused char cmd_foobar_help[]' * made sure the long help texts starts uppercase * because cmdtp->name and cmdtp->opts together provide the new usage, all "Usage: foobar" texts have been removed from the long help texts * BUSYBOX_CMD_HELP_TEXT() provides the trailing newline by itself, this is nicer in the source code * BUSYBOX_CMD_HELP_OPT() provides the trailing newline by itself * made sure no line gets longer than 77 characters * delibertely renamed cmdtp->usage, so that we can get compile-time errors (e.g. in out-of-tree modules that use register_command() * the 'help' command can now always emit the usage, even without compiled long help texts * 'help -v' gives a list of commands with their short description, this is similar like the old "help" command before my patchset * 'help -a' gives out help of all commands Signed-off-by: Holger Schurig <holgerschurig@gmail.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* commands: group 'help' outputHolger Schurig2014-05-141-0/+1
| | | | | | | | | | | | | | | | | | | The old output of "help" was just producing a long list, that usually scrolled of the screen (even on a X11 terminal). This list is more compact, and also sorted by groups. The old output format (plus grouping) is now available with 'help -v'. Example: Information commands: ?, devinfo, help, iomem, meminfo, version Boot commands: boot, bootm, go, loadb, loads, loadx, loady, saves, uimage ... Signed-off-by: Holger Schurig <holgerschurig@gmail.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* treewide: fix signedness mixups in printf format specifiersLucas Stach2014-04-231-1/+1
| | | | | | | | | This most likely doesn't fix any real bugs, but it's the right thing to do and reduces the noise level with static checkers. Signed-off-by: Lucas Stach <dev@lynxeye.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* mtd: Update internal API to support 64-bit device sizeDmitry Lavnikevich2014-03-121-1/+1
| | | | | | | | | | | | | | | | | | | MTD internal API presently uses 32-bit values to represent device size. This patch updates them to 64-bits but leaves the external API unchanged. In general, changing from 32-bit to 64-bit values cause little or no changes to the majority of the code with the following exceptions: - printk message formats; - division and modulus of 64-bit values (mtd_div_by_wb, mtd_div_by_eb may be used in some of such cases). Was tested on phyFLEX i.MX6. Signed-off-by: Dmitry Lavnikevich <d.lavnikevich@sam-solutions.com> Signed-off-by: Grigory Milev <g.milev@sam-solutions.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* commands: nandtest: Fix signed/unsigned arguments for printfAlexander Shiyan2013-11-111-2/+2
| | | | | | | "%d" in format string requires a signed integer. Signed-off-by: Alexander Shiyan <shc_work@mail.ru> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* commands: nandtest: Fix incorrect size for memset in do_nandtestAlexander Shiyan2013-07-091-1/+1
| | | | | Signed-off-by: Alexander Shiyan <shc_work@mail.ru> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* 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>