summaryrefslogtreecommitdiffstats
path: root/commands/Kconfig
diff options
context:
space:
mode:
authorSascha Hauer <s.hauer@pengutronix.de>2016-03-02 10:16:50 +0100
committerSascha Hauer <s.hauer@pengutronix.de>2016-04-06 10:17:53 +0200
commit1e6955fdb815906bdd2ecbf2c50e5059852f2400 (patch)
tree365230e849ab4ccc01bb53e754a61f88137f356f /commands/Kconfig
parenteea6d75d1bfa91ff5da7992ecbc1ff828542c342 (diff)
downloadbarebox-1e6955fdb815906bdd2ecbf2c50e5059852f2400.tar.gz
barebox-1e6955fdb815906bdd2ecbf2c50e5059852f2400.tar.xz
commands: Create nand_bitflip command
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>
Diffstat (limited to 'commands/Kconfig')
-rw-r--r--commands/Kconfig17
1 files changed, 17 insertions, 0 deletions
diff --git a/commands/Kconfig b/commands/Kconfig
index 172439154d..875c5f4f01 100644
--- a/commands/Kconfig
+++ b/commands/Kconfig
@@ -1908,6 +1908,23 @@ config CMD_NANDTEST
-o OFFS start offset on flash
-l LEN length of flash to test
+config CMD_NAND_BITFLIP
+ tristate
+ depends on NAND
+ prompt "nand_bitflip"
+ help
+ nand_bitflip - Create bitflips on Nand pages. This command is useful for testing
+ purposes.
+
+ Usage: nand_bitflip NANDDEV
+
+ This command creates bitflips on Nand pages.
+ Options:
+ -b <block> block to work on
+ -o <offset> offset in Nand
+ -r flip random bits
+ -n <numbitflips> Specify maximum number of bitflips to generate
+
config CMD_POWEROFF
tristate
depends on HAS_POWEROFF