On 03/13/2012 05:29 PM, Michael Karcher wrote:
@@ -995,6 +1001,12 @@ static int enable_flash_mcp55(struct pci_dev *dev, const 
char *name)
        uint8_t old, new, val;
        uint16_t wordval;

+       if (pci_read_word(dev, PCI_CLASS_DEVICE) != 0x0601) {
+               /* output is followed by "OK - searching for ...\n" */
+               msg_pinfo(" Seems to be a secondary south bridge, ");
+               return NOT_DONE_YET;
+       }
+
        /* Set the 0-16 MB enable bits. */
        val = pci_read_byte(dev, 0x88);
        val |= 0xff;            /* 256K */
@@ -1207,15 +1219,7 @@ const struct penable chipset_enables[] = {
        {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*/
-       /* 10de:0361 is present in Tyan S2915 OEM 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, 0x0361, OK, "NVIDIA", "MCP55",             
enable_flash_mcp55}, /* LPC */
        {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 */

Hello,

In http://paste.flashrom.org/view.php?id=1136 both LPC bridges have ID 10de:0360, but different class. However, due to the architecture of the chipset enable scanning loop, returning NOT_DONE_YET will not find a second bridge with identical IDs. In http://paste.flashrom.org/view.php?id=1142 (which was the almost working version of the patch) it was required to add pci_dev_find_next and loop on that when NOT_DONE_YET was returned. Thoughts?

Josh

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

Reply via email to