This series was written by Mike Frysinger some time ago. It was fully functional but had a few outstanding comments and the patches were never applied:
http://patchwork.ozlabs.org/patch/146127/ http://patchwork.ozlabs.org/patch/146128/ http://patchwork.ozlabs.org/patch/146129/ I have picked these up, tidied up a few things and re-submitted. With the addition of the 'sf test' command we can now test this series more easier, and in fact it did find an erase bug which is now fixed. The test used was: ./u-boot --spi_sf 0:0:M25P16:../image-peach-pit-adv.bin \ -c "sf probe; sf test 0 400000" U-Boot 2013.07-rc1-00016-g50db40c-dirty (Jun 22 2013 - 22:23:10) DRAM: 128 MiB Using default environment In: serial Out: serial Err: serial SF: Detected M25P16 with page size 64 KiB, total 2 MiB SPI flash test: 0 erase: 2 ticks, 2048000 KiB/s 16384.000 Mbps 1 check: 5 ticks, 819200 KiB/s 6553.600 Mbps 2 write: 22 ticks, 186181 KiB/s 1489.448 Mbps 3 read: 1 ticks, 4096000 KiB/s 32768.000 Mbps Test passed 0 erase: 2 ticks, 2048000 KiB/s 16384.000 Mbps 1 check: 5 ticks, 819200 KiB/s 6553.600 Mbps 2 write: 22 ticks, 186181 KiB/s 1489.448 Mbps 3 read: 1 ticks, 4096000 KiB/s 32768.000 Mbps (the .bin file is a 4MB SPI flash image) Changes in v4: - Add a description to the sandbox README - Add additional error checking - Add full error handling and reporting - Add more helpful errors when the SPI spec is wrong - Add new patch to increase sandbox memory size, so 'sf test' works - Add new patch to make 'sf test' work on sandbox - Add new patch to rename to sandbox_cmdline_option - Add support for a Winbond 4MB/16MB parts - Enable 'sf test' command on sandbox - Enable support for winbond emulation as well as ST micro - Fix bug in alignment checking - Fix new checkpatch warnings - Make use of new struct sandbox_spi_info - Rebase on top of recent spi changes - Rename sb to sandbox - Rename sb to sandbox in SPI driver - Tidy up erasing to cope with any size - Update copyright year - Update the copyright year Changes in v3: - rearchitected on top of state/getopt support Changes in v2: - No change log available in original v2 series Mike Frysinger (3): sandbox: spi: Add SPI emulation bus sandbox: spi: Add new SPI flash driver sandbox: spi: Enable new spi/sf layers Simon Glass (3): sandbox: Increase memory size to 32MB sandbox: spi: Adjust 'sf test' to work on sandbox sandbox: Rename sb_cmdline_option to sandbox_cmdline_option arch/sandbox/cpu/os.c | 2 +- arch/sandbox/cpu/start.c | 17 +- arch/sandbox/include/asm/config.h | 8 + arch/sandbox/include/asm/getopt.h | 23 +- arch/sandbox/include/asm/sections.h | 4 +- arch/sandbox/include/asm/spi.h | 58 +++++ arch/sandbox/include/asm/state.h | 9 + board/sandbox/sandbox/README.sandbox | 54 ++++ common/cmd_sf.c | 14 +- drivers/mtd/spi/Makefile | 1 + drivers/mtd/spi/sandbox.c | 464 +++++++++++++++++++++++++++++++++++ drivers/spi/Makefile | 1 + drivers/spi/sandbox_spi.c | 199 +++++++++++++++ include/configs/sandbox.h | 12 +- 14 files changed, 838 insertions(+), 28 deletions(-) create mode 100644 arch/sandbox/include/asm/spi.h create mode 100644 drivers/mtd/spi/sandbox.c create mode 100644 drivers/spi/sandbox_spi.c -- 1.8.3 _______________________________________________ U-Boot mailing list [email protected] http://lists.denx.de/mailman/listinfo/u-boot

