mtd/drivers/mtd afs.c,1.8,1.9 redboot.c,1.6,1.7

gthomas at infradead.org gthomas at infradead.org
Mon Feb 17 16:49:12 EST 2003


Update of /home/cvs/mtd/drivers/mtd
In directory phoenix.infradead.org:/tmp/cvs-serv1136/drivers/mtd

Modified Files:
	afs.c redboot.c 
Log Message:
Add 'origin' argument to partition scanning functions

Index: afs.c
===================================================================
RCS file: /home/cvs/mtd/drivers/mtd/afs.c,v
retrieving revision 1.8
retrieving revision 1.9
diff -u -r1.8 -r1.9
--- afs.c	4 May 2002 08:49:09 -0000	1.8
+++ afs.c	17 Feb 2003 21:49:09 -0000	1.9
@@ -125,7 +125,9 @@
 	return ret;
 }
 
-int parse_afs_partitions(struct mtd_info *mtd, struct mtd_partition **pparts)
+int parse_afs_partitions(struct mtd_info *mtd, 
+                         struct mtd_partition **pparts,
+                         void *origin)
 {
 	struct mtd_partition *parts;
 	u_int mask, off, idx, sz;

Index: redboot.c
===================================================================
RCS file: /home/cvs/mtd/drivers/mtd/redboot.c,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -r1.6 -r1.7
--- redboot.c	25 Oct 2001 09:16:06 -0000	1.6
+++ redboot.c	17 Feb 2003 21:49:09 -0000	1.7
@@ -34,7 +34,9 @@
 	return 1;
 }
 
-int parse_redboot_partitions(struct mtd_info *master, struct mtd_partition **pparts)
+int parse_redboot_partitions(struct mtd_info *master, 
+                             struct mtd_partition **pparts,
+                             void *fis_origin)
 {
 	int nrparts = 0;
 	struct fis_image_desc *buf;
@@ -90,7 +92,11 @@
 			goto out;
 		}
 		new_fl->img = &buf[i];
-		buf[i].flash_base &= master->size-1;
+                if (fis_origin) {
+                        buf[i].flash_base -= (unsigned long)fis_origin;
+                } else {
+                        buf[i].flash_base &= master->size-1;
+                }
 
 		/* I'm sure the JFFS2 code has done me permanent damage.
 		 * I now think the following is _normal_





More information about the linux-mtd-cvs mailing list