On 11/17/2011 02:12 PM, Svante Olofsson wrote:
Hi Joshua,
I couldn't get the patch to compile (had also, strangely, to manually
edit one part of the patch)
Hello,
Sorry- you'll need to apply that patch to the SVN version of flashrom.
My patches depend on a fairly recent change. Alternatively, if you want
to avoid checking out the svn copy, change:
return it8712f_gpio_set(3, 1);
to
return it8712f_gpio_set(13, 1);
Otherwise, apply these 2 patches to svn (and ignore the previous patch).
Thanks,
Josh
>From 7c16fbb2c33c6b80745f367e0abd62d93d679489 Mon Sep 17 00:00:00 2001
From: Joshua Roys <roysj...@gmail.com>
Date: Thu, 17 Nov 2011 12:45:06 -0500
Subject: [PATCH 1/2] Board enable for ASUS A7N8X-VM/400
Signed-off-by: Joshua Roys <roysj...@gmail.com>
---
board_enable.c | 10 ++++++++++
print.c | 1 +
2 files changed, 11 insertions(+), 0 deletions(-)
diff --git a/board_enable.c b/board_enable.c
index c02f2ff..c10350f 100644
--- a/board_enable.c
+++ b/board_enable.c
@@ -2008,6 +2008,15 @@ found:
/*
* Suited for:
+ * - ASUS A7N8X-VM/400: NVIDIA nForce2 IGP2 + IT8712F
+ */
+static int it8712f_gpio13_raise(void)
+{
+ return it87_gpio_set(13, 1);
+}
+
+/*
+ * Suited for:
* - ASUS A7V600-X: VIA KT600 + VT8237 + IT8712F
* - ASUS A7V8X-X: VIA KT400 + VT8235 + IT8712F
*/
@@ -2094,6 +2103,7 @@ const struct board_match board_matches[] = {
{0x1039, 0x0741, 0x1849, 0x0741, 0x1039, 0x5513, 0x1849, 0x5513,
"^K7S41GX$", NULL, NULL, P3, "ASRock", "K7S41GX",
0, OK, w836xx_memw_enable_2e},
{0x8086, 0x24D4, 0x1849, 0x24D0, 0x8086, 0x24D5, 0x1849, 0x9739, NULL,
NULL, NULL, P3, "ASRock", "P4i65GV", 0,
OK, intel_ich_gpio23_raise},
{0x8086, 0x2570, 0x1849, 0x2570, 0x8086, 0x24d3, 0x1849, 0x24d0, NULL,
NULL, NULL, P3, "ASRock", "775i65G", 0,
OK, intel_ich_gpio23_raise},
+ {0x10DE, 0x0060, 0x1043, 0x80AD, 0x10DE, 0x01E0, 0x1043, 0x80C0, NULL,
NULL, NULL, P3, "ASUS", "A7N8X-VM/400", 0,
OK, it8712f_gpio13_raise},
{0x1106, 0x3189, 0x1043, 0x807F, 0x1106, 0x3065, 0x1043, 0x80ED, NULL,
NULL, NULL, P3, "ASUS", "A7V600-X", 0,
OK, it8712f_gpio31_raise},
{0x1106, 0x3177, 0x1043, 0x80A1, 0x1106, 0x3205, 0x1043, 0x8118, NULL,
NULL, NULL, P3, "ASUS", "A7V8X-MX SE", 0,
OK, w836xx_memw_enable_2e},
{0x1106, 0x3189, 0x1043, 0x807F, 0x1106, 0x3177, 0x1043, 0x808C, NULL,
NULL, NULL, P3, "ASUS", "A7V8X", 0,
OK, it8703f_gpio51_raise},
diff --git a/print.c b/print.c
index b948954..9a93948 100644
--- a/print.c
+++ b/print.c
@@ -571,6 +571,7 @@ const struct board_info boards_known[] = {
B("ASRock", "P4i65GV", 1,
"http://www.asrock.com/mb/overview.asp?Model=P4i65GV", NULL),
B("ASUS", "A7N8X Deluxe", 1,
"http://www.asus.com/product.aspx?P_ID=wAsRYm41KTp78MFC", NULL),
B("ASUS", "A7N8X-E Deluxe", 1,
"http://www.asus.com/product.aspx?P_ID=TmQtPJv4jIxmL9C2", NULL),
+ B("ASUS", "A7N8X-VM/400", 1,
"http://www.asus.com/Motherboards/AMD_Socket_A/A7N8XVM400/", NULL),
B("ASUS", "A7V133", 1,
"ftp://ftp.asus.com.tw/pub/ASUS/mb/socka/kt133a/a7v133/", NULL),
B("ASUS", "A7V333", 1,
"ftp://ftp.asus.com.tw/pub/asus/mb/socka/kt333/a7v333/", NULL),
B("ASUS", "A7V400-MX", 1,
"http://www.asus.com/product.aspx?P_ID=hORgEHRBDLMfwAwx", NULL),
--
1.7.4.1
>From 975adbe05fcb29606346f866bf2683ff228590f8 Mon Sep 17 00:00:00 2001
From: Joshua Roys <roysj...@gmail.com>
Date: Thu, 17 Nov 2011 15:16:46 -0500
Subject: [PATCH 2/2] Fix it87_gpio_set
IT87xx chips don't have a GPIO port 0.
Signed-off-by: Joshua Roys <roysj...@gmail.com>
---
board_enable.c | 6 ++++--
1 files changed, 4 insertions(+), 2 deletions(-)
diff --git a/board_enable.c b/board_enable.c
index c10350f..954695f 100644
--- a/board_enable.c
+++ b/board_enable.c
@@ -1961,6 +1961,8 @@ static int it87_gpio_set(unsigned int gpio, int raise)
}
found:
+ gpio -= 10;
+
/* Check whether the gpio is allowed. */
if (gpio < 32)
allowed = (cfg->bank0 >> gpio) & 0x01;
@@ -1973,7 +1975,7 @@ found:
if (!allowed) {
msg_perr("\nERROR: IT%02X does not allow setting GPIO%02u.\n",
- cfg->id, gpio);
+ cfg->id, gpio + 10);
return -1;
}
@@ -1992,7 +1994,7 @@ found:
msg_pdbg("Using IT87 GPIO base 0x%04x\n", base);
- port = gpio / 10 - 1;
+ port = gpio / 10;
gpio %= 10;
/* set GPIO. */
--
1.7.4.1
_______________________________________________
flashrom mailing list
flashrom@flashrom.org
http://www.flashrom.org/mailman/listinfo/flashrom