Skip to contentSkip to conversation

vexpress64: specify CONFIG_SYS_FLASH_CFI_WIDTH

PATCH In review Ryan Harkin 3 participants 3 messages May 8, 2015 – May 28, 2015 Arm/versatile express platform

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 vexpress64: specify CONFIG_SYS_FLASH_CFI_WIDTH

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.

---
 include/configs/vexpress_aemv8a.h | 1 +
 1 file changed, 1 insertion(+)
include/configs/vexpress_aemv8a.h +1 -0
index 032010b..18edd5d 100644
@@ -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
Signature · 1 line
2.1.0
#1 lore raw

PATCH 1/1 vexpress64: specify CONFIG_SYS_FLASH_CFI_WIDTH

Quoted 19 lines · Ryan Harkin

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

Quoted 6 lines

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.

Ah, good catch. No instabilities on my (old) machine but this is just as good.

Yours,
Linus Walleij

#2 lore raw
In reply to Ryan Harkin
Quoted 19 lines · Ryan Harkin

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

Quoted 7 lines

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.

Applied to u-boot/master, thanks!

Signature · 8 lines
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 836 bytes
Desc: Digital signature
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20150528/8b5558e3/attachment.sig>