* [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* Re: [PATCH] fix cfi for collie flash
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
0 siblings, 1 reply; 6+ messages in thread
From: David Woodhouse @ 2008-04-23 0:30 UTC (permalink / raw)
To: Thomas Kunze; +Cc: linux-mtd
On Wed, 2008-04-23 at 01:40 +0200, Thomas Kunze wrote:
> 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.
fatal: corrupt patch at line 8
Patch failed at 0001.
--
dwmw2
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH] fix cfi for collie flash
2008-04-23 0:30 ` David Woodhouse
@ 2008-04-23 1:16 ` Thomas Kunze
2008-04-23 1:22 ` David Woodhouse
0 siblings, 1 reply; 6+ messages in thread
From: Thomas Kunze @ 2008-04-23 1:16 UTC (permalink / raw)
To: David Woodhouse; +Cc: linux-mtd
Again with (hopefully) no line wrappings.
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* Re: [PATCH] fix cfi for collie flash
2008-04-23 1:16 ` Thomas Kunze
@ 2008-04-23 1:22 ` David Woodhouse
2008-04-23 1:28 ` Thomas Kunze
0 siblings, 1 reply; 6+ messages in thread
From: David Woodhouse @ 2008-04-23 1:22 UTC (permalink / raw)
To: Thomas Kunze; +Cc: linux-mtd
On Wed, 2008-04-23 at 03:16 +0200, Thomas Kunze wrote:
> Again with (hopefully) no line wrappings.
Nope. In general, it's worth sending things to yourself first, saving
them from the email you receive, and checking that you can apply them to
a clean tree. Only then do you send it to other people.
Also, ...
ERROR: use tabs not spaces
#65: FILE: drivers/mtd/chips/cfi_cmdset_0001.c:622:
+ /* if numregions=0 we have one big partition */$
ERROR: use tabs not spaces
#66: FILE: drivers/mtd/chips/cfi_cmdset_0001.c:623:
+ if(!numparts)$
ERROR: space required before the open parenthesis '('
#66: FILE: drivers/mtd/chips/cfi_cmdset_0001.c:623:
+ if(!numparts)
ERROR: use tabs not spaces
#67: FILE: drivers/mtd/chips/cfi_cmdset_0001.c:624:
+ numparts = 1;$
total: 4 errors, 0 warnings, 12 lines checked
I've fixed it for now, but don't let that stop you from becoming
familiar with scripts/checkpatch.pl and working out how to make your
mailer behave :)
Thanks for the patch.
--
dwmw2
^ permalink raw reply [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