git://git.onelab.eu
/
linux-2.6.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
VServer 1.9.2 (patch-2.6.8.1-vs1.9.2.diff)
[linux-2.6.git]
/
drivers
/
mtd
/
chips
/
map_ram.c
diff --git
a/drivers/mtd/chips/map_ram.c
b/drivers/mtd/chips/map_ram.c
index
7e17b45
..
283be02
100644
(file)
--- a/
drivers/mtd/chips/map_ram.c
+++ b/
drivers/mtd/chips/map_ram.c
@@
-1,7
+1,7
@@
/*
* Common code to handle map devices which are simple RAM
* (C) 2000 Red Hat. GPL'd.
/*
* Common code to handle map devices which are simple RAM
* (C) 2000 Red Hat. GPL'd.
- * $Id: map_ram.c,v 1.
17 2003/05/28 12:51:49
dwmw2 Exp $
+ * $Id: map_ram.c,v 1.
20 2004/08/09 13:19:43
dwmw2 Exp $
*/
#include <linux/module.h>
*/
#include <linux/module.h>
@@
-104,13
+104,17
@@
static int mapram_erase (struct mtd_info *mtd, struct erase_info *instr)
/* Yeah, it's inefficient. Who cares? It's faster than a _real_
flash erase. */
struct map_info *map = (struct map_info *)mtd->priv;
/* Yeah, it's inefficient. Who cares? It's faster than a _real_
flash erase. */
struct map_info *map = (struct map_info *)mtd->priv;
+ map_word allff;
unsigned long i;
unsigned long i;
- for (i=0; i<instr->len; i++)
- map_write8(map, 0xFF, instr->addr + i);
+ allff = map_word_ff(map);
- if (instr->callback)
- instr->callback(instr);
+ for (i=0; i<instr->len; i += map_bankwidth(map))
+ map_write(map, allff, instr->addr + i);
+
+ instr->state = MTD_ERASE_DONE;
+
+ mtd_erase_callback(instr);
return 0;
}
return 0;
}