summaryrefslogtreecommitdiffstats
path: root/flash_enable.c
diff options
context:
space:
mode:
authorRonald G. Minnich <rminnich@gmail.com>2004-09-28 20:09:06 +0000
committerRonald G. Minnich <rminnich@gmail.com>2004-09-28 20:09:06 +0000
commit6a96741279730b815c64e4304ba1150db91742b1 (patch)
tree79a59f2014ac4ce34ba4607b320e03ce7ffe2170 /flash_enable.c
parentaf47477c29839002644d235667a78207b04acc0a (diff)
downloadast2050-flashrom-6a96741279730b815c64e4304ba1150db91742b1.zip
ast2050-flashrom-6a96741279730b815c64e4304ba1150db91742b1.tar.gz
Add support for ICH4
More i955pm stuff. Corresponding to flashrom svn r23 and coreboot v2 svn r1649.
Diffstat (limited to 'flash_enable.c')
-rw-r--r--flash_enable.c26
1 files changed, 26 insertions, 0 deletions
diff --git a/flash_enable.c b/flash_enable.c
index 67819da..7bb20c4 100644
--- a/flash_enable.c
+++ b/flash_enable.c
@@ -82,6 +82,31 @@ static int enable_flash_e7500(struct pci_dev *dev, char *name)
return 0;
}
+static int enable_flash_ich4(struct pci_dev *dev, char *name)
+{
+ /* register 4e.b gets or'ed with one */
+ unsigned char old, new;
+ /* if it fails, it fails. There are so many variations of broken mobos
+ * that it is hard to argue that we should quit at this point.
+ */
+
+ old = pci_read_byte(dev, 0x4e);
+
+ new = old | 1;
+
+ if (new == old)
+ return 0;
+
+ pci_write_byte(dev, 0x4e, new);
+
+ if (pci_read_byte(dev, 0x4e) != new) {
+ printf("tried to set 0x%x to 0x%x on %s failed (WARNING ONLY)\n",
+ 0x4e, new, name);
+ return -1;
+ }
+ return 0;
+}
+
static int enable_flash_vt8235(struct pci_dev *dev, char *name)
{
unsigned char old, new, val;
@@ -234,6 +259,7 @@ typedef struct penable {
static FLASH_ENABLE enables[] = {
{0x1039, 0x0630, "sis630", enable_flash_sis630},
{0x8086, 0x2480, "E7500", enable_flash_e7500},
+ {0x8086, 0x24c0, "ICH4", enable_flash_ich4},
{0x1106, 0x8231, "VT8231", enable_flash_vt8231},
{0x1106, 0x3177, "VT8235", enable_flash_vt8235},
{0x1078, 0x0100, "CS5530", enable_flash_cs5530},
OpenPOWER on IntegriCloud