From: Simon Glass Date: Tue, 3 Dec 2013 16:43:28 -0700 Subject: [U-Boot] [PATCH v2 6/6] sandbox: spi: Enable new spi/sf layers In-Reply-To: <1386114208-18760-1-git-send-email-sjg@chromium.org> References: <1386114208-18760-1-git-send-email-sjg@chromium.org> Message-ID: <1386114208-18760-6-git-send-email-sjg@chromium.org> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de From: Mike Frysinger We want to test SPI flash code in the sandbox, so enable the new drivers and the 'sf test' command. This command is used to validate the sandbox SPI / SPI flash implementation, so enable it. Signed-off-by: Mike Frysinger Signed-off-by: Simon Glass --- We can perform SPI flash operations in sandbox now: ./u-boot --spi_sf 0:0:W25Q128:b/chromeos_sandbox/out/image.bin =>sf probe SF: Detected W25Q128 with page size 4 KiB, total 16 MiB =>sf test 0 100000 SPI flash test: 0 erase: 1 ticks, 1024000 KiB/s 8192.000 Mbps 1 check: 4 ticks, 256000 KiB/s 2048.000 Mbps 2 write: 6 ticks, 170666 KiB/s 1365.328 Mbps 3 read: 0 ticks, 1048576000 KiB/s -201326.-592 Mbps Test passed 0 erase: 1 ticks, 1024000 KiB/s 8192.000 Mbps 1 check: 4 ticks, 256000 KiB/s 2048.000 Mbps 2 write: 6 ticks, 170666 KiB/s 1365.328 Mbps 3 read: 0 ticks, 1048576000 KiB/s -201326.-592 Mbps => Changes in v2: - Add test to commit message include/configs/sandbox.h | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/include/configs/sandbox.h b/include/configs/sandbox.h index a4edc62..7e78a23 100644 --- a/include/configs/sandbox.h +++ b/include/configs/sandbox.h @@ -71,6 +71,16 @@ #define CONFIG_ENV_SIZE 8192 #define CONFIG_ENV_IS_NOWHERE +/* SPI */ +#define CONFIG_SANDBOX_SPI +#define CONFIG_CMD_SF +#define CONFIG_CMD_SF_TEST +#define CONFIG_CMD_SPI +#define CONFIG_SPI_FLASH +#define CONFIG_SPI_FLASH_SANDBOX +#define CONFIG_SPI_FLASH_STMICRO +#define CONFIG_SPI_FLASH_WINBOND + /* Memory things - we don't really want a memory test */ #define CONFIG_SYS_LOAD_ADDR 0x00000000 #define CONFIG_SYS_MEMTEST_START 0x00100000 -- 1.8.4.1