Problems with cfi_cmdset_0002 and Atmel AT49BV642D

Michael König Michael.Koenig at ipcas.de
Thu May 10 03:41:21 EDT 2007


Hello Hans-Christian...

> This is from the AVR32 GIT repository at
> git://www.atmel.no/~hskinnemoen/linux/kernel/avr32.git

That's the same fixup_convert_atmel_pri() apart from the two additional 
lines you mentioned earlier.

> Strange... because it should never get added in the
> fixup_use_write_buffers() function. Could you check the ordering in
> cfi_fixup_table[]?
> fixup_convert_atmel_pri must be set _before_ fixup_use_write_buffers. I
> think that might be bogus upstream as well :(

Good call, those entries are the other way round:

static struct cfi_fixup cfi_fixup_table[] = {
#ifdef AMD_BOOTLOC_BUG
	{ CFI_MFR_AMD, CFI_ID_ANY, fixup_amd_bootblock, NULL },
#endif
	{ CFI_MFR_AMD, 0x0050, fixup_use_secsi, NULL, },
	{ CFI_MFR_AMD, 0x0053, fixup_use_secsi, NULL, },
	{ CFI_MFR_AMD, 0x0055, fixup_use_secsi, NULL, },
	{ CFI_MFR_AMD, 0x0056, fixup_use_secsi, NULL, },
	{ CFI_MFR_AMD, 0x005C, fixup_use_secsi, NULL, },
	{ CFI_MFR_AMD, 0x005F, fixup_use_secsi, NULL, },
#if !FORCE_WORD_WRITE
	{ CFI_MFR_ANY, CFI_ID_ANY, fixup_use_write_buffers, NULL, },
#endif
	{ CFI_MFR_ATMEL, CFI_ID_ANY, fixup_convert_atmel_pri, NULL },
	{ 0, 0, NULL, NULL }
};

I moved "fixup_convert_atmel_pri" above "fixup_use_write_buffers" and now 
it works like expected.

>> 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.
>
> Hmmm... interesting, perhaps we can add the dual word write support for
> the Atmel device but have a fixup which sets the last command according
> to the device.

At least my traces show that do_write_buffer() seems to be always called 
with two words. I guess you'll have to do your own testing to confirm that.

> But changes like these should have been posted earlier.

Hopefully those changes will be posted soon, before someone else runs into 
the same problem.

Thanks for your help; now I have a clean solution rather than my crude hack.

-- 
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