shithub: riscv

Download patch

ref: 8175958b19d8b34bd96f9199e7face8470fa5cf2
parent: 2fa6c2cb881c9a3a537b419c58727de0d0ee741e
author: Sigrid Solveig Haflínudóttir <sigrid@ftrv.se>
date: Wed Oct 12 10:44:19 EDT 2022

reform/pm: lpc comms: increase delays to 80ms

Apparently 60ms isn't always enough.

--- a/sys/src/cmd/reform/pm.c
+++ b/sys/src/cmd/reform/pm.c
@@ -369,7 +369,7 @@
 	 * to be sure LPC is blocked waiting for the chip select to go
 	 * active again.
 	 */
-	sleep(60);
+	sleep(80);
 	while(rd(spi2, SPIx_STATREG) & STAT_RR)
 		rd(spi2, SPIx_RXDATA);
 
@@ -377,7 +377,7 @@
 	for(i = 0; i < 8; i++)
 		wr(spi2, SPIx_TXDATA, 0);
 	wr(spi2, SPIx_CONREG, con | CON_XCH);
-	sleep(60);
+	sleep(80);
 
 	for(i = 0; i < 8; i++)
 		((u8int*)ret)[i] = rd(spi2, SPIx_RXDATA);