* [PATCH][MTD] Fix incorrect interface code for x16/x32 chips
@ 2007-11-26 17:55 Bartlomiej Sieka
2007-12-04 23:17 ` Bartlomiej Sieka
0 siblings, 1 reply; 6+ messages in thread
From: Bartlomiej Sieka @ 2007-11-26 17:55 UTC (permalink / raw)
To: linux-mtd
According to "Common Flash Memory Interface Publication 100" dated December 1,
2001, the interface code for x16/x32 chips is 0x0005, and not 0x0004 used so
far.
Signed-off-by: Bartlomiej Sieka <tur@semihalf.com>
---
diff --git a/drivers/mtd/chips/cfi_cmdset_0002.c b/drivers/mtd/chips/cfi_cmdset_0002.c
index 389acc6..93ec811 100644
--- a/drivers/mtd/chips/cfi_cmdset_0002.c
+++ b/drivers/mtd/chips/cfi_cmdset_0002.c
@@ -338,10 +338,12 @@ struct mtd_info *cfi_cmdset_0002(struct map_info *map, int primary)
/* Modify the unlock address if we are in compatibility mode */
if ( /* x16 in x8 mode */
((cfi->device_type == CFI_DEVICETYPE_X8) &&
- (cfi->cfiq->InterfaceDesc == 2)) ||
+ (cfi->cfiq->InterfaceDesc ==
+ CFI_INTERFACE_X8_BY_X16_ASYNC)) ||
/* x32 in x16 mode */
((cfi->device_type == CFI_DEVICETYPE_X16) &&
- (cfi->cfiq->InterfaceDesc == 4)))
+ (cfi->cfiq->InterfaceDesc ==
+ CFI_INTERFACE_X16_BY_X32_ASYNC)))
{
cfi->addr_unlock1 = 0xaaa;
cfi->addr_unlock2 = 0x555;
diff --git a/drivers/mtd/chips/cfi_probe.c b/drivers/mtd/chips/cfi_probe.c
index 60e11a0..f651b6e 100644
--- a/drivers/mtd/chips/cfi_probe.c
+++ b/drivers/mtd/chips/cfi_probe.c
@@ -370,27 +370,27 @@ static void print_cfi_ident(struct cfi_ident *cfip)
printk("Device size: 0x%X bytes (%d MiB)\n", 1 << cfip->DevSize, 1<< (cfip->DevSize - 20));
printk("Flash Device Interface description: 0x%4.4X\n", cfip->InterfaceDesc);
switch(cfip->InterfaceDesc) {
- case 0:
+ case CFI_INTERFACE_X8_ASYNC:
printk(" - x8-only asynchronous interface\n");
break;
- case 1:
+ case CFI_INTERFACE_X16_ASYNC:
printk(" - x16-only asynchronous interface\n");
break;
- case 2:
+ case CFI_INTERFACE_X8_BY_X16_ASYNC:
printk(" - supports x8 and x16 via BYTE# with asynchronous interface\n");
break;
- case 3:
+ case CFI_INTERFACE_X32_ASYNC:
printk(" - x32-only asynchronous interface\n");
break;
- case 4:
+ case CFI_INTERFACE_X16_BY_X32_ASYNC:
printk(" - supports x16 and x32 via Word# with asynchronous interface\n");
break;
- case 65535:
+ case CFI_INTERFACE_NOT_ALLOWED:
printk(" - Not Allowed / Reserved\n");
break;
diff --git a/drivers/mtd/maps/scb2_flash.c b/drivers/mtd/maps/scb2_flash.c
index dcfb858..0fc5584 100644
--- a/drivers/mtd/maps/scb2_flash.c
+++ b/drivers/mtd/maps/scb2_flash.c
@@ -79,7 +79,7 @@ scb2_fixup_mtd(struct mtd_info *mtd)
struct cfi_private *cfi = map->fldrv_priv;
/* barf if this doesn't look right */
- if (cfi->cfiq->InterfaceDesc != 1) {
+ if (cfi->cfiq->InterfaceDesc != CFI_INTERFACE_X16_ASYNC) {
printk(KERN_ERR MODNAME ": unsupported InterfaceDesc: %#x\n",
cfi->cfiq->InterfaceDesc);
return -1;
diff --git a/include/linux/mtd/cfi.h b/include/linux/mtd/cfi.h
index e17c534..b0ddf4b 100644
--- a/include/linux/mtd/cfi.h
+++ b/include/linux/mtd/cfi.h
@@ -98,6 +98,18 @@ static inline int cfi_interleave_supported(int i)
#define CFI_DEVICETYPE_X32 (32 / 8)
#define CFI_DEVICETYPE_X64 (64 / 8)
+
+/* Device Interface Code Assignments from the "Common Flash Memory Interface
+ * Publication 100" dated December 1, 2001.
+ */
+#define CFI_INTERFACE_X8_ASYNC 0x0000
+#define CFI_INTERFACE_X16_ASYNC 0x0001
+#define CFI_INTERFACE_X8_BY_X16_ASYNC 0x0002
+#define CFI_INTERFACE_X32_ASYNC 0x0003
+#define CFI_INTERFACE_X16_BY_X32_ASYNC 0x0005
+#define CFI_INTERFACE_NOT_ALLOWED 0xffff
+
+
/* NB: We keep these structures in memory in HOST byteorder, except
* where individually noted.
*/
^ permalink raw reply related [flat|nested] 6+ messages in thread* Re: [PATCH][MTD] Fix incorrect interface code for x16/x32 chips
2007-11-26 17:55 [PATCH][MTD] Fix incorrect interface code for x16/x32 chips Bartlomiej Sieka
@ 2007-12-04 23:17 ` Bartlomiej Sieka
2008-01-10 9:20 ` Bartlomiej Sieka
0 siblings, 1 reply; 6+ messages in thread
From: Bartlomiej Sieka @ 2007-12-04 23:17 UTC (permalink / raw)
To: linux-mtd
Bartlomiej Sieka wrote:
> According to "Common Flash Memory Interface Publication 100" dated December 1,
> 2001, the interface code for x16/x32 chips is 0x0005, and not 0x0004 used so
> far.
>
> Signed-off-by: Bartlomiej Sieka <tur@semihalf.com>
I'd appreciate some feedback on the status of this patch.
Thanks in advance,
Bartlomiej
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH][MTD] Fix incorrect interface code for x16/x32 chips
2007-12-04 23:17 ` Bartlomiej Sieka
@ 2008-01-10 9:20 ` Bartlomiej Sieka
2008-01-10 11:03 ` Jörn Engel
2008-01-10 22:11 ` David Woodhouse
0 siblings, 2 replies; 6+ messages in thread
From: Bartlomiej Sieka @ 2008-01-10 9:20 UTC (permalink / raw)
To: linux-mtd
Bartlomiej Sieka wrote:
> Bartlomiej Sieka wrote:
>> According to "Common Flash Memory Interface Publication 100" dated
>> December 1, 2001, the interface code for x16/x32 chips is 0x0005,
>> and not 0x0004 used so far.
>>
>> Signed-off-by: Bartlomiej Sieka <tur@semihalf.com>
>
> I'd appreciate some feedback on the status of this patch.
Hmm, it's been over a month now since the patch has been posted, and
there haven't been any comments, acceptance/rejection notices, etc. Is
this a wrong list to post this patch? Did I miss some formal requirement
or something? Are people just too busy?
Regards,
Bartlomiej
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH][MTD] Fix incorrect interface code for x16/x32 chips
2008-01-10 9:20 ` Bartlomiej Sieka
@ 2008-01-10 11:03 ` Jörn Engel
2008-01-10 22:11 ` David Woodhouse
1 sibling, 0 replies; 6+ messages in thread
From: Jörn Engel @ 2008-01-10 11:03 UTC (permalink / raw)
To: Bartlomiej Sieka; +Cc: linux-mtd
On Thu, 10 January 2008 10:20:50 +0100, Bartlomiej Sieka wrote:
>
> Hmm, it's been over a month now since the patch has been posted, and
> there haven't been any comments, acceptance/rejection notices, etc. Is
> this a wrong list to post this patch? Did I miss some formal requirement
> or something? Are people just too busy?
David tends to be almost constantly busy. On rare occasions he gets
some free time and merges a large number of patches within one or two
days, then disappears again.
Some people send their patches to Andrew Morton and have him bug David
from time to time.
Jörn
--
"Translations are and will always be problematic. They inflict violence
upon two languages." (translation from German)
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH][MTD] Fix incorrect interface code for x16/x32 chips
2008-01-10 9:20 ` Bartlomiej Sieka
2008-01-10 11:03 ` Jörn Engel
@ 2008-01-10 22:11 ` David Woodhouse
2008-01-11 15:27 ` Bartlomiej Sieka
1 sibling, 1 reply; 6+ messages in thread
From: David Woodhouse @ 2008-01-10 22:11 UTC (permalink / raw)
To: Bartlomiej Sieka; +Cc: linux-mtd
On Thu, 2008-01-10 at 10:20 +0100, Bartlomiej Sieka wrote:
> Bartlomiej Sieka wrote:
> > Bartlomiej Sieka wrote:
> >> According to "Common Flash Memory Interface Publication 100" dated
> >> December 1, 2001, the interface code for x16/x32 chips is 0x0005,
> >> and not 0x0004 used so far.
> >>
> >> Signed-off-by: Bartlomiej Sieka <tur@semihalf.com>
> >
> > I'd appreciate some feedback on the status of this patch.
>
> Hmm, it's been over a month now since the patch has been posted, and
> there haven't been any comments, acceptance/rejection notices, etc. Is
> this a wrong list to post this patch? Did I miss some formal requirement
> or something? Are people just too busy?
Sorry. As Jörn said, I tend to apply patches in bursts. When the merge
window is about to open I try to make sure I catch up. I've applied your
patch now.
Sending it on my girlfriend's birthday and then following up on my
birthday isn't the best way to make sure I pay attention, fwiw :)
--
dwmw2
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH][MTD] Fix incorrect interface code for x16/x32 chips
2008-01-10 22:11 ` David Woodhouse
@ 2008-01-11 15:27 ` Bartlomiej Sieka
0 siblings, 0 replies; 6+ messages in thread
From: Bartlomiej Sieka @ 2008-01-11 15:27 UTC (permalink / raw)
To: David Woodhouse; +Cc: linux-mtd
David Woodhouse wrote:
[...]
>>>> According to "Common Flash Memory Interface Publication 100" dated
>>>> December 1, 2001, the interface code for x16/x32 chips is 0x0005,
>>>> and not 0x0004 used so far.
>>>>
>>>> Signed-off-by: Bartlomiej Sieka <tur@semihalf.com>
[...]
> Sorry. As Jörn said, I tend to apply patches in bursts. When the merge
> window is about to open I try to make sure I catch up. I've applied your
> patch now.
OK, thanks.
>
> Sending it on my girlfriend's birthday and then following up on my
> birthday isn't the best way to make sure I pay attention, fwiw :)
Ah, I've marked my calendar now :)
Cheers,
Bartlomiej
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2008-01-11 15:28 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-11-26 17:55 [PATCH][MTD] Fix incorrect interface code for x16/x32 chips Bartlomiej Sieka
2007-12-04 23:17 ` Bartlomiej Sieka
2008-01-10 9:20 ` Bartlomiej Sieka
2008-01-10 11:03 ` Jörn Engel
2008-01-10 22:11 ` David Woodhouse
2008-01-11 15:27 ` Bartlomiej Sieka
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox