]> pilppa.com Git - linux-2.6-omap-h63xx.git/commitdiff
[MTD] [NOR] Fix Intel CFI driver for collie flash
authorThomas Kunze <thommycheck@gmx.de>
Tue, 22 Apr 2008 23:40:52 +0000 (01:40 +0200)
committerDavid Woodhouse <dwmw2@infradead.org>
Wed, 23 Apr 2008 00:32:12 +0000 (01:32 +0100)
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.

Signed-off-by: Thomas Kunze <thommycheck@gmx.de>
Signed-off-by: David Woodhouse <dwmw2@infradead.org>
drivers/mtd/chips/cfi_cmdset_0001.c

index eb0e30824ddbf623681d52bfbd38305e060d85b2..e812df607a5c9aef596e96c4800881cb2df15967 100644 (file)
@@ -619,6 +619,9 @@ static int cfi_intelext_partition_fixup(struct mtd_info *mtd,
                                  sizeof(struct cfi_intelext_blockinfo);
                }
 
+               if (!numparts)
+                       numparts = 1;
+
                /* Programming Region info */
                if (extp->MinorVersion >= '4') {
                        struct cfi_intelext_programming_regioninfo *prinfo;