aboutsummaryrefslogtreecommitdiff
path: root/util
diff options
context:
space:
mode:
authorarch import user (historical) <svn@openbios.org>2005-07-06 17:13:46 +0000
committerarch import user (historical) <svn@openbios.org>2005-07-06 17:13:46 +0000
commit98d0d30f6b8237f888cd44b33292319e3c167a47 (patch)
tree0571a9e863b7a7749c2e4fd5bda7ec080831a73c /util
parent577f185d382c8130f20f0ee7e8466ed8bbebbacc (diff)
Revision: linuxbios@linuxbios.org--devel/freebios--devel--2.0--patch-30
Creator: Yinghai Lu <yhlu@tyan.com> Nvidia Ck804 support git-svn-id: svn://svn.coreboot.org/coreboot/trunk@1946 2b7e53f0-3cfb-0310-b3e9-8179ed1497e1
Diffstat (limited to 'util')
-rw-r--r--util/flash_and_burn/flash_enable.c38
1 files changed, 38 insertions, 0 deletions
diff --git a/util/flash_and_burn/flash_enable.c b/util/flash_and_burn/flash_enable.c
index 6a78434463..19fd9b07eb 100644
--- a/util/flash_and_burn/flash_enable.c
+++ b/util/flash_and_burn/flash_enable.c
@@ -249,6 +249,41 @@ static int enable_flash_amd8111(struct pci_dev *dev, char *name)
return 0;
}
+//By yhlu
+static int enable_flash_ck804(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.
+ */
+
+ //dump_pci_device(dev);
+
+ old = pci_read_byte(dev, 0x88);
+ new = old | 0xc0;
+ if (new != old) {
+ pci_write_byte(dev, 0x88, new);
+ if (pci_read_byte(dev, 0x88) != new) {
+ printf("tried to set 0x%x to 0x%x on %s failed (WARNING ONLY)\n",
+ 0x88, new, name);
+ }
+ }
+
+ old = pci_read_byte(dev, 0x6d);
+ new = old | 0x01;
+ if (new == old)
+ return 0;
+ pci_write_byte(dev, 0x6d, new);
+
+ if (pci_read_byte(dev, 0x6d) != new) {
+ printf("tried to set 0x%x to 0x%x on %s failed (WARNING ONLY)\n",
+ 0x6d, new, name);
+ return -1;
+ }
+ return 0;
+}
+
typedef struct penable {
unsigned short vendor, device;
char *name;
@@ -265,6 +300,9 @@ static FLASH_ENABLE enables[] = {
{0x100b, 0x0510, "SC1100", enable_flash_sc1100},
{0x1039, 0x0008, "SIS5595", enable_flash_sis5595},
{0x1022, 0x7468, "AMD8111", enable_flash_amd8111},
+ {0x10de, 0x0050, "NVIDIA CK804", enable_flash_ck804}, // LPC
+ {0x10de, 0x0051, "NVIDIA CK804", enable_flash_ck804}, // Pro
+ {0x10de, 0x00d3, "NVIDIA CK804", enable_flash_ck804}, // Slave, should not be here, to fix known bug for A01.
};
int enable_flash_write()