From: Vasili Galka <vvv444@gmail.com>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH] Disable FLASH_AMLV256U support for TOP860 target
Date: Mon, 16 Jun 2014 17:41:31 +0300 [thread overview]
Message-ID: <1402929691-3972-1-git-send-email-vvv444@gmail.com> (raw)
TOP860 configuration assumes at most 128 flash sectors. Thus, the
AMLV256U flash can't be supported. The existing code could result in
memory corruption when writing to the flash_info->start[] array.
Signed-off-by: Vasili Galka <vvv444@gmail.com>
Cc: Wolfgang Denk <wd@denx.de>
---
board/emk/common/flash.c | 4 +++-
1 files changed, 3 insertions(+), 1 deletions(-)
diff --git a/board/emk/common/flash.c b/board/emk/common/flash.c
index ae5777c..4119b3b 100644
--- a/board/emk/common/flash.c
+++ b/board/emk/common/flash.c
@@ -324,6 +324,7 @@ ulong flash_get_size (FPWV *addr, flash_info_t *info)
}
break;
}
+#ifndef CONFIG_TOP860
if ((FPW)addr[FLASH_ID3] == (FPW)AMD_ID_LV256U_2 &&
(FPW)addr[FLASH_ID4] == (FPW)AMD_ID_LV256U_3)
{
@@ -337,7 +338,8 @@ ulong flash_get_size (FPWV *addr, flash_info_t *info)
}
break;
}
-
+#endif
+
/* fall thru to here ! */
default:
printf ("unknown AMD device=%x %x %x",
--
1.7.9
next reply other threads:[~2014-06-16 14:41 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-06-16 14:41 Vasili Galka [this message]
2014-08-12 15:17 ` [U-Boot] [PATCH] Disable FLASH_AMLV256U support for TOP860 target Vasili Galka
2014-10-28 9:33 ` Wolfgang Denk
[not found] ` <CA+gZxsPKtwYAhHm88fBtGW17cxT7ncEz9OBxwpqiJ55WR-kfcg@mail.gmail.com>
2014-10-28 9:48 ` Wolfgang Denk
2014-10-28 10:07 ` Reinhard Meyer
2014-10-28 10:23 ` Wolfgang Denk
2014-10-28 10:35 ` Reinhard Meyer
2014-10-28 10:40 ` Wolfgang Denk
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1402929691-3972-1-git-send-email-vvv444@gmail.com \
--to=vvv444@gmail.com \
--cc=u-boot@lists.denx.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox