Initialize the internal delay function before running programmer init.
The programmer init may need a good host delay function.

Fix Tyan S2915 by commenting out MCP55 LPC PCI ID 10de:0361 and add
debug output to avoid similar nightmares in the future.

Signed-off-by: Carl-Daniel Hailfinger <[email protected]>

Index: flashrom-0.9.2-programmer_fixes/chipset_enable.c
===================================================================
--- flashrom-0.9.2-programmer_fixes/chipset_enable.c    (Revision 998)
+++ flashrom-0.9.2-programmer_fixes/chipset_enable.c    (Arbeitskopie)
@@ -1354,7 +1354,15 @@
        {0x10de, 0x0262, NT, "NVIDIA", "MCP51",         enable_flash_ck804},
        {0x10de, 0x0263, NT, "NVIDIA", "MCP51",         enable_flash_ck804},
        {0x10de, 0x0360, OK, "NVIDIA", "MCP55",         enable_flash_mcp55}, /* 
M57SLI*/
-       {0x10de, 0x0361, OK, "NVIDIA", "MCP55",         enable_flash_mcp55}, /* 
LPC */
+       /* 10de:0361 is present in Tyan S2915 systems, but not connected to
+        * the flash chip. Instead, 10de:0364 is connected to the flash chip.
+        * Until we have PCI device class matching or some fallback mechanism,
+        * this is needed to get flashrom working on Tyan S2915 and maybe other
+        * dual-MCP55 boards.
+        */
+#if 0
+       {0x10de, 0x0361, NT, "NVIDIA", "MCP55",         enable_flash_mcp55}, /* 
LPC */
+#endif
        {0x10de, 0x0362, OK, "NVIDIA", "MCP55",         enable_flash_mcp55}, /* 
LPC */
        {0x10de, 0x0363, OK, "NVIDIA", "MCP55",         enable_flash_mcp55}, /* 
LPC */
        {0x10de, 0x0364, OK, "NVIDIA", "MCP55",         enable_flash_mcp55}, /* 
LPC */
@@ -1439,6 +1447,9 @@
                msg_pinfo("Found chipset \"%s %s\", enabling flash write... ",
                       chipset_enables[i].vendor_name,
                       chipset_enables[i].device_name);
+               msg_pdbg("chipset PCI ID is %04x:%04x, ",
+                        chipset_enables[i].vendor_id,
+                        chipset_enables[i].device_id);
 
                ret = chipset_enables[i].doit(dev,
                                              chipset_enables[i].device_name);
Index: flashrom-0.9.2-programmer_fixes/cli_classic.c
===================================================================
--- flashrom-0.9.2-programmer_fixes/cli_classic.c       (Revision 998)
+++ flashrom-0.9.2-programmer_fixes/cli_classic.c       (Arbeitskopie)
@@ -378,6 +378,9 @@
                flash = NULL;
        }
 
+       /* FIXME: Delay calibration should happen in programmer code. */
+       myusec_calibrate_delay();
+
        msg_pdbg("Initializing %s programmer\n",
                 programmer_table[programmer].name);
        if (programmer_init()) {
@@ -386,8 +389,6 @@
        }
 
        /* FIXME: Delay calibration should happen in programmer code. */
-       myusec_calibrate_delay();
-
        for (i = 0; i < ARRAY_SIZE(flashes); i++) {
                flashes[i] =
                    probe_flash(i ? flashes[i - 1] + 1 : flashchips, 0);


-- 
http://www.hailfinger.org/


_______________________________________________
flashrom mailing list
[email protected]
http://www.flashrom.org/mailman/listinfo/flashrom

Reply via email to