aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/mtd
diff options
context:
space:
mode:
authorVijay Kumar <vijaykumar@bravegnu.org>2006-10-08 12:30:37 -0400
committerDavid Woodhouse <dwmw2@infradead.org>2006-10-21 11:39:56 -0400
commit47e37743381823a5c2d51ef88cfc3d6cff1f8580 (patch)
tree6bcb2835b2b12bd25a95d272a1c47faeb4d36083 /drivers/mtd
parent6652018c829c26d6ab0524c5c74f70daa5ed478d (diff)
[MTD] NAND: nandsim page-wise allocation (1/2)
This patch removes code that does chip mapping. The chip mapping code is no longer used. Signed-off-by: Vijay Kumar <vijaykumar@bravegnu.org> Signed-off-by: David Woodhouse <dwmw2@infradead.org>
Diffstat (limited to 'drivers/mtd')
-rw-r--r--drivers/mtd/nand/nandsim.c22
1 files changed, 0 insertions, 22 deletions
diff --git a/drivers/mtd/nand/nandsim.c b/drivers/mtd/nand/nandsim.c
index 545ff252d81e..5dd3c4eb4f01 100644
--- a/drivers/mtd/nand/nandsim.c
+++ b/drivers/mtd/nand/nandsim.c
@@ -37,10 +37,6 @@
37#include <linux/mtd/nand.h> 37#include <linux/mtd/nand.h>
38#include <linux/mtd/partitions.h> 38#include <linux/mtd/partitions.h>
39#include <linux/delay.h> 39#include <linux/delay.h>
40#ifdef CONFIG_NS_ABS_POS
41#include <asm/io.h>
42#endif
43
44 40
45/* Default simulator parameters values */ 41/* Default simulator parameters values */
46#if !defined(CONFIG_NANDSIM_FIRST_ID_BYTE) || \ 42#if !defined(CONFIG_NANDSIM_FIRST_ID_BYTE) || \
@@ -440,14 +436,6 @@ init_nandsim(struct mtd_info *mtd)
440 printk("options: %#x\n", ns->options); 436 printk("options: %#x\n", ns->options);
441 437
442 /* Map / allocate and initialize the flash image */ 438 /* Map / allocate and initialize the flash image */
443#ifdef CONFIG_NS_ABS_POS
444 ns->mem.byte = ioremap(CONFIG_NS_ABS_POS, ns->geom.totszoob);
445 if (!ns->mem.byte) {
446 NS_ERR("init_nandsim: failed to map the NAND flash image at address %p\n",
447 (void *)CONFIG_NS_ABS_POS);
448 return -ENOMEM;
449 }
450#else
451 ns->mem.byte = vmalloc(ns->geom.totszoob); 439 ns->mem.byte = vmalloc(ns->geom.totszoob);
452 if (!ns->mem.byte) { 440 if (!ns->mem.byte) {
453 NS_ERR("init_nandsim: unable to allocate %u bytes for flash image\n", 441 NS_ERR("init_nandsim: unable to allocate %u bytes for flash image\n",
@@ -455,7 +443,6 @@ init_nandsim(struct mtd_info *mtd)
455 return -ENOMEM; 443 return -ENOMEM;
456 } 444 }
457 memset(ns->mem.byte, 0xFF, ns->geom.totszoob); 445 memset(ns->mem.byte, 0xFF, ns->geom.totszoob);
458#endif
459 446
460 /* Allocate / initialize the internal buffer */ 447 /* Allocate / initialize the internal buffer */
461 ns->buf.byte = kmalloc(ns->geom.pgszoob, GFP_KERNEL); 448 ns->buf.byte = kmalloc(ns->geom.pgszoob, GFP_KERNEL);
@@ -474,11 +461,7 @@ init_nandsim(struct mtd_info *mtd)
474 return 0; 461 return 0;
475 462
476error: 463error:
477#ifdef CONFIG_NS_ABS_POS
478 iounmap(ns->mem.byte);
479#else
480 vfree(ns->mem.byte); 464 vfree(ns->mem.byte);
481#endif
482 465
483 return -ENOMEM; 466 return -ENOMEM;
484} 467}
@@ -490,12 +473,7 @@ static void
490free_nandsim(struct nandsim *ns) 473free_nandsim(struct nandsim *ns)
491{ 474{
492 kfree(ns->buf.byte); 475 kfree(ns->buf.byte);
493
494#ifdef CONFIG_NS_ABS_POS
495 iounmap(ns->mem.byte);
496#else
497 vfree(ns->mem.byte); 476 vfree(ns->mem.byte);
498#endif
499 477
500 return; 478 return;
501} 479}