Patchwork A8JM board_enable patch (was Re: A8JM flashrom unable to erase)

login
register
about
Submitter James Lancaster
Date 2010-02-07 18:48:07
Message ID <de63f7891002071048i2452f9c6oa849ee22c49a62cb@mail.gmail.com>
Download mbox | patch
Permalink /patch/888/
State Superseded
Headers show

Comments

James Lancaster - 2010-02-07 18:48:07
Adds support to board_enable.c for ASUS A8JM Notebooks (and possibly
all A8J series)

Signed-off-by: James Lancaster <deathstalker@gmail.com>
---

I have now gotten it working. I would like to thank some of the people
in IRC for trying to help. It came down to me seeing a few similar 945
+ ICH7 and just trying (first randomly, then systematically) all the
possible GPIO pins. Finding that one needs to raise GPIO pin 34 on the
ich7. The rest was already supported.

Of note:
It does not include DMI matching. I think the PCI IDs will identify it
(and possibly other A8J series) uniquely.
It should work for any A8J_ laptop, but as I don't have any others I'm
not absolutely certain. (I think they simply differ by video card.
except possibly the A8JS.)

An additional warning:
Either 0.91 or r3844 (Currently on Jaunty) partially flashed the bios
initially. I'm not sure how, and frankly, given the hours with a
corrupted flash rom, I'm not going to experiment, unless someone has a
specific idea.

Patch

Index: board_enable.c
===================================================================
--- board_enable.c	(revision 893)
+++ board_enable.c	(working copy)
@@ -851,6 +851,14 @@ 
 }
 
 /**
+ * Suited for ASUS A8JM: Intel 945 + ICH7
+ */
+static int intel_ich_gpio34_raise(const char *name)
+{
+	return intel_ich_gpio_set(34, 1);
+}
+
+/**
  * Suited for MSI MS-7046: LGA775 + 915P + ICH6.
  */
 static int intel_ich_gpio19_raise(const char *name)
@@ -1207,6 +1215,7 @@ 
 	{0x8086, 0x2570, 0x1043, 0x80F2,  0x105A, 0x3373, 0x1043, 0x80F5, NULL,          NULL,         NULL,          "ASUS",        "P4P800-E Deluxe",       0,   intel_ich_gpio21_raise},
 	{0x10B9, 0x1541,      0,      0,  0x10B9, 0x1533,      0,      0, "^P5A$",       "asus",       "p5a",         "ASUS",        "P5A",                   0,   board_asus_p5a},
 	{0x10DE, 0x0030, 0x1043, 0x818a,  0x8086, 0x100E, 0x1043, 0x80EE, NULL,          NULL,         NULL,          "ASUS",        "P5ND2-SLI Deluxe",      0,   nvidia_mcp_gpio10_raise},
+        {0x8086, 0x27A0, 0x1043, 0x1287,  0x8086, 0x27DF, 0x1043, 0x1287, NULL,          NULL,         NULL,          "ASUS",       "A8JM",                   0,   intel_ich_gpio34_raise},
 	{0x1106, 0x3149, 0x1565, 0x3206,  0x1106, 0x3344, 0x1565, 0x1202, NULL,          NULL,         NULL,          "Biostar",     "P4M80-M4",              0,   it8705f_write_enable_2e},
 	{0x8086, 0x3590, 0x1028, 0x016c,  0x1000, 0x0030, 0x1028, 0x016c, NULL,          NULL,         NULL,          "Dell",        "PowerEdge 1850",        0,   intel_ich_gpio23_raise},
 	{0x1039, 0x5513, 0x1019, 0x0A41,  0x1039, 0x0018,      0,      0, NULL,          NULL,         NULL,          "Elitegroup",  "K7S6A",                 0,   it8705f_write_enable_2e},