mtd/drivers/mtd/maps amd76xrom.c,1.15,1.16 ichxrom.c,1.12,1.13

ebiederman at lnxi.com ebiederman at lnxi.com
Fri Sep 17 07:45:09 EDT 2004


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

Modified Files:
	amd76xrom.c ichxrom.c 
Log Message:
- Support for the ST M50LPW080 flash chip
- Debugging support for fwh_lock.h
- Minor cleanups to amd76xrom and ichxrom


Index: amd76xrom.c
===================================================================
RCS file: /home/cvs/mtd/drivers/mtd/maps/amd76xrom.c,v
retrieving revision 1.15
retrieving revision 1.16
diff -u -r1.15 -r1.16
--- amd76xrom.c	17 Sep 2004 06:27:59 -0000	1.15
+++ amd76xrom.c	17 Sep 2004 11:45:06 -0000	1.16
@@ -150,7 +150,15 @@
 
 	/* Get the first address to look for an rom chip at */
 	map_top = window->phys;
-
+#if 1
+	/* The probe sequence run over the firmware hub lock
+	 * registers sets them to 0x7 (no access).
+	 * Probe at most the last 4M of the address space.
+	 */
+	if (map_top < 0xffc00000) {
+		map_top = 0xffc00000;
+	}
+#endif
 	/* Loop  through and look for rom chips */
 	while((map_top - 1) < 0xffffffffUL) {
 		struct cfi_private *cfi;
@@ -178,7 +186,7 @@
 
 		/* There is no generic VPP support */
 		for(map->map.bankwidth = 32; map->map.bankwidth; 
-			map->map.bankwidth >>=1)
+			map->map.bankwidth >>= 1)
 		{
 			char **probe_type;
 			/* Skip bankwidths that are not supported */
@@ -187,7 +195,7 @@
 
 			/* Setup the map methods */
 			simple_map_init(&map->map);
-			
+
 			/* Try all of the probe methods */
 			probe_type = rom_probe_types;
 			for(; *probe_type; probe_type++) {
@@ -199,7 +207,7 @@
 		map_top += ROM_PROBE_STEP_SIZE;
 		continue;
 	found:
-		/* Trim the size of we are larger than the map */
+		/* Trim the size if we are larger than the map */
 		if (map->mtd->size > map->map.size) {
 			printk(KERN_WARNING MOD_NAME
 				" rom(%u) larger than window(%lu). fixing...\n",

Index: ichxrom.c
===================================================================
RCS file: /home/cvs/mtd/drivers/mtd/maps/ichxrom.c,v
retrieving revision 1.12
retrieving revision 1.13
diff -u -r1.12 -r1.13
--- ichxrom.c	17 Sep 2004 06:29:14 -0000	1.12
+++ ichxrom.c	17 Sep 2004 11:45:06 -0000	1.13
@@ -204,8 +204,7 @@
 		map_top = 0xffc00000;
 	}
 #endif
-
-	/* Loop through and look for a rom chips */
+	/* Loop through and look for rom chips */
 	while((map_top - 1) < 0xffffffffUL) {
 		struct cfi_private *cfi;
 		unsigned long offset;
@@ -235,7 +234,7 @@
 		 * needs to use a different method.
 		 */
 		for(map->map.bankwidth = 32; map->map.bankwidth; 
-			map->map.bankwidth >>= 1) 
+			map->map.bankwidth >>= 1)
 		{
 			char **probe_type;
 			/* Skip bankwidths that are not supported */
@@ -258,7 +257,7 @@
 	found:
 		/* Trim the size if we are larger than the map */
 		if (map->mtd->size > map->map.size) {
-			printk(KERN_WARNING MOD_NAME 
+			printk(KERN_WARNING MOD_NAME
 				" rom(%u) larger than window(%lu). fixing...\n",
 				map->mtd->size, map->map.size);
 			map->mtd->size = map->map.size;
@@ -306,6 +305,7 @@
 	if (map) {
 		kfree(map);
 	}
+	/* See if I have any map structures */
 	if (list_empty(&window->maps)) {
 		ichxrom_cleanup(window);
 		return -ENODEV;





More information about the linux-mtd-cvs mailing list