mtd/include/linux/mtd flashchip.h,1.12,1.13

Nicolas Pitre nico at infradead.org
Thu Jun 10 16:54:59 EDT 2004


Update of /home/cvs/mtd/include/linux/mtd
In directory phoenix.infradead.org:/tmp/cvs-serv32670/include/linux/mtd

Modified Files:
	flashchip.h 
Log Message:
Second attempt at supporting the multipartition L18 Intel flash chips.
Again, the non-partitioned case should not have its logic altered so this
is not supposed to break existing users.  The partition support code could
benefit from extra review though.


Index: flashchip.h
===================================================================
RCS file: /home/cvs/mtd/include/linux/mtd/flashchip.h,v
retrieving revision 1.12
retrieving revision 1.13
diff -u -r1.12 -r1.13
--- flashchip.h	9 Jun 2004 18:35:52 -0000	1.12
+++ flashchip.h	10 Jun 2004 20:54:56 -0000	1.13
@@ -43,7 +43,8 @@
 
 
 /* NOTE: confusingly, this can be used to refer to more than one chip at a time, 
-   if they're interleaved. */
+   if they're interleaved.  This can even refer to individual partitions on
+   the same physical chip when present. */
 
 struct flchip {
 	unsigned long start; /* Offset within the map */
@@ -70,8 +71,17 @@
 	int word_write_time;
 	int buffer_write_time;
 	int erase_time;
+
+	void *priv;
 };
 
+/* This is used to handle contentionon write/erase oerationss
+   between partitions of the same physical chip. */
+struct flchip_shared {
+	spinlock_t lock;
+	struct flchip *writing;
+	struct flchip *erasing;
+};
 
 
 #endif /* __MTD_FLASHCHIP_H__ */





More information about the linux-mtd-cvs mailing list