mtd/drivers/mtd/chips cfi_cmdset_0020.c,NONE,1.1 Config.in,1.15,1.16 gen_probe.c,1.7,1.8

joern at infradead.org joern at infradead.org
Tue Sep 3 09:30:45 EDT 2002


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

Modified Files:
	Config.in gen_probe.c 
Added Files:
	cfi_cmdset_0020.c 
Log Message:
added support for STMicro flashes with ecc.
should work with non-ecc flashes as well.



--- NEW FILE cfi_cmdset_0020.c ---
/*
 * Common Flash Interface support:
 *   ST Advanced Architecture Command Set (ID 0x0020)
 *
 * (C) 2000 Red Hat. GPL'd
 *
 * 
 * 10/10/2000	Nicolas Pitre <nico at cam.org>
 * 	- completely revamped method functions so they are aware and
 * 	  independent of the flash geometry (buswidth, interleave, etc.)
 * 	- scalability vs code size is completely set at compile-time
 * 	  (see include/linux/mtd/cfi.h for selection)
 *	- optimized write buffer method
 * 06/21/2002	Joern Engel <joern at wh.fh-wedel.de> and others
 *	- modified Intel Command Set 0x0001 to support ST Advanced Architecture
 *	  (command set 0x0020)
 *	- added a writev function
 */

[...1412 lines suppressed...]
#if LINUX_VERSION_CODE < 0x20212 && defined(MODULE)
#define cfi_staa_init init_module
#define cfi_staa_exit cleanup_module
#endif

static char im_name[]="cfi_cmdset_0020";

mod_init_t cfi_staa_init(void)
{
	inter_module_register(im_name, THIS_MODULE, &cfi_cmdset_0020);
	return 0;
}

mod_exit_t cfi_staa_exit(void)
{
	inter_module_unregister(im_name);
}

module_init(cfi_staa_init);
module_exit(cfi_staa_exit);

Index: Config.in
===================================================================
RCS file: /home/cvs/mtd/drivers/mtd/chips/Config.in,v
retrieving revision 1.15
retrieving revision 1.16
diff -u -r1.15 -r1.16
--- Config.in	13 Feb 2002 16:29:15 -0000	1.15
+++ Config.in	3 Sep 2002 13:30:43 -0000	1.16
@@ -44,6 +44,7 @@
 fi
 dep_tristate '  Support for Intel/Sharp flash chips' CONFIG_MTD_CFI_INTELEXT $CONFIG_MTD_GEN_PROBE
 dep_tristate '  Support for AMD/Fujitsu flash chips' CONFIG_MTD_CFI_AMDSTD $CONFIG_MTD_GEN_PROBE
+dep_tristate '  Support for ST (Advanced Architecture) flash chips' CONFIG_MTD_CFI_STAA $CONFIG_MTD_GEN_PROBE
 
 dep_tristate '  Support for RAM chips in bus mapping' CONFIG_MTD_RAM $CONFIG_MTD
 dep_tristate '  Support for ROM chips in bus mapping' CONFIG_MTD_ROM $CONFIG_MTD

Index: gen_probe.c
===================================================================
RCS file: /home/cvs/mtd/drivers/mtd/chips/gen_probe.c,v
retrieving revision 1.7
retrieving revision 1.8
diff -u -r1.7 -r1.8
--- gen_probe.c	30 Jan 2002 09:08:31 -0000	1.7
+++ gen_probe.c	3 Sep 2002 13:30:43 -0000	1.8
@@ -295,6 +295,10 @@
 	case 0x0002:
 		return cfi_cmdset_0002(map, primary);
 #endif
+#ifdef CONFIG_MTD_CFI_STAA
+        case 0x0020:
+		return cfi_cmdset_0020(map, primary);
+#endif
 	}
 
 	return cfi_cmdset_unknown(map, primary);





More information about the linux-mtd-cvs mailing list