public inbox for linux-mtd@lists.infradead.org
 help / color / mirror / Atom feed
* [PATCH] fix cfi for collie flash
@ 2008-04-22 23:40 Thomas Kunze
  2008-04-23  0:30 ` David Woodhouse
  0 siblings, 1 reply; 6+ messages in thread
From: Thomas Kunze @ 2008-04-22 23:40 UTC (permalink / raw)
  To: linux-mtd

Hi,

collie seems to contain LH28F640BF flash chips. According to 
http://sharp-world.com/products/device/flash/pdf/*FUM00701*@E.pdf
(page 83) if they have 0x51 of Extended Query Table (number of hardware 
partitions) set to zero, they have a single fixed partition.
This patch makes those chips work.

Regards,
Thomas

Signed-off-by: Thomas Kunze <thommycheck@gmx.de>
diff --git a/drivers/mtd/chips/cfi_cmdset_0001.c 
b/drivers/mtd/chips/cfi_cmdset_0001.c
index 0080452..34da59b 100644
--- a/drivers/mtd/chips/cfi_cmdset_0001.c
+++ b/drivers/mtd/chips/cfi_cmdset_0001.c
@@ -618,7 +618,11 @@ static int cfi_intelext_partition_fixup(struct 
mtd_info *mtd,
                               + (rinfo->NumBlockTypes - 1) *
                                 sizeof(struct cfi_intelext_blockinfo);
               }
-
+
+               /* if numregions=0 we have one big partition */
+               if(!numparts)
+                       numparts = 1;
+
               /* Programming Region info */
               if (extp->MinorVersion >= '4') {
                       struct cfi_intelext_programming_regioninfo *prinfo;

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

end of thread, other threads:[~2008-04-23  1:31 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-04-22 23:40 [PATCH] fix cfi for collie flash Thomas Kunze
2008-04-23  0:30 ` David Woodhouse
2008-04-23  1:16   ` Thomas Kunze
2008-04-23  1:22     ` David Woodhouse
2008-04-23  1:28       ` Thomas Kunze
2008-04-23  1:31         ` David Woodhouse

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