sf: Add common probe support
Get series with b4
b4 am [email protected]Versions newest first
- v2 Latest0 of 20 patches 0 repliesNew
Patches in v2 No applies recorded yet
None of the 20 patches the cover letter announces are in this archive.
Reviews trailers per patch
No Reviewed-by, Acked-by or Tested-by trailers for v2 yet.
Cover letter [U-Boot] [RESEND PATCH v2 00/20] sf: Add common probe support
Hello Jagan,
Quoted 5 lines · Jagan Teki
Please find the test branch for this patch series, here.
http://git.denx.de/?p=u-boot/u-boot-spi.git;a=shortlog;h=refs/heads/master-testRequest to test these changes on your boards.
Let me know for any issues.
Thanks for setting up a branch for easier testing. I've rebased the CuBox support patch series [1] on top of your branch and tested the result. SPI flash support worked before on CuBox, but fails with your branch.
At build time, the following warnings are issued (found using DBGFLAGS="-g -Werror"):
make[1]: Entering directory `/lhome/sascha.silbe/src/u-boot/common'
arm-linux-gnueabi-gcc -g -Werror -Os -ffunction-sections -fdata-sections -fno-common -ffixed-r8 -msoft-float -D__KERNEL__ -DCONFIG_SYS_TEXT_BASE=0x00600000 -I/lhome/sascha.silbe/src/u-boot/include -fno-builtin -ffreestanding -nostdinc -isystem /usr/lib/gcc/arm-linux-gnueabi/4.7/include -pipe -DCONFIG_ARM -D__ARM__ -marm -mno-thumb-interwork -mabi=aapcs-linux -march=armv7-a -Wall -Wstrict-prototypes -fno-stack-protector -Wno-format-nonliteral -Wno-format-security -fstack-usage -o cmd_sf.o cmd_sf.c -c
In file included from cmd_sf.c:11:0:
/lhome/sascha.silbe/src/u-boot/include/spi_flash.h:37:12: error: ?spi_write_cmds_array? defined but not used [-Werror=unused-variable] /lhome/sascha.silbe/src/u-boot/include/spi_flash.h:56:12: error: ?spi_read_cmds_array? defined but not used [-Werror=unused-variable]
cc1: all warnings being treated as errors
make[1]: *** [cmd_sf.o] Error 1
At run time, automatically reading the environment from SPI flash fails. "sf probe" and "sf read" both appear to work, but "sf probe" reports 64KiB page size and "sf read" only yields 0xff rather than the U-Boot binary that's at the start of SPI flash:
=== Begin ===
U-Boot 2013.07-00163-g753bc19 (Aug 11 2013 - 12:13:01)SolidRun CuBox
SoC: Dove 88AP510 (A1) CPU: Marvell Sheeva (rev 5) DRAM: 2 GiB MMC: Dove SDHCI0: 0
*** Warning - spi_flash_probe() failed, using default environment
In: serial Out: serial Err: serial Net: egiga0 Waiting for PHY auto negotiation to complete.... done
egiga0
Warning: failed to set MAC address
Hit any key to stop autoboot: 0
CuBox> sf probe
SF: Detected W25Q32BV with page size 64 KiB, total 4 MiB CuBox> sf read ${loadaddr} 0 0x20000
SF: 131072 bytes @ 0x0 Read: OK
CuBox> md.b ${loadaddr}
02000000: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ................ 02000010: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ................ 02000020: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ................ 02000030: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ................
=== End ===
For comparison, this is what it looks like on top of current master:
=== Begin ===
U-Boot 2013.07-00123-gde877d3 (Aug 11 2013 - 13:39:44)SolidRun CuBox
SoC: Dove 88AP510 (A1) CPU: Marvell Sheeva (rev 5) DRAM: 2 GiB MMC: Dove SDHCI0: 0 SF: Detected W25Q32BV/W25Q32FV_SPI with page size 4 KiB, total 4 MiB In: serial Out: serial Err: serial Net: egiga0 Waiting for PHY auto negotiation to complete... done
egiga0
Hit any key to stop autoboot: 0
CuBox> sf probe
SF: Detected W25Q32BV/W25Q32FV_SPI with page size 4 KiB, total 4 MiB CuBox> sf read ${loadaddr} 0 0x20000
SF: 131072 bytes @ 0x0 Read: OK
CuBox> md.b ${loadaddr}
02000000: 5a 00 00 00 54 67 04 00 00 00 00 00 00 02 00 00 Z...Tg.......... 02000010: 00 00 60 00 00 00 60 00 00 00 00 00 00 00 01 dc ..`...`......... 02000020: 40 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 @............... 02000030: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
CuBox>
=== End ===
Is there something that needs to be done differently now? Some additional function to call in board setup code or defines to set in the board configuration?
Sascha
[1] mid:1372195668-25496-1-git-send-email-t-uboot at infra-silbe.de
http://thread.gmane.org/gmane.comp.boot-loaders.u-boot/148412/focus=164287
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 489 bytes
Desc: not available
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20130811/de93ec32/attachment.pgp>