aboutsummaryrefslogtreecommitdiffstats
path: root/board_enable.c
diff options
context:
space:
mode:
authorPeter Stuge <peter@stuge.se>2008-06-11 02:22:42 +0000
committerPeter Stuge <peter@stuge.se>2008-06-11 02:22:42 +0000
commit4aa7156f07ea5f0d3fa19ad1dea7bd83a189a587 (patch)
tree9ed98a10ce9773c8833b94a9960964d8f7cef009 /board_enable.c
parent1dbb9af151ed275c4b70a54a22494015128ee8ca (diff)
downloadflashrom-4aa7156f07ea5f0d3fa19ad1dea7bd83a189a587.tar.gz
flashrom-4aa7156f07ea5f0d3fa19ad1dea7bd83a189a587.tar.bz2
flashrom-4aa7156f07ea5f0d3fa19ad1dea7bd83a189a587.zip
Board enable and autodetection for BioStar P4M80-M4
Thanks to Reinder for clean room reverse engineering and data sheet diving! This board is autodetected because there are some good BioStar subsystem IDs. Matching uses onboard VT6420 SATA RAID with subsystem BioStar 3206 and onboard UniChrome Pro IGP graphics with subsystem BioStar 1202. Corresponding to flashrom svn r256 and coreboot v2 svn r3364. Signed-off-by: Peter Stuge <peter@stuge.se> Acked-by: Lyos Gemini Norezel <lyos.gemininorezel@gmail.com>
Diffstat (limited to 'board_enable.c')
-rw-r--r--board_enable.c28
1 files changed, 28 insertions, 0 deletions
diff --git a/board_enable.c b/board_enable.c
index 1282b085..82eb5415 100644
--- a/board_enable.c
+++ b/board_enable.c
@@ -515,6 +515,32 @@ static int board_kontron_986lcd_m(const char *name)
}
/**
+ * Suited for:
+ * - BioStar P4M80-M4: Intel P4 + VIA P4M800 + VT8237
+ */
+static int board_biostar_p4m80_m4(const char *name)
+{
+ /* enter IT87xx conf mode */
+ OUTB(0x87, 0x2e);
+ OUTB(0x01, 0x2e);
+ OUTB(0x55, 0x2e);
+ OUTB(0x55, 0x2e);
+
+ /* select right flash chip */
+ wbsio_mask(0x2e, 0x22, 0x80, 0x80);
+
+ /* bit 3: flash chip write enable
+ * bit 7: map flash chip at 1MB-128K (why though? ignoring this.)
+ */
+ wbsio_mask(0x2e, 0x24, 0x04, 0x04);
+
+ /* exit IT87xx conf mode */
+ wbsio_write(0x2, 0x2e, 0x2);
+
+ 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
* the basis of subsystem/card IDs. As not every vendor handles
@@ -584,6 +610,8 @@ struct board_pciid_enable board_pciid_enables[] = {
"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},
+ {0x1106, 0x3149, 0x1565, 0x3206, 0x1106, 0x3344, 0x1565, 0x1202,
+ NULL, NULL, "BioStar P4M80-M4", board_biostar_p4m80_m4},
{0, 0, 0, 0, 0, 0, 0, 0, NULL, NULL} /* Keep this */
};