Skip to content
This repository has been archived by the owner on Dec 5, 2022. It is now read-only.

Commit

Permalink
raiden_debug_spi.c: Add a delay following AP/EC flash enable
Browse files Browse the repository at this point in the history
Add a delay following the AP and EC flash enable requests. This allows
any power rails enabled by these signals to settle and to meet the power
on to first SPI write timing requirements.

Forward ports the downstream commit:
   https://chromium-review.googlesource.com/c/chromiumos/third_party/flashrom/+/2036738

Change-Id: I4c1777777ee67580605c6e6f4c0c228cccc392c7
Signed-off-by: Edward O'Callaghan <[email protected]>
Reviewed-on: https://review.coreboot.org/c/flashrom/+/39312
Tested-by: build bot (Jenkins) <[email protected]>
Reviewed-by: Stefan Reinauer <[email protected]>
  • Loading branch information
quasisec authored and Edward O'Callaghan committed Mar 11, 2020
1 parent 8b191f5 commit 3e67cb7
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions raiden_debug_spi.c
Original file line number Diff line number Diff line change
Expand Up @@ -562,6 +562,15 @@ int raiden_debug_spi_init(void)
return ret;
}

/*
* Allow for power to settle on the AP and EC flash devices.
* Load switches can have a 1-3 ms turn on time, and SPI flash devices
* can require up to 10 ms from power on to the first write.
*/
if ((request_enable == RAIDEN_DEBUG_SPI_REQ_ENABLE_AP) ||
(request_enable == RAIDEN_DEBUG_SPI_REQ_ENABLE_EC))
usleep(50 * 1000);

register_spi_master(&spi_master_raiden_debug);
register_shutdown(shutdown, NULL);

Expand Down

0 comments on commit 3e67cb7

Please sign in to comment.