mtd/include/linux/mtd cfi.h,1.43,1.44
David Woodhouse
dwmw2 at infradead.org
Tue Jul 13 18:32:55 EDT 2004
Update of /home/cvs/mtd/include/linux/mtd
In directory phoenix.infradead.org:/tmp/cvs-serv30517/include/linux/mtd
Modified Files:
cfi.h
Log Message:
inlines to check for supported interleave
Index: cfi.h
===================================================================
RCS file: /home/cvs/mtd/include/linux/mtd/cfi.h,v
retrieving revision 1.43
retrieving revision 1.44
diff -u -r1.43 -r1.44
--- cfi.h 12 Jul 2004 21:56:58 -0000 1.43
+++ cfi.h 13 Jul 2004 22:32:52 -0000 1.44
@@ -59,6 +59,29 @@
#define cfi_interleave_is_8(cfi) (0)
#endif
+static inline int cfi_interleave_supported(int i)
+{
+ switch (i) {
+#ifdef CONFIG_MTD_CFI_I1
+ case 1:
+#endif
+#ifdef CONFIG_MTD_CFI_I2
+ case 2:
+#endif
+#ifdef CONFIG_MTD_CFI_I4
+ case 4:
+#endif
+#ifdef CONFIG_MTD_CFI_I8
+ case 8:
+#endif
+ return 1;
+
+ default:
+ return 0;
+ }
+}
+
+
/* NB: these values must represents the number of bytes needed to meet the
* device type (x8, x16, x32). Eg. a 32 bit device is 4 x 8 bytes.
* These numbers are used in calculations.
More information about the linux-mtd-cvs
mailing list