Add support for Delta MP2-BX-X motherboard.
It requires lowering of of PIIX4 GPO#28 for write access.
http://www.geocities.com/SiliconValley/3686/delta_mp2.html
Signed-off-by: Andriy Gapon avg@icyb.net.ua
This board can not be uniquely identified by PCI devices, all of them
are part of 440BX/PIIX4E chipset.
P.S.
I sent this patch to the list before, but decided to re-send it again.
I successfully tested the attached patch with flashrom on FreeBSD for
both reading and writing.
Flash RAM chip is SST39SF020.
--
Andriy Gapon
Index: board_enable.c
===================================================================
--- board_enable.c (revision 3322)
+++ board_enable.c (working copy)
@@ -466,8 +466,38 @@
OUTL(val, gpiobar + ICH7_GPIO_LVL2);
return 0;
}
+static int board_mp2_bx_x(const char *name)
+{
+ struct pci_dev *dev;
+ uint16_t gpiobar;
+ uint32_t val;
+
+ /* On this board GPO28 has to be set to low,
+ * see PIIX4 specification for details.
+ */
+ dev = pci_dev_find(0x8086, 0x7113); /* Intel PIIX4 */
+ if (!dev) {
+ // This will never happen on this board
+ fprintf(stderr, "\nERROR: PIIX4 not found.\n");
+ return -1;
+ }
+
+ /* Use PMBA register for Power Management IO Base,
+ * GPO ports are in Power Management region.
+ */
+ gpiobar = pci_read_word(dev, 0x40) & 0xfffc;
+
+ /* GPO28 is bit 4 of port 0x37. */
+ val = INL(gpiobar + 0x37);
+ printf_debug("\nGPIOBAR=0x%04x, port 0x37: 0x%08x\n", gpiobar, val);
+ val &= ~(1 << 4);
+ OUTL(val, gpiobar + 0x37);
+
+ return 0;
+}
+
/**
* We use 2 sets of IDs here, you're free to choose which is which. This
* is to provide a very high degree of certainty when matching a board on
@@ -535,6 +565,8 @@
"artecgroup", "dbe62", "Artec Group DBE62", board_artecgroup_dbe6x},
{0x8086, 0x27b8, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
"kontron", "986lcd-m", "Kontron 986LCD-M", board_kontron_986lcd_m},
+ {0x8086, 0x7113, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
+ "delta", "mp2-bx-x", "Delta MP2-BX-X", board_mp2_bx_x},
{0, 0, 0, 0, 0, 0, 0, 0, NULL, NULL} /* Keep this */
};