From: Vasili Galka Date: Mon, 16 Jun 2014 17:41:31 +0300 Subject: [U-Boot] [PATCH] Disable FLASH_AMLV256U support for TOP860 target Message-ID: <1402929691-3972-1-git-send-email-vvv444@gmail.com> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de 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 Cc: Wolfgang Denk --- 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