blob: 0b89418a088804e031f8e6efd137439ad02dadfe [file] [log] [blame]
Artem Bityutskiy72069be2008-12-08 13:36:18 +02001/*
2 * Copyright (C) 2007 Nokia Corporation
3 *
4 * This program is free software; you can redistribute it and/or modify it
5 * under the terms of the GNU General Public License version 2 as published by
6 * the Free Software Foundation.
7 *
8 * This program is distributed in the hope that it will be useful, but WITHOUT
9 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
10 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
11 * more details.
12 *
13 * You should have received a copy of the GNU General Public License along with
14 * this program; see the file COPYING. If not, write to the Free Software
15 * Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
16 *
17 * Test read and write speed of a MTD device.
18 *
Adrian Hunterfc7fe762011-02-08 12:02:39 +020019 * Author: Adrian Hunter <adrian.hunter@nokia.com>
Artem Bityutskiy72069be2008-12-08 13:36:18 +020020 */
21
Vikram Narayanan2c70d292012-10-10 23:10:02 +053022#define pr_fmt(fmt) KBUILD_MODNAME ": " fmt
23
Artem Bityutskiy72069be2008-12-08 13:36:18 +020024#include <linux/init.h>
Shraddha Barkeaf30c0a2015-10-22 20:29:54 +053025#include <linux/ktime.h>
Artem Bityutskiy72069be2008-12-08 13:36:18 +020026#include <linux/module.h>
27#include <linux/moduleparam.h>
28#include <linux/err.h>
29#include <linux/mtd/mtd.h>
Tejun Heo5a0e3ad2010-03-24 17:04:11 +090030#include <linux/slab.h>
Artem Bityutskiy72069be2008-12-08 13:36:18 +020031#include <linux/sched.h>
Artem Bityutskiybfea1d42012-05-18 18:44:53 +030032#include <linux/random.h>
Artem Bityutskiy72069be2008-12-08 13:36:18 +020033
Akinobu Mita59b08162013-08-03 18:52:12 +090034#include "mtd_test.h"
35
Wolfram Sang74060602011-10-30 00:11:53 +020036static int dev = -EINVAL;
Artem Bityutskiy72069be2008-12-08 13:36:18 +020037module_param(dev, int, S_IRUGO);
38MODULE_PARM_DESC(dev, "MTD device number to use");
39
Adrian Hunterfc7fe762011-02-08 12:02:39 +020040static int count;
41module_param(count, int, S_IRUGO);
42MODULE_PARM_DESC(count, "Maximum number of eraseblocks to use "
43 "(0 means use all)");
44
Artem Bityutskiy72069be2008-12-08 13:36:18 +020045static struct mtd_info *mtd;
46static unsigned char *iobuf;
47static unsigned char *bbt;
48
49static int pgsize;
50static int ebcnt;
51static int pgcnt;
52static int goodebcnt;
Shraddha Barkeaf30c0a2015-10-22 20:29:54 +053053static ktime_t start, finish;
Artem Bityutskiy72069be2008-12-08 13:36:18 +020054
Roman Tereshonkov4085bcc2011-02-08 12:02:40 +020055static int multiblock_erase(int ebnum, int blocks)
56{
57 int err;
58 struct erase_info ei;
Brian Norris1001ff7a2014-07-21 19:07:12 -070059 loff_t addr = (loff_t)ebnum * mtd->erasesize;
Roman Tereshonkov4085bcc2011-02-08 12:02:40 +020060
61 memset(&ei, 0, sizeof(struct erase_info));
62 ei.mtd = mtd;
63 ei.addr = addr;
64 ei.len = mtd->erasesize * blocks;
65
Artem Bityutskiy7e1f0dc2011-12-23 15:25:39 +020066 err = mtd_erase(mtd, &ei);
Roman Tereshonkov4085bcc2011-02-08 12:02:40 +020067 if (err) {
Vikram Narayanan2c70d292012-10-10 23:10:02 +053068 pr_err("error %d while erasing EB %d, blocks %d\n",
Roman Tereshonkov4085bcc2011-02-08 12:02:40 +020069 err, ebnum, blocks);
70 return err;
71 }
72
73 if (ei.state == MTD_ERASE_FAILED) {
Vikram Narayanan2c70d292012-10-10 23:10:02 +053074 pr_err("some erase error occurred at EB %d,"
Roman Tereshonkov4085bcc2011-02-08 12:02:40 +020075 "blocks %d\n", ebnum, blocks);
76 return -EIO;
77 }
78
79 return 0;
80}
81
Artem Bityutskiy72069be2008-12-08 13:36:18 +020082static int write_eraseblock(int ebnum)
83{
Brian Norris1001ff7a2014-07-21 19:07:12 -070084 loff_t addr = (loff_t)ebnum * mtd->erasesize;
Artem Bityutskiy72069be2008-12-08 13:36:18 +020085
Akinobu Mita8a9f4aa2013-08-15 22:55:09 +090086 return mtdtest_write(mtd, addr, mtd->erasesize, iobuf);
Artem Bityutskiy72069be2008-12-08 13:36:18 +020087}
88
89static int write_eraseblock_by_page(int ebnum)
90{
Artem Bityutskiy72069be2008-12-08 13:36:18 +020091 int i, err = 0;
Brian Norris1001ff7a2014-07-21 19:07:12 -070092 loff_t addr = (loff_t)ebnum * mtd->erasesize;
Artem Bityutskiy72069be2008-12-08 13:36:18 +020093 void *buf = iobuf;
94
95 for (i = 0; i < pgcnt; i++) {
Akinobu Mita59b08162013-08-03 18:52:12 +090096 err = mtdtest_write(mtd, addr, pgsize, buf);
Akinobu Mita8a9f4aa2013-08-15 22:55:09 +090097 if (err)
Artem Bityutskiy72069be2008-12-08 13:36:18 +020098 break;
Artem Bityutskiy72069be2008-12-08 13:36:18 +020099 addr += pgsize;
100 buf += pgsize;
101 }
102
103 return err;
104}
105
106static int write_eraseblock_by_2pages(int ebnum)
107{
Akinobu Mita59b08162013-08-03 18:52:12 +0900108 size_t sz = pgsize * 2;
Artem Bityutskiy72069be2008-12-08 13:36:18 +0200109 int i, n = pgcnt / 2, err = 0;
Brian Norris1001ff7a2014-07-21 19:07:12 -0700110 loff_t addr = (loff_t)ebnum * mtd->erasesize;
Artem Bityutskiy72069be2008-12-08 13:36:18 +0200111 void *buf = iobuf;
112
113 for (i = 0; i < n; i++) {
Akinobu Mita59b08162013-08-03 18:52:12 +0900114 err = mtdtest_write(mtd, addr, sz, buf);
Akinobu Mita8a9f4aa2013-08-15 22:55:09 +0900115 if (err)
Artem Bityutskiy72069be2008-12-08 13:36:18 +0200116 return err;
Artem Bityutskiy72069be2008-12-08 13:36:18 +0200117 addr += sz;
118 buf += sz;
119 }
Akinobu Mita8a9f4aa2013-08-15 22:55:09 +0900120 if (pgcnt % 2)
Akinobu Mita59b08162013-08-03 18:52:12 +0900121 err = mtdtest_write(mtd, addr, pgsize, buf);
Artem Bityutskiy72069be2008-12-08 13:36:18 +0200122
123 return err;
124}
125
126static int read_eraseblock(int ebnum)
127{
Brian Norris1001ff7a2014-07-21 19:07:12 -0700128 loff_t addr = (loff_t)ebnum * mtd->erasesize;
Artem Bityutskiy72069be2008-12-08 13:36:18 +0200129
Akinobu Mitaabc173a2013-08-15 22:55:08 +0900130 return mtdtest_read(mtd, addr, mtd->erasesize, iobuf);
Artem Bityutskiy72069be2008-12-08 13:36:18 +0200131}
132
133static int read_eraseblock_by_page(int ebnum)
134{
Artem Bityutskiy72069be2008-12-08 13:36:18 +0200135 int i, err = 0;
Brian Norris1001ff7a2014-07-21 19:07:12 -0700136 loff_t addr = (loff_t)ebnum * mtd->erasesize;
Artem Bityutskiy72069be2008-12-08 13:36:18 +0200137 void *buf = iobuf;
138
139 for (i = 0; i < pgcnt; i++) {
Akinobu Mita59b08162013-08-03 18:52:12 +0900140 err = mtdtest_read(mtd, addr, pgsize, buf);
Akinobu Mitaabc173a2013-08-15 22:55:08 +0900141 if (err)
Artem Bityutskiy72069be2008-12-08 13:36:18 +0200142 break;
Artem Bityutskiy72069be2008-12-08 13:36:18 +0200143 addr += pgsize;
144 buf += pgsize;
145 }
146
147 return err;
148}
149
150static int read_eraseblock_by_2pages(int ebnum)
151{
Akinobu Mita59b08162013-08-03 18:52:12 +0900152 size_t sz = pgsize * 2;
Artem Bityutskiy72069be2008-12-08 13:36:18 +0200153 int i, n = pgcnt / 2, err = 0;
Brian Norris1001ff7a2014-07-21 19:07:12 -0700154 loff_t addr = (loff_t)ebnum * mtd->erasesize;
Artem Bityutskiy72069be2008-12-08 13:36:18 +0200155 void *buf = iobuf;
156
157 for (i = 0; i < n; i++) {
Akinobu Mita59b08162013-08-03 18:52:12 +0900158 err = mtdtest_read(mtd, addr, sz, buf);
Akinobu Mitaabc173a2013-08-15 22:55:08 +0900159 if (err)
Artem Bityutskiy72069be2008-12-08 13:36:18 +0200160 return err;
Artem Bityutskiy72069be2008-12-08 13:36:18 +0200161 addr += sz;
162 buf += sz;
163 }
Akinobu Mitaabc173a2013-08-15 22:55:08 +0900164 if (pgcnt % 2)
Akinobu Mita59b08162013-08-03 18:52:12 +0900165 err = mtdtest_read(mtd, addr, pgsize, buf);
Artem Bityutskiy72069be2008-12-08 13:36:18 +0200166
167 return err;
168}
169
Artem Bityutskiy72069be2008-12-08 13:36:18 +0200170static inline void start_timing(void)
171{
Shraddha Barkeaf30c0a2015-10-22 20:29:54 +0530172 start = ktime_get();
Artem Bityutskiy72069be2008-12-08 13:36:18 +0200173}
174
175static inline void stop_timing(void)
176{
Shraddha Barkeaf30c0a2015-10-22 20:29:54 +0530177 finish = ktime_get();
Artem Bityutskiy72069be2008-12-08 13:36:18 +0200178}
179
180static long calc_speed(void)
181{
David Lamberte70727e2011-03-07 12:00:46 +0200182 uint64_t k;
183 long ms;
Artem Bityutskiy72069be2008-12-08 13:36:18 +0200184
Shraddha Barkeaf30c0a2015-10-22 20:29:54 +0530185 ms = ktime_ms_delta(finish, start);
David Lamberte70727e2011-03-07 12:00:46 +0200186 if (ms == 0)
187 return 0;
Brian Norrisb9da8ba2015-02-28 02:02:26 -0800188 k = (uint64_t)goodebcnt * (mtd->erasesize / 1024) * 1000;
David Lamberte70727e2011-03-07 12:00:46 +0200189 do_div(k, ms);
190 return k;
Artem Bityutskiy72069be2008-12-08 13:36:18 +0200191}
192
Artem Bityutskiy72069be2008-12-08 13:36:18 +0200193static int __init mtd_speedtest_init(void)
194{
Roman Tereshonkov4085bcc2011-02-08 12:02:40 +0200195 int err, i, blocks, j, k;
Artem Bityutskiy72069be2008-12-08 13:36:18 +0200196 long speed;
197 uint64_t tmp;
198
199 printk(KERN_INFO "\n");
200 printk(KERN_INFO "=================================================\n");
Wolfram Sang74060602011-10-30 00:11:53 +0200201
202 if (dev < 0) {
Masanari Iida064a7692012-11-09 23:20:58 +0900203 pr_info("Please specify a valid mtd-device via module parameter\n");
Vikram Narayanan2c70d292012-10-10 23:10:02 +0530204 pr_crit("CAREFUL: This test wipes all data on the specified MTD device!\n");
Wolfram Sang74060602011-10-30 00:11:53 +0200205 return -EINVAL;
206 }
207
Adrian Hunterfc7fe762011-02-08 12:02:39 +0200208 if (count)
Vikram Narayanan2c70d292012-10-10 23:10:02 +0530209 pr_info("MTD device: %d count: %d\n", dev, count);
Adrian Hunterfc7fe762011-02-08 12:02:39 +0200210 else
Vikram Narayanan2c70d292012-10-10 23:10:02 +0530211 pr_info("MTD device: %d\n", dev);
Artem Bityutskiy72069be2008-12-08 13:36:18 +0200212
213 mtd = get_mtd_device(NULL, dev);
214 if (IS_ERR(mtd)) {
215 err = PTR_ERR(mtd);
Vikram Narayanan2c70d292012-10-10 23:10:02 +0530216 pr_err("error: cannot get MTD device\n");
Artem Bityutskiy72069be2008-12-08 13:36:18 +0200217 return err;
218 }
219
220 if (mtd->writesize == 1) {
Vikram Narayanan2c70d292012-10-10 23:10:02 +0530221 pr_info("not NAND flash, assume page size is 512 "
Artem Bityutskiy72069be2008-12-08 13:36:18 +0200222 "bytes.\n");
223 pgsize = 512;
224 } else
225 pgsize = mtd->writesize;
226
227 tmp = mtd->size;
228 do_div(tmp, mtd->erasesize);
229 ebcnt = tmp;
Morten Thunberg Svendsenf5e2bae2010-01-06 10:48:18 +0100230 pgcnt = mtd->erasesize / pgsize;
Artem Bityutskiy72069be2008-12-08 13:36:18 +0200231
Vikram Narayanan2c70d292012-10-10 23:10:02 +0530232 pr_info("MTD device size %llu, eraseblock size %u, "
Artem Bityutskiy72069be2008-12-08 13:36:18 +0200233 "page size %u, count of eraseblocks %u, pages per "
234 "eraseblock %u, OOB size %u\n",
235 (unsigned long long)mtd->size, mtd->erasesize,
236 pgsize, ebcnt, pgcnt, mtd->oobsize);
237
Adrian Hunterfc7fe762011-02-08 12:02:39 +0200238 if (count > 0 && count < ebcnt)
239 ebcnt = count;
240
Artem Bityutskiy72069be2008-12-08 13:36:18 +0200241 err = -ENOMEM;
242 iobuf = kmalloc(mtd->erasesize, GFP_KERNEL);
Brian Norris33777e62013-05-02 14:18:51 -0700243 if (!iobuf)
Artem Bityutskiy72069be2008-12-08 13:36:18 +0200244 goto out;
Artem Bityutskiy72069be2008-12-08 13:36:18 +0200245
Akinobu Mita99672f32013-02-27 17:05:37 -0800246 prandom_bytes(iobuf, mtd->erasesize);
Artem Bityutskiy72069be2008-12-08 13:36:18 +0200247
Akinobu Mita59b08162013-08-03 18:52:12 +0900248 bbt = kzalloc(ebcnt, GFP_KERNEL);
249 if (!bbt)
250 goto out;
251 err = mtdtest_scan_for_bad_eraseblocks(mtd, bbt, 0, ebcnt);
Artem Bityutskiy72069be2008-12-08 13:36:18 +0200252 if (err)
253 goto out;
Akinobu Mita59b08162013-08-03 18:52:12 +0900254 for (i = 0; i < ebcnt; i++) {
255 if (!bbt[i])
256 goodebcnt++;
257 }
Artem Bityutskiy72069be2008-12-08 13:36:18 +0200258
Akinobu Mita59b08162013-08-03 18:52:12 +0900259 err = mtdtest_erase_good_eraseblocks(mtd, bbt, 0, ebcnt);
Artem Bityutskiy72069be2008-12-08 13:36:18 +0200260 if (err)
261 goto out;
262
263 /* Write all eraseblocks, 1 eraseblock at a time */
Vikram Narayanan2c70d292012-10-10 23:10:02 +0530264 pr_info("testing eraseblock write speed\n");
Artem Bityutskiy72069be2008-12-08 13:36:18 +0200265 start_timing();
266 for (i = 0; i < ebcnt; ++i) {
267 if (bbt[i])
268 continue;
269 err = write_eraseblock(i);
270 if (err)
271 goto out;
Richard Weinberger2a6a28e72015-03-29 21:52:06 +0200272
273 err = mtdtest_relax();
274 if (err)
275 goto out;
Artem Bityutskiy72069be2008-12-08 13:36:18 +0200276 }
277 stop_timing();
278 speed = calc_speed();
Vikram Narayanan2c70d292012-10-10 23:10:02 +0530279 pr_info("eraseblock write speed is %ld KiB/s\n", speed);
Artem Bityutskiy72069be2008-12-08 13:36:18 +0200280
281 /* Read all eraseblocks, 1 eraseblock at a time */
Vikram Narayanan2c70d292012-10-10 23:10:02 +0530282 pr_info("testing eraseblock read speed\n");
Artem Bityutskiy72069be2008-12-08 13:36:18 +0200283 start_timing();
284 for (i = 0; i < ebcnt; ++i) {
285 if (bbt[i])
286 continue;
287 err = read_eraseblock(i);
288 if (err)
289 goto out;
Richard Weinberger2a6a28e72015-03-29 21:52:06 +0200290
291 err = mtdtest_relax();
292 if (err)
293 goto out;
Artem Bityutskiy72069be2008-12-08 13:36:18 +0200294 }
295 stop_timing();
296 speed = calc_speed();
Vikram Narayanan2c70d292012-10-10 23:10:02 +0530297 pr_info("eraseblock read speed is %ld KiB/s\n", speed);
Artem Bityutskiy72069be2008-12-08 13:36:18 +0200298
Akinobu Mita59b08162013-08-03 18:52:12 +0900299 err = mtdtest_erase_good_eraseblocks(mtd, bbt, 0, ebcnt);
Artem Bityutskiy72069be2008-12-08 13:36:18 +0200300 if (err)
301 goto out;
302
303 /* Write all eraseblocks, 1 page at a time */
Vikram Narayanan2c70d292012-10-10 23:10:02 +0530304 pr_info("testing page write speed\n");
Artem Bityutskiy72069be2008-12-08 13:36:18 +0200305 start_timing();
306 for (i = 0; i < ebcnt; ++i) {
307 if (bbt[i])
308 continue;
309 err = write_eraseblock_by_page(i);
310 if (err)
311 goto out;
Richard Weinberger2a6a28e72015-03-29 21:52:06 +0200312
313 err = mtdtest_relax();
314 if (err)
315 goto out;
Artem Bityutskiy72069be2008-12-08 13:36:18 +0200316 }
317 stop_timing();
318 speed = calc_speed();
Vikram Narayanan2c70d292012-10-10 23:10:02 +0530319 pr_info("page write speed is %ld KiB/s\n", speed);
Artem Bityutskiy72069be2008-12-08 13:36:18 +0200320
321 /* Read all eraseblocks, 1 page at a time */
Vikram Narayanan2c70d292012-10-10 23:10:02 +0530322 pr_info("testing page read speed\n");
Artem Bityutskiy72069be2008-12-08 13:36:18 +0200323 start_timing();
324 for (i = 0; i < ebcnt; ++i) {
325 if (bbt[i])
326 continue;
327 err = read_eraseblock_by_page(i);
328 if (err)
329 goto out;
Richard Weinberger2a6a28e72015-03-29 21:52:06 +0200330
331 err = mtdtest_relax();
332 if (err)
333 goto out;
Artem Bityutskiy72069be2008-12-08 13:36:18 +0200334 }
335 stop_timing();
336 speed = calc_speed();
Vikram Narayanan2c70d292012-10-10 23:10:02 +0530337 pr_info("page read speed is %ld KiB/s\n", speed);
Artem Bityutskiy72069be2008-12-08 13:36:18 +0200338
Akinobu Mita59b08162013-08-03 18:52:12 +0900339 err = mtdtest_erase_good_eraseblocks(mtd, bbt, 0, ebcnt);
Artem Bityutskiy72069be2008-12-08 13:36:18 +0200340 if (err)
341 goto out;
342
343 /* Write all eraseblocks, 2 pages at a time */
Vikram Narayanan2c70d292012-10-10 23:10:02 +0530344 pr_info("testing 2 page write speed\n");
Artem Bityutskiy72069be2008-12-08 13:36:18 +0200345 start_timing();
346 for (i = 0; i < ebcnt; ++i) {
347 if (bbt[i])
348 continue;
349 err = write_eraseblock_by_2pages(i);
350 if (err)
351 goto out;
Richard Weinberger2a6a28e72015-03-29 21:52:06 +0200352
353 err = mtdtest_relax();
354 if (err)
355 goto out;
Artem Bityutskiy72069be2008-12-08 13:36:18 +0200356 }
357 stop_timing();
358 speed = calc_speed();
Vikram Narayanan2c70d292012-10-10 23:10:02 +0530359 pr_info("2 page write speed is %ld KiB/s\n", speed);
Artem Bityutskiy72069be2008-12-08 13:36:18 +0200360
361 /* Read all eraseblocks, 2 pages at a time */
Vikram Narayanan2c70d292012-10-10 23:10:02 +0530362 pr_info("testing 2 page read speed\n");
Artem Bityutskiy72069be2008-12-08 13:36:18 +0200363 start_timing();
364 for (i = 0; i < ebcnt; ++i) {
365 if (bbt[i])
366 continue;
367 err = read_eraseblock_by_2pages(i);
368 if (err)
369 goto out;
Richard Weinberger2a6a28e72015-03-29 21:52:06 +0200370
371 err = mtdtest_relax();
372 if (err)
373 goto out;
Artem Bityutskiy72069be2008-12-08 13:36:18 +0200374 }
375 stop_timing();
376 speed = calc_speed();
Vikram Narayanan2c70d292012-10-10 23:10:02 +0530377 pr_info("2 page read speed is %ld KiB/s\n", speed);
Artem Bityutskiy72069be2008-12-08 13:36:18 +0200378
379 /* Erase all eraseblocks */
Vikram Narayanan2c70d292012-10-10 23:10:02 +0530380 pr_info("Testing erase speed\n");
Artem Bityutskiy72069be2008-12-08 13:36:18 +0200381 start_timing();
Akinobu Mita59b08162013-08-03 18:52:12 +0900382 err = mtdtest_erase_good_eraseblocks(mtd, bbt, 0, ebcnt);
383 if (err)
384 goto out;
Artem Bityutskiy72069be2008-12-08 13:36:18 +0200385 stop_timing();
386 speed = calc_speed();
Vikram Narayanan2c70d292012-10-10 23:10:02 +0530387 pr_info("erase speed is %ld KiB/s\n", speed);
Artem Bityutskiy72069be2008-12-08 13:36:18 +0200388
Roman Tereshonkov4085bcc2011-02-08 12:02:40 +0200389 /* Multi-block erase all eraseblocks */
390 for (k = 1; k < 7; k++) {
391 blocks = 1 << k;
Vikram Narayanan2c70d292012-10-10 23:10:02 +0530392 pr_info("Testing %dx multi-block erase speed\n",
Roman Tereshonkov4085bcc2011-02-08 12:02:40 +0200393 blocks);
394 start_timing();
395 for (i = 0; i < ebcnt; ) {
396 for (j = 0; j < blocks && (i + j) < ebcnt; j++)
397 if (bbt[i + j])
398 break;
399 if (j < 1) {
400 i++;
401 continue;
402 }
403 err = multiblock_erase(i, j);
404 if (err)
405 goto out;
Richard Weinberger2a6a28e72015-03-29 21:52:06 +0200406
407 err = mtdtest_relax();
408 if (err)
409 goto out;
410
Roman Tereshonkov4085bcc2011-02-08 12:02:40 +0200411 i += j;
412 }
413 stop_timing();
414 speed = calc_speed();
Vikram Narayanan2c70d292012-10-10 23:10:02 +0530415 pr_info("%dx multi-block erase speed is %ld KiB/s\n",
Roman Tereshonkov4085bcc2011-02-08 12:02:40 +0200416 blocks, speed);
417 }
Vikram Narayanan2c70d292012-10-10 23:10:02 +0530418 pr_info("finished\n");
Artem Bityutskiy72069be2008-12-08 13:36:18 +0200419out:
420 kfree(iobuf);
421 kfree(bbt);
422 put_mtd_device(mtd);
423 if (err)
Vikram Narayanan2c70d292012-10-10 23:10:02 +0530424 pr_info("error %d occurred\n", err);
Artem Bityutskiy72069be2008-12-08 13:36:18 +0200425 printk(KERN_INFO "=================================================\n");
426 return err;
427}
428module_init(mtd_speedtest_init);
429
430static void __exit mtd_speedtest_exit(void)
431{
432 return;
433}
434module_exit(mtd_speedtest_exit);
435
436MODULE_DESCRIPTION("Speed test module");
437MODULE_AUTHOR("Adrian Hunter");
438MODULE_LICENSE("GPL");