From 4c30e7f6bbfe0a6743b8d0a919e337fd048a68d9 Mon Sep 17 00:00:00 2001 From: Haavard Skinnemoen Date: Tue, 30 Sep 2008 13:55:33 +0200 Subject: [PATCH] --- yaml --- r: 116045 b: refs/heads/master c: be8f78b8e8b5bcafc19ac85b815e98049aa86314 h: refs/heads/master i: 116043: 016ac1199b1728a3e2224558859dd87482a9fc05 v: v3 --- [refs] | 2 +- trunk/drivers/mtd/chips/cfi_cmdset_0002.c | 16 ++++++++++++---- 2 files changed, 13 insertions(+), 5 deletions(-) diff --git a/[refs] b/[refs] index 0538145a3b19..a2f57f2f2d22 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: aaf7ea20000436df3cbb397ccb734ad1e2e5164d +refs/heads/master: be8f78b8e8b5bcafc19ac85b815e98049aa86314 diff --git a/trunk/drivers/mtd/chips/cfi_cmdset_0002.c b/trunk/drivers/mtd/chips/cfi_cmdset_0002.c index db16b7b0723f..3e6f5d8609e8 100644 --- a/trunk/drivers/mtd/chips/cfi_cmdset_0002.c +++ b/trunk/drivers/mtd/chips/cfi_cmdset_0002.c @@ -213,10 +213,18 @@ static void fixup_convert_atmel_pri(struct mtd_info *mtd, void *param) if (atmel_pri.Features & 0x02) extp->EraseSuspend = 2; - if (atmel_pri.BottomBoot) - extp->TopBottom = 2; - else - extp->TopBottom = 3; + /* Some chips got it backwards... */ + if (cfi->id == AT49BV6416) { + if (atmel_pri.BottomBoot) + extp->TopBottom = 3; + else + extp->TopBottom = 2; + } else { + if (atmel_pri.BottomBoot) + extp->TopBottom = 2; + else + extp->TopBottom = 3; + } /* burst write mode not supported */ cfi->cfiq->BufWriteTimeoutTyp = 0;