From patchwork Fri May 8 17:07:52 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ryan Harkin X-Patchwork-Id: 470110 X-Patchwork-Delegate: trini@ti.com Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from theia.denx.de (theia.denx.de [85.214.87.163]) by ozlabs.org (Postfix) with ESMTP id B9ABA140281 for ; Sat, 9 May 2015 03:08:49 +1000 (AEST) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 383DC4B66A; Fri, 8 May 2015 19:08:20 +0200 (CEST) Received: from theia.denx.de ([127.0.0.1]) by localhost (theia.denx.de [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 0SIiaxJGCudW; Fri, 8 May 2015 19:08:19 +0200 (CEST) Received: from theia.denx.de (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 785484B62B; Fri, 8 May 2015 19:08:19 +0200 (CEST) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 9D4094B61A for ; Fri, 8 May 2015 19:08:16 +0200 (CEST) Received: from theia.denx.de ([127.0.0.1]) by localhost (theia.denx.de [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id S_Ykvp82zPCS for ; Fri, 8 May 2015 19:08:16 +0200 (CEST) X-policyd-weight: NOT_IN_SBL_XBL_SPAMHAUS=-1.5 NOT_IN_SPAMCOP=-1.5 NOT_IN_BL_NJABL=-1.5 (only DNSBL check requested) Received: from mail-wi0-f172.google.com (mail-wi0-f172.google.com [209.85.212.172]) by theia.denx.de (Postfix) with ESMTPS id 2D02C4B6DC for ; Fri, 8 May 2015 19:08:10 +0200 (CEST) Received: by wicmx19 with SMTP id mx19so40936651wic.1 for ; Fri, 08 May 2015 10:08:10 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:subject:date:message-id; bh=xIStrNGeUcqHwRraSbjKofXMV4+d9PnNAXO3zI/aj1g=; b=G3cvqBDMjxnupLkuFYJ4Psumw+pE2+WLnaZBwY0mE3hHTaml43T9Con+DOhmFUAa9X wvwMUgX1rGK9qCvH0ZgvSb+K9qoYVFYgK/yFuKa6kSV/1VFje7Dz+MSNnNg7CamGlwTx EVxH6MJwNm0+dOUhkbwkl39zbq5jzUbNWGDXBNw4y0+2P2Ln+z3ee9KUC2woNCNqeB/O YMgTDhXXxFouRm7OQpREcjlMUEHdSH+ZXLMJXksk1PktZZrjhi/faTBc6wQkgoUBhiJ8 EjtaVDizjAmCwJZ3egEdooJqrWKEaUwL3wEPVtIAZDn8pk1AIPg4GFL4OPGEBnU+G+0e uf4w== X-Gm-Message-State: ALoCoQkKrSmig8JWIQ3guP1duRchzWKcZkDedGL9W68IMOny6txHJuVd/aMi2yfGy13QALhY1icZ X-Received: by 10.181.11.193 with SMTP id ek1mr7965315wid.15.1431104890085; Fri, 08 May 2015 10:08:10 -0700 (PDT) Received: from localhost.localdomain (82-69-54-187.dsl.in-addr.zen.co.uk. [82.69.54.187]) by mx.google.com with ESMTPSA id di7sm9712681wib.23.2015.05.08.10.08.09 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Fri, 08 May 2015 10:08:09 -0700 (PDT) From: Ryan Harkin To: linus.walleij@linaro.org, ryan.harkin@linaro.org, u-boot@lists.denx.de Date: Fri, 8 May 2015 18:07:52 +0100 Message-Id: <1431104872-8645-1-git-send-email-ryan.harkin@linaro.org> X-Mailer: git-send-email 2.1.0 Subject: [U-Boot] [PATCH] vexpress64: specify CONFIG_SYS_FLASH_CFI_WIDTH X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.15 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" Testing on the ARM Versatile Express Juno board showed intermittent CFI flash detection problems. Debug output in exception cases showed that the NOR flash was returning incorrect values to a query command: fwc addr 0000000008000000 cmd f0 f0f0f0f0 32bit x 8 bit fwc addr 0000000008000000 cmd ff ffffffff 32bit x 8 bit fwc addr 0000000008000154 cmd 98 98989898 32bit x 8 bit is= cmd 51(Q) addr 0000000008000040 is= 00800051 51515151 fwc addr 0000000008001554 cmd 98 98989898 32bit x 8 bit is= cmd 51(Q) addr 0000000008000040 is= 00800051 51515151 fwc addr 0000000008000000 cmd f0 00f000f0 32bit x 16 bit fwc addr 0000000008000000 cmd ff 00ff00ff 32bit x 16 bit fwc addr 0000000008000154 cmd 98 00980098 32bit x 16 bit is= cmd 51(Q) addr 0000000008000040 is= 00800051 00510051 fwc addr 0000000008001554 cmd 98 00980098 32bit x 16 bit is= cmd 51(Q) addr 0000000008000040 is= 00800051 00510051 Debugging showed that the problem could be solved by preventing u-boot from scanning different flash widths by specifying CONFIG_SYS_FLASH_CFI_WIDTH so that only using the 'correct' width was used. Signed-off-by: Ryan Harkin Reviewed-by: Linus Walleij --- include/configs/vexpress_aemv8a.h | 1 + 1 file changed, 1 insertion(+) diff --git a/include/configs/vexpress_aemv8a.h b/include/configs/vexpress_aemv8a.h index 032010b..18edd5d 100644 --- a/include/configs/vexpress_aemv8a.h +++ b/include/configs/vexpress_aemv8a.h @@ -264,6 +264,7 @@ #define CONFIG_CMD_ARMFLASH #define CONFIG_SYS_FLASH_CFI 1 #define CONFIG_FLASH_CFI_DRIVER 1 +#define CONFIG_SYS_FLASH_CFI_WIDTH FLASH_CFI_32BIT #define CONFIG_SYS_FLASH_BASE 0x08000000 #define CONFIG_SYS_FLASH_SIZE 0x04000000 /* 64 MiB */ #define CONFIG_SYS_MAX_FLASH_BANKS 2