hardcoded maximum number of CFI chips

Mialkowski, Andrzej Andrzej.Mialkowski at intel.com
Fri Jul 18 08:24:14 EDT 2003


Have a problem with limit of 8 CFI chips, my board has currently 10. It
would be nice to allow specify this in (advanced) configuration. Patch
proposal below.
Andrzej

diff -Nru --minimal prev/drivers/mtd/chips/Config.in
linux/drivers/mtd/chips/Config.in
--- prev/drivers/mtd/chips/Config.in	Fri Mar 14 17:21:15 2003
+++ linux/drivers/mtd/chips/Config.in	Thu Jul 17 16:27:10 2003
@@ -40,6 +40,7 @@
        bool '    Support 4-chip flash interleave' CONFIG_MTD_CFI_I4
        bool '    Support 8-chip flash interleave' CONFIG_MTD_CFI_I8
      fi
+     int '  Maximum number of flash chips' CONFIG_MTD_CFI_MAX_CHIPS 8 1
256
   fi
 fi
 dep_tristate '  Support for Intel/Sharp flash chips'
CONFIG_MTD_CFI_INTELEXT $CONFIG_MTD_GEN_PROBE
diff -Nru --minimal prev/include/linux/mtd/cfi.h
linux/include/linux/mtd/cfi.h
--- prev/include/linux/mtd/cfi.h	Fri Mar 14 17:05:39 2003
+++ linux/include/linux/mtd/cfi.h	Fri Jul 18 09:46:24 2003
@@ -306,7 +306,7 @@
 	struct flchip chips[0];  /* per-chip data structure for each
chip */
 };
 
-#define MAX_CFI_CHIPS 8 /* Entirely arbitrary to avoid realloc() */
+#define MAX_CFI_CHIPS CONFIG_MTD_CFI_MAX_CHIPS
 
 /*
  * Returns the command address according to the given geometry.



More information about the linux-mtd mailing list