[flashrom] Failed Flash MS7207

Michael Karcher flashrom at mkarcher.dialup.fu-berlin.de
Wed Dec 16 18:27:10 CET 2009


Am Montag, den 14.12.2009, 14:02 -0800 schrieb Spronk Enstein:
> Board Name Ms7207 Ver. 1.0

Please try the patch below. Maybe wait for carldani to have a short look
at it.

Patch:

Board Enable for MS-7207 (K8N GM2-L)

I used two PCI IDs as it is convention. MSI uses the 4-digit mainboard
ID as subsystem device ID, so even one ID would be safe.

Signed-Off-By: Michael Karcher <flashrom at mkarcher.dialup.fu-berlin.de>

Index: board_enable.c
===================================================================
--- board_enable.c	(Revision 803)
+++ board_enable.c	(Arbeitskopie)
@@ -1184,7 +1184,34 @@
 	return 0;
 }
 
+static int board_msi_k8ngm2(const char *name)
+{
+        struct pci_dev *dev;
+        int bar;
+        int old_val;
 
+        dev = pci_dev_find(0x10DE, 0x0264);	/* nVidia MCP51 SMBus controller */
+        if(!dev) {
+                fprintf(stderr, "\nERROR: MCP51 SMBus bridge not found.\n");
+                return -1;
+        }
+        bar = pci_read_long(dev, 0x64);
+        if((bar & 0xFFFF0003) != 1) {
+                fprintf(stderr, "\nERROR: SMBus GPIO BAR has unexpected bits set in %08x.\n", bar);
+                return -1;
+        }
+        bar &= 0xFFFC;
+        if(bar == 0 || bar == 0xFFFC) {
+                fprintf(stderr, "\nERROR: invalid SMBus GPIO BAR %04x.\n", bar);
+                return -1;
+        }
+        old_val = INW(bar+0xC2);
+        OUTW(bar+0xC2,old_val | 1);
+
+        return 0;
+}
+        
+
 /**
  * Below is the list of boards which need a special "board enable" code in
  * flashrom before their ROM chip can be accessed/written to.
@@ -1256,6 +1283,7 @@
 	{0x1106, 0x0571, 0x1462, 0x7120,  0x1106, 0x3065, 0x1462, 0x7120, NULL,         NULL,          "MSI",         "MS-6712 (KT4V)",     board_msi_kt4v},
 	{0x8086, 0x2658, 0x1462, 0x7046,  0x1106, 0x3044, 0x1462, 0x046d, NULL,         NULL,          "MSI",         "MS-7046",            intel_ich_gpio19_raise},
 	{0x10DE, 0x005E, 0x1462, 0x7135,  0x10DE, 0x0050, 0x1462, 0x7135, "msi",        "k8n-neo3",    "MSI",         "MS-7135 (K8N Neo3)", w83627thf_gpio4_4_raise_4e},
+	{0x10DE, 0x0270, 0x1462, 0x7207,  0x10DE, 0x0264, 0x1462, 0x7207, NULL,         NULL,          "MSI",         "MS-7207 (K8N GM2-L)",board_msi_k8ngm2},
 	{0x1106, 0x3099,      0,      0,  0x1106, 0x3074,      0,      0, "shuttle",    "ak31",        "Shuttle",     "AK31",               w836xx_memw_enable_2e},
 	{0x1106, 0x3104, 0x1297, 0xa238,  0x1106, 0x3059, 0x1297, 0xc063, NULL,         NULL,          "Shuttle",     "AK38N",              it8705f_write_enable_2e},
 	{0x10DE, 0x0050, 0x1297, 0x5036,  0x1412, 0x1724, 0x1297, 0x5036, NULL,         NULL,          "Shuttle",     "FN25",               board_shuttle_fn25},






More information about the flashrom mailing list