[MTD] NAND: nandsim page-wise allocation (1/2)

Linux-MTD Mailing List linux-mtd at lists.infradead.org
Sat Oct 21 11:59:04 EDT 2006


Commit:     47e37743381823a5c2d51ef88cfc3d6cff1f8580
Parent:     6652018c829c26d6ab0524c5c74f70daa5ed478d
commit 47e37743381823a5c2d51ef88cfc3d6cff1f8580
Author:     Vijay Kumar <vijaykumar at bravegnu.org>
AuthorDate: Sun Oct 8 22:00:37 2006 +0530
Commit:     David Woodhouse <dwmw2 at infradead.org>
CommitDate: Sat Oct 21 16:39:56 2006 +0100

    [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 at bravegnu.org>
    Signed-off-by: David Woodhouse <dwmw2 at infradead.org>
---
 drivers/mtd/nand/nandsim.c |   22 ----------------------
 1 files changed, 0 insertions(+), 22 deletions(-)

diff --git a/drivers/mtd/nand/nandsim.c b/drivers/mtd/nand/nandsim.c
index 545ff25..5dd3c4e 100644
--- a/drivers/mtd/nand/nandsim.c
+++ b/drivers/mtd/nand/nandsim.c
@@ -37,10 +37,6 @@ #include <linux/mtd/mtd.h>
 #include <linux/mtd/nand.h>
 #include <linux/mtd/partitions.h>
 #include <linux/delay.h>
-#ifdef CONFIG_NS_ABS_POS
-#include <asm/io.h>
-#endif
-
 
 /* Default simulator parameters values */
 #if !defined(CONFIG_NANDSIM_FIRST_ID_BYTE)  || \
@@ -440,14 +436,6 @@ init_nandsim(struct mtd_info *mtd)
 	printk("options: %#x\n",                ns->options);
 
 	/* Map / allocate and initialize the flash image */
-#ifdef CONFIG_NS_ABS_POS
-	ns->mem.byte = ioremap(CONFIG_NS_ABS_POS, ns->geom.totszoob);
-	if (!ns->mem.byte) {
-		NS_ERR("init_nandsim: failed to map the NAND flash image at address %p\n",
-			(void *)CONFIG_NS_ABS_POS);
-		return -ENOMEM;
-	}
-#else
 	ns->mem.byte = vmalloc(ns->geom.totszoob);
 	if (!ns->mem.byte) {
 		NS_ERR("init_nandsim: unable to allocate %u bytes for flash image\n",
@@ -455,7 +443,6 @@ #else
 		return -ENOMEM;
 	}
 	memset(ns->mem.byte, 0xFF, ns->geom.totszoob);
-#endif
 
 	/* Allocate / initialize the internal buffer */
 	ns->buf.byte = kmalloc(ns->geom.pgszoob, GFP_KERNEL);
@@ -474,11 +461,7 @@ #endif
 	return 0;
 
 error:
-#ifdef CONFIG_NS_ABS_POS
-	iounmap(ns->mem.byte);
-#else
 	vfree(ns->mem.byte);
-#endif
 
 	return -ENOMEM;
 }
@@ -490,12 +473,7 @@ static void
 free_nandsim(struct nandsim *ns)
 {
 	kfree(ns->buf.byte);
-
-#ifdef CONFIG_NS_ABS_POS
-	iounmap(ns->mem.byte);
-#else
 	vfree(ns->mem.byte);
-#endif
 
 	return;
 }



More information about the linux-mtd-cvs mailing list