Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 6699c058 authored by Nikhilesh Reddy's avatar Nikhilesh Reddy Committed by Gerrit - the friendly Code Review server
Browse files

mtd:speedtest: Make multiblock erase test optional



Add a new module param to to toggle performing the multiblock erase test
and thus make multi block erase test optional.

Change-Id: If53ea4afd6fd237b2690022a582dce0a78f02b60
Signed-off-by: default avatarNikhilesh Reddy <reddyn@codeaurora.org>
parent 92317fb0
Loading
Loading
Loading
Loading
+27 −21
Original line number Diff line number Diff line
@@ -41,6 +41,10 @@ module_param(count, int, S_IRUGO);
MODULE_PARM_DESC(count, "Maximum number of eraseblocks to use "
			"(0 means use all)");

static int test_multiblock_erase;
module_param(test_multiblock_erase, int, S_IRUGO);
MODULE_PARM_DESC(test_multiblock_erase, "Set test_multiblock_erase = 1 to test the speed of multiblock erases");

static struct mtd_info *mtd;
static unsigned char *iobuf;
static unsigned char *bbt;
@@ -369,6 +373,7 @@ static int __init mtd_speedtest_init(void)
	pr_info("erase speed is %ld KiB/s\n", speed);

	/* Multi-block erase all eraseblocks */
	if (test_multiblock_erase) {
		for (k = 1; k < 7; k++) {
			blocks = 1 << k;
			pr_info("Testing %dx multi-block erase speed\n",
@@ -393,6 +398,7 @@ static int __init mtd_speedtest_init(void)
			pr_info("%dx multi-block erase speed is %ld KiB/s\n",
			       blocks, speed);
		}
	}
	pr_info("finished\n");
out:
	kfree(iobuf);