public inbox for linux-mtd@lists.infradead.org
 help / color / mirror / Atom feed
* Fix to jedec_probe unlock addresses
@ 2004-09-20 23:44 Ben Dooks
  2004-09-23  1:48 ` Eric W. Biederman
  0 siblings, 1 reply; 6+ messages in thread
From: Ben Dooks @ 2004-09-20 23:44 UTC (permalink / raw)
  To: linux-mtd; +Cc: ben

Fix unlock address calculation for non-x8 chips for the
cfi cmdset code, which assumes always X8

Patch against 2.6.9-rc2 with 19th September CVS

Signed-off-by: Ben Dooks <ben-mtd@fluff.org>

--- linux-2.6.9-rc2-bk6-mtd20040919/drivers/mtd/chips/jedec_probe.c	2004-09-20 13:02:46.000000000 +0100
+++ linux-2.6.9-rc2-bk6-mtd20040919-work/drivers/mtd/chips/jedec_probe.c	2004-09-20 23:21:40.000000000 +0100
@@ -2046,7 +2046,15 @@
 	printk(KERN_INFO "%s: Found %d x%d devices at 0x%x in %d-bit bank\n",
 	       map->name, cfi_interleave(cfi), cfi->device_type*8, base, 
 	       map->bankwidth*8);
-	
+
+	/* fixup unlock addresses for the cmdset */
+
+	cfi->addr_unlock1 *= cfi_interleave(cfi) * cfi->device_type;
+	cfi->addr_unlock2 *= cfi_interleave(cfi) * cfi->device_type;
+
+	printk(KERN_DEBUG "unlocks at %08x,%08x\n", 
+	       cfi->addr_unlock1, cfi->addr_unlock2);
+
 	return 1;
 }
 

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2004-09-28 12:15 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2004-09-20 23:44 Fix to jedec_probe unlock addresses Ben Dooks
2004-09-23  1:48 ` Eric W. Biederman
2004-09-23 21:01   ` Ben Dooks
2004-09-23 21:36     ` Eric W. Biederman
2004-09-24  4:29       ` [CFT] FIX CFI cmdset 0002 for x16 and x32 devices Eric W. Biederman
2004-09-28 12:15         ` Ben Dooks

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox