mtd/drivers/mtd/maps physmap.c,1.20,1.21

acurtis at onz.com acurtis at onz.com
Thu Sep 5 01:12:57 EDT 2002


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

Modified Files:
	physmap.c 
Log Message:
Removed 64-bit conditional code

Index: physmap.c
===================================================================
RCS file: /home/cvs/mtd/drivers/mtd/maps/physmap.c,v
retrieving revision 1.20
retrieving revision 1.21
diff -u -r1.20 -r1.21
--- physmap.c	30 Apr 2002 09:14:50 -0000	1.20
+++ physmap.c	5 Sep 2002 05:12:54 -0000	1.21
@@ -37,13 +37,6 @@
 	return __raw_readl(map->map_priv_1 + ofs);
 }
 
-#ifdef CFI_WORD_64
-__u64 physmap_read64(struct map_info *map, unsigned long ofs)
-{
-	return __raw_readll(map->map_priv_1 + ofs);
-}
-#endif
-
 void physmap_copy_from(struct map_info *map, void *to, unsigned long from, ssize_t len)
 {
 	memcpy_fromio(to, map->map_priv_1 + from, len);
@@ -67,14 +60,6 @@
 	mb();
 }
 
-#ifdef CFI_WORD_64
-void physmap_write64(struct map_info *map, __u64 d, unsigned long adr)
-{
-	__raw_writell(d, map->map_priv_1 + adr);
-	mb();
-}
-#endif
-
 void physmap_copy_to(struct map_info *map, unsigned long to, const void *from, ssize_t len)
 {
 	memcpy_toio(map->map_priv_1 + to, from, len);
@@ -87,16 +72,10 @@
 	read8: physmap_read8,
 	read16: physmap_read16,
 	read32: physmap_read32,
-#ifdef CFI_WORD_64
-	read64: physmap_read64,
-#endif
 	copy_from: physmap_copy_from,
 	write8: physmap_write8,
 	write16: physmap_write16,
 	write32: physmap_write32,
-#ifdef CFI_WORD_64
-	write64: physmap_write64,
-#endif
 	copy_to: physmap_copy_to
 };
 
@@ -104,6 +83,35 @@
 #ifdef CONFIG_MTD_CMDLINE_PARTS
 static struct mtd_partition *mtd_parts = 0;
 static int                   mtd_parts_nb = 0;
+#else
+static struct mtd_partition physmap_partitions[] = {
+/* Put your own partition definitions here */
+#if 0
+	{
+		name:		"bootROM",
+		size:		0x80000,
+		offset:		0,
+		mask_flags:	MTD_WRITEABLE,  /* force read-only */
+	}, {
+		name:		"zImage",
+		size:		0x100000,
+		offset:		MTDPART_OFS_APPEND,
+		mask_flags:	MTD_WRITEABLE,  /* force read-only */
+	}, {
+		name:		"ramdisk.gz",
+		size:		0x300000,
+		offset:		MTDPART_OFS_APPEND,
+		mask_flags:	MTD_WRITEABLE,  /* force read-only */
+	}, {
+		name:		"User FS",
+		size:		MTDPART_SIZ_FULL,
+		offset:		MTDPART_OFS_APPEND,
+	}
+#endif
+};
+
+#define NUM_PARTITIONS	(sizeof(physmap_partitions)/sizeof(struct mtd_partition))
+
 #endif
 #endif
 
@@ -139,6 +147,14 @@
 			       "Using command line partition definition\n");
 			add_mtd_partitions (mymtd, mtd_parts, mtd_parts_nb);
 		}
+#else
+		if (NUM_PARTITIONS != 0) 
+		{
+			printk(KERN_NOTICE 
+			       "Using physmap partition definition\n");
+			add_mtd_partitions (mymtd, physmap_partitions, NUM_PARTITIONS);
+		}
+
 #endif
 #endif
 		return 0;





More information about the linux-mtd-cvs mailing list