fix Atmel NOR flash for command set 0002
PATCH 1/1 fix Atmel NOR flash for command set 0002
Hello,
Trying to prod my co-worker backfired, so here is the patch with a changelog.
The included patch corrects the fixup table and properly sets the BufWriteTimeoutTyp and BufWriteTimeoutMax to zero. Doing this will disable buffered writing, which Atmel has a different command for and is only supporting dual word writes.
Signed-off-by Hans-Christian Egtvedt <[email protected]>
Signature · 4 lines
With kind regards, Hans-Christian Egtvedt, siv.ing. (M.Sc.) Applications Engineer - AVR32 System Solutions - Atmel Norway
drivers/mtd/chips/cfi_cmdset_0002.c +5 -1
@@ -185,6 +185,10 @@ static void fixup_convert_atmel_pri(struct mtd_info *mtd, void *param) extp->TopBottom =2 ; else extp->TopBottom = 3; + +/* burst write mode not supported */ + cfi->cfiq->BufWriteTimeoutTyp =0 ; + cfi->cfiq->BufWriteTimeoutMax =0 ; }static void fixup_use_secsi (struct mtd_info *mtd,void *param)
@@ -217,6 +221,7 @@ static void fixup_use_atmel_lock(struct mtd_info *mtd, void *param) }static struct cfi_fixup cfi_fixup_table[] = { + {CFI_MFR_ATMEL ,CFI_ID_ANY , fixup_convert_atmel_pri,NULL }, #ifdef AMD_BOOTLOC_BUG {CFI_MFR_AMD ,CFI_ID_ANY , fixup_amd_bootblock,NULL }, #endif
@@ -229,7 +234,6 @@ static struct cfi_fixup cfi_fixup_table[] = { #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 } }; static struct cfi_fixup jedec_fixup_table[] = {
Quoted 4 lines · Hans-Christian Egtvedt
Hello,
Trying to prod my co-worker backfired, so here is the patch with a changelog.
Oh, forgot to mention it is diffed against Linux 2.6.20, but as previous mentioned a similar patch is already applied to the repository. I guess Michael König ment the MTD repository.
<cut changelog>
Signature · 4 lines
With kind regards, Hans-Christian Egtvedt, siv.ing. (M.Sc.) Applications Engineer - AVR32 System Solutions - Atmel Norway