The attached patch enables flashing on the Iwill DK8-HTX board.
Basically, it configures the SuperIO to set the right GPIO pins, so
write protection is disabled.
Signed-off-by: Mondrian Nuessle <[EMAIL PROTECTED]>
---
This patch should help those people that try to use flashrom on an iwill
dk8_htx board, with or without biossavior, on factory BIOS or Linuxbios.
Regards,
Mondrian
--
Mondrian Nuessle University of Mannheim
Phone: +49 621 181 2717 Computer Architecture Group
Fax: +49 621 181 2713 http://ra.ti.uni-mannheim.de
mailto:[EMAIL PROTECTED]
Index: util/flashrom/board_enable.c
===================================================================
--- util/flashrom/board_enable.c (revision 2618)
+++ util/flashrom/board_enable.c (working copy)
@@ -23,6 +23,56 @@
#include "flash.h"
#include "debug.h"
+static int board_iwill_dk8htx(char *name)
+{
+ /* Extended function index register, either 0x2e or 0x4e */
+#define EFIR 0x2e
+ /* Extended function data register, one plus the index reg. */
+#define EFDR EFIR + 1
+ char b;
+
+ /* Disable the flash write protect. The flash write protect is
+ * connected to the WinBond w83627hf GPIOs
+ */
+ outb(0x87, EFIR); /* sequence to unlock extended functions */
+ outb(0x87, EFIR);
+
+ /* activate logical devie */
+ outb(0x7,EFIR);
+ outb(8,EFDR);
+
+ /* set GPIO regs...*/
+ outb(0x2b, EFIR); /* GPIO multiplexed pin reg. */
+ b = inb(EFDR) | 0xd0;
+ outb(0x2b, EFIR);
+ outb(b, EFDR);
+
+ outb(0x30, EFIR); /* GPIO2 */
+ b = inb(EFDR) | 0x01;
+ outb(0x30, EFIR);
+ outb(b, EFDR);
+
+ outb(0xf0, EFIR); /* IO sel */
+ b = inb(EFDR) | 0xef;
+ outb(0xf0, EFIR);
+ outb(b, EFDR);
+
+ outb(0xf1, EFIR); /* GPIO data reg */
+ b = inb(EFDR) | 0x16;
+ outb(0xf1, EFIR);
+ outb(b, EFDR);
+
+ outb(0xf2, EFIR); /*GPIO inversion reg */
+ b = inb(EFDR) | 0x00;
+ outb(0xf2, EFIR);
+ outb(b, EFDR);
+
+ /*lock extended function sagain */
+ outb(0xaa, EFIR); /* command to exit extended functions */
+
+ return 0;
+}
+
/*
* Match on pci-ids, no report received, just data from the mainboard
* specific code:
@@ -201,6 +251,8 @@
NULL, NULL, "VIA EPIA M/MII/...", board_via_epia_m },
{ 0x1106, 0x3177, 0x1043, 0x80A1, 0x1106, 0x3205, 0x1043, 0x8118,
NULL, NULL, "Asus A7V8-MX SE", board_asus_a7v8x_mx },
+ { 0x1022, 0x746b, 0x1022, 0x746b, 0x1095, 0x3114, 0x1095, 0x3114,
+ "iwill", "dk8_htx", "IWILL DK8-HTX", board_iwill_dk8htx },
{ 0, 0, 0, 0, 0, 0, 0, 0, NULL, NULL } /* Keep this */
};
--
linuxbios mailing list
[email protected]
http://www.linuxbios.org/mailman/listinfo/linuxbios