From 962a79ef72169b5d52fc746d1889d3b652fd9bcc Mon Sep 17 00:00:00 2001 From: Aaron Durbin Date: Tue, 11 Feb 2014 14:59:32 -0600 Subject: [PATCH] baytrail: increase command wait timeout The ich_status_poll() routine was only waiting 60ms for a command to complete. This is fine for writes, but when needing to perform a sector erase it can take a lot longer as the SPI parts for baytrail operate at 1.8V. Using the W25Q64FW as a worst case scenario increment the timeout to 400ms. Measuring on a specific device the sector erase command was taking on the order of 120ms. BUG=chrome-os-partner:25577 BRANCH=baytrail TEST=Filled MRC cache contents. Then rebooted and noted the ability to erase properly. Change-Id: I3f2ed930eaff86d8bd32dfee7b5f018852c7adeb Signed-off-by: Aaron Durbin Reviewed-on: https://chromium-review.googlesource.com/185874 Reviewed-by: Duncan Laurie --- src/soc/intel/baytrail/spi.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/soc/intel/baytrail/spi.c b/src/soc/intel/baytrail/spi.c index 5ac42c2dd4..04e5f04553 100644 --- a/src/soc/intel/baytrail/spi.c +++ b/src/soc/intel/baytrail/spi.c @@ -482,7 +482,7 @@ static int spi_setup_offset(spi_transaction *trans) */ static int ich_status_poll(u16 bitmask, int wait_til_set) { - int timeout = 6000; /* This will result in 60 ms */ + int timeout = 40000; /* This will result in 400 ms */ u16 status = 0; while (timeout--) {