summaryrefslogtreecommitdiffstats
path: root/commands/nand-bitflip.c
Commit message (Collapse)AuthorAgeFilesLines
* mtd: when creating bitflips the offset has to be page alignedSascha Hauer2017-03-301-0/+4
| | | | | | | | mtd_peb_create_bitflips() assumes the offset is page aligned. Enforce this and in the nand_bitlfip command print a warning if it's not aligned. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* commands: Create nand_bitflip commandSascha Hauer2016-04-061-0/+117
This adds a command to flip bits in a Nand flash. This is useful for testing purposes to check if flipped bits are corrected and if the driver returns the correct number of bitflips. The command writes a configurable number of bitflips to a single Nand page. If the -r option is not given the results are reproducible, so calling the same command twice will revert the bitflips. The command uses the raw read/write Nand operations which are probably less tested than the regular read/write operations, so the command may produce surprising results. As of writing the command has been tested with the GPMI Nand driver and the imx-nand driver with fixes posted. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>