Problems with cfi_cmdset_0002 and Atmel AT49BV642D

Michael König Michael.Koenig at ipcas.de
Thu May 10 02:53:13 EDT 2007


Hello Hans-Christian...

> Is there a "fixup_convert_atmel_pri" function which

The function fixup_convert_atmel_pri() is present and is being called as 
confirmed by a printk() I added to it.

> <quote>
> 	/* burst write mode not supported */
> 	cfi->cfiq->BufWriteTimeoutTyp = 0;
> 	cfi->cfiq->BufWriteTimeoutMax = 0;
> </quote>

I'm not sure what version of cfi_cmdset_0002.c you have, but those lines 
are nowhere to be found in my copy and neither are they in the current GIT 
revision:
<http://git.infradead.org/?p=mtd-2.6.git;a=blob_plain;f=drivers/mtd/chips/cfi_cmdset_0002.c>

> This will disable using the "cfi_amdstd_write_buffers" function.

To give it a try I removed my changes and added those two lines to 
fixup_convert_atmel_pri(), but cfi_amdstd_write_buffers() and thus 
do_write_buffer() are still being called.

>> cfi_send_gen_cmd(0xAA, cfi->addr_unlock1, chip->start, map, cfi,
>> cfi->device_type, NULL);
>> cfi_send_gen_cmd(0x55, cfi->addr_unlock2, chip->start, map, cfi,
>> cfi->device_type, NULL);
>> //cfi_send_gen_cmd(0xA0, cfi->addr_unlock1, chip->start, map, cfi,
>> cfi->device_type, NULL);
>> /* Write Buffer Load */
>> map_write(map, CMD(0x25), cmd_adr);
>
> This is the standard "Word program" command, take a look on page 11 in
> the datasheet.

It would be if 0xA0 was present, but that's commented out in 
do_write_buffer() and replaced by 0x25. That's a sequence I cannot find in 
the Atmel documentation (and neither in the AMD/Spansion ones for that 
matter), but as you point out do_write_buffer() shouldn't get called for 
Atmel chips anyway.

> The Atmel device has a dual-word write function, but AFAIK AMD
> (Spansion) devices can write a lot more with a single command. Thus
> AT49BV642D can not use the default AMD command for buffer writes.

The funny thing is that do_write_buffer() never seems to write more than 
two words (in my case 4 bytes), so I don't understand why the bypass mode 
isn't used anymore like in a previous incarnation of the code.

> Sorry for a bit incomplete answer, but this flash device is working on
> the ATNGW100 kit from Atmel. So it should work for you as well.

You've certainly helped me to know for certain that do_write_buffer() 
shouldn't get called for Ateml chips. But it confuses me that Atmel seems 
to have a different code base than the GIT repository.

-- 
Mit freundlichen Grüßen
Best regards
Michael König

ipcas GmbH
Wetterkreuz 17
91058 Erlangen, Germany
Tel.: +49 9131 7677-31
Fax: +49 9131 7677-78
mailto:Michael.Koenig at ipcas.de

Geschäftsführer: Dipl.-Ing. S. Sutiono
Sitz der Gesellschaft: Erlangen
Registergericht: Fürth, HBR 3676
WEEE-Reg.-Nr. DE 77202473

Hinweis: Diese E-Mail und etwaige Anlagen können Betriebs- oder
Geschäftsgeheimnisse, dem Anwaltsgeheimnis unterliegen oder sonstige
vertrauliche Informationen enthalten. Sollten Sie diese E-Mail
irrtümlich erhalten haben, ist Ihnen der Status dieser E-Mail bekannt.
Bitte benachrichtigen Sie uns in diesem Fall sofort durch Antwort-Mail
und löschen Sie diese E-Mail nebst etwaigen Anlagen von Ihrem System.
Ebenso dürfen Sie diese E-Mail oder seine Anlagen
nicht kopieren oder an Dritte weitergeben. Vielen Dank.





More information about the linux-mtd mailing list