[flashrom] [commit] r1464 - trunk

repository service svn at flashrom.org
Sun Nov 13 16:17:11 CET 2011


Author: stefanct
Date: Sun Nov 13 16:17:10 2011
New Revision: 1464
URL: http://flashrom.org/trac/flashrom/changeset/1464

Log:
ichspi: fix ich_init_opcodes() calls in ich_init_spi()

By calling it early ichspi_lock was not set up correctly in accordance
with the corresponding register, hence ich_init_opcodes() was always
trying to programming the opcodes instead of reading them in from the
opmenu in case of a locked down configuration.

Thanks to Jonathan A. Kollasch for reporting this bug.

Signed-off-by: Stefan Tauner <stefan.tauner at student.tuwien.ac.at>
Acked-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006 at gmx.net>

Modified:
   trunk/ichspi.c

Modified: trunk/ichspi.c
==============================================================================
--- trunk/ichspi.c	Thu Nov 10 00:40:00 2011	(r1463)
+++ trunk/ichspi.c	Sun Nov 13 16:17:10 2011	(r1464)
@@ -1562,8 +1562,6 @@
 	/* Assign Virtual Address */
 	ich_spibar = rcrb + spibar_offset;
 
-	ich_init_opcodes();
-
 	switch (ich_generation) {
 	case CHIPSET_ICH7:
 		msg_pdbg("0x00: 0x%04x     (SPIS)\n",
@@ -1601,6 +1599,7 @@
 			msg_pinfo("WARNING: SPI Configuration Lockdown activated.\n");
 			ichspi_lock = 1;
 		}
+		ich_init_opcodes();
 		ich_set_bbar(0);
 		register_spi_programmer(&spi_programmer_ich7);
 		break;
@@ -1643,6 +1642,7 @@
 				  "by the FRAP and FREG registers are NOT in "
 				  "effect. Please note that Protected\n"
 				  "Range (PR) restrictions still apply.\n");
+		ich_init_opcodes();
 
 		if (desc_valid) {
 			tmp2 = mmio_readw(ich_spibar + ICH9_REG_HSFC);




More information about the flashrom mailing list