From d1f698ac277380114d627ad210d13cbbc3b787a9 Mon Sep 17 00:00:00 2001 From: Peter Stuge Date: Wed, 11 Jun 2008 02:22:42 +0000 Subject: flashrom: 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. Signed-off-by: Peter Stuge Acked-by: Lyos Gemini Norezel git-svn-id: svn://svn.coreboot.org/coreboot/trunk@3364 2b7e53f0-3cfb-0310-b3e9-8179ed1497e1 --- util/flashrom/board_enable.c | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) (limited to 'util/flashrom/board_enable.c') diff --git a/util/flashrom/board_enable.c b/util/flashrom/board_enable.c index 1282b08502..82eb5415ac 100644 --- a/util/flashrom/board_enable.c +++ b/util/flashrom/board_enable.c @@ -514,6 +514,32 @@ static int board_kontron_986lcd_m(const char *name) return 0; } +/** + * 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 @@ -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 */ }; -- cgit v1.2.3