fyi, the following small errors are made in multiple times (copy + paste?) in ichspi.c
On Tue, Jun 14, 2011 at 3:20 PM, Stefan Tauner
<stefan.tauner@student.tuwien.ac.at> wrote:
+ msg_pdbg("Erasing %d bytes starting at 0x%06x\n", len, addr);
+
+ hsfc = REGREAD16(ICH9_REG_HSFC);
+ /* make sure FDONE, FCERR, AEL are cleared by writing 1 to them */
+ REGWRITE16(ICH9_REG_HSFC, hsfc);
Should be done using HSFS.
+ hsfs = REGREAD16(ICH9_REG_HSFS);
+ if (!timeout) {
+ msg_perr("timeout!\n");
+ prettyprint_ich9_reg_hsfs(hsfs);
+ prettyprint_ich9_reg_hsfc(hsfs);
The second prettyprint should take hsfc. Don't forget to read hsfc before going into the if() statement (like you did with hsfs).