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

Commit 90c439dd authored by Linux Build Service Account's avatar Linux Build Service Account Committed by Gerrit - the friendly Code Review server
Browse files

Merge "mtd:speedtest: Make multiblock erase test optional"

parents 4739af86 6699c058
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);