From: Thomas Kunze <thommycheck@gmx.de>
To: linux-mtd@lists.infradead.org
Subject: [PATCH] fix cfi for collie flash
Date: Wed, 23 Apr 2008 01:40:52 +0200 [thread overview]
Message-ID: <480E7784.6030902@gmx.de> (raw)
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;
next reply other threads:[~2008-04-22 23:40 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-04-22 23:40 Thomas Kunze [this message]
2008-04-23 0:30 ` [PATCH] fix cfi for collie flash 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
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=480E7784.6030902@gmx.de \
--to=thommycheck@gmx.de \
--cc=linux-mtd@lists.infradead.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox