diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2010-01-24 13:31:34 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2010-01-24 13:31:34 -0500 |
commit | b8be634e01b400fa2528848ad0cd6a5580a15bc4 (patch) | |
tree | f36da264249540727a60e13a54d1d44c8821b48d /drivers/mtd/tests/mtd_readtest.c | |
parent | 298a4c3a57fed38df365a6807728d1930a72c728 (diff) | |
parent | f5e2bae0aad03164ffc7ce9dfeee6608e2c87dba (diff) |
Merge git://git.infradead.org/~dwmw2/mtd-2.6.33
* git://git.infradead.org/~dwmw2/mtd-2.6.33:
mtd: tests: fix read, speed and stress tests on NOR flash
mtd: Really add ARM pismo support
kmsg_dump: Dump on crash_kexec as well
Diffstat (limited to 'drivers/mtd/tests/mtd_readtest.c')
-rw-r--r-- | drivers/mtd/tests/mtd_readtest.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/drivers/mtd/tests/mtd_readtest.c b/drivers/mtd/tests/mtd_readtest.c index 79fc4530987b..25c5dd03a837 100644 --- a/drivers/mtd/tests/mtd_readtest.c +++ b/drivers/mtd/tests/mtd_readtest.c | |||
@@ -147,6 +147,10 @@ static int scan_for_bad_eraseblocks(void) | |||
147 | } | 147 | } |
148 | memset(bbt, 0 , ebcnt); | 148 | memset(bbt, 0 , ebcnt); |
149 | 149 | ||
150 | /* NOR flash does not implement block_isbad */ | ||
151 | if (mtd->block_isbad == NULL) | ||
152 | return 0; | ||
153 | |||
150 | printk(PRINT_PREF "scanning for bad eraseblocks\n"); | 154 | printk(PRINT_PREF "scanning for bad eraseblocks\n"); |
151 | for (i = 0; i < ebcnt; ++i) { | 155 | for (i = 0; i < ebcnt; ++i) { |
152 | bbt[i] = is_block_bad(i) ? 1 : 0; | 156 | bbt[i] = is_block_bad(i) ? 1 : 0; |
@@ -184,7 +188,7 @@ static int __init mtd_readtest_init(void) | |||
184 | tmp = mtd->size; | 188 | tmp = mtd->size; |
185 | do_div(tmp, mtd->erasesize); | 189 | do_div(tmp, mtd->erasesize); |
186 | ebcnt = tmp; | 190 | ebcnt = tmp; |
187 | pgcnt = mtd->erasesize / mtd->writesize; | 191 | pgcnt = mtd->erasesize / pgsize; |
188 | 192 | ||
189 | printk(PRINT_PREF "MTD device size %llu, eraseblock size %u, " | 193 | printk(PRINT_PREF "MTD device size %llu, eraseblock size %u, " |
190 | "page size %u, count of eraseblocks %u, pages per " | 194 | "page size %u, count of eraseblocks %u, pages per " |