[flashrom] [PATCH] VIA: disable byte merging
Michael Karcher
flashrom at mkarcher.dialup.fu-berlin.de
Wed May 12 01:12:18 CEST 2010
All mentioned north bridges have been checked against data sheet. That's
all north bridges google found a datasheet for with "byte enable" included.
Signed-off-by: Michael Karcher <flashrom at mkarcher.dialup.fu-berlin.de>
---
chipset_enable.c | 34 ++++++++++++++++++++++++++++++++++
1 files changed, 34 insertions(+), 0 deletions(-)
diff --git a/chipset_enable.c b/chipset_enable.c
index fc60484..6ef1f8d 100644
--- a/chipset_enable.c
+++ b/chipset_enable.c
@@ -639,6 +639,32 @@ static int enable_flash_ich10(struct pci_dev *dev, const char *name)
return enable_flash_ich_dc_spi(dev, name, 10);
}
+static void via_do_byte_merge(void * arg)
+{
+ struct pci_dev * dev = arg;
+ uint8_t val;
+
+ printf_debug("Re-enabling byte merging\n");
+ val = pci_read_byte(dev, 0x71);
+ val |= 0x40;
+ pci_write_byte(dev, 0x71, val);
+}
+
+static int via_no_byte_merge(struct pci_dev *dev, const char *name)
+{
+ uint8_t val;
+
+ val = pci_read_byte(dev, 0x71);
+ if (val & 0x40)
+ {
+ printf_debug("Disabling byte merging\n");
+ val &= ~0x40;
+ pci_write_byte(dev, 0x71, val);
+ register_shutdown(via_do_byte_merge, dev);
+ }
+ return 0;
+}
+
static int enable_flash_vt823x(struct pci_dev *dev, const char *name)
{
uint8_t val;
@@ -1405,6 +1431,14 @@ const struct penable chipset_enables[] = {
{0x1039, 0x0746, NT, "SiS", "746", enable_flash_sis540},
{0x1039, 0x0748, NT, "SiS", "748", enable_flash_sis540},
{0x1039, 0x0755, NT, "SiS", "755", enable_flash_sis540},
+ /* VIA northbridges */
+ {0x1106, 0x0585, NT, "VIA", "VT82C585VPX", via_no_byte_merge},
+ {0x1106, 0x0595, NT, "VIA", "VT82C595", via_no_byte_merge},
+ {0x1106, 0x0597, NT, "VIA", "VT82C597", via_no_byte_merge},
+ {0x1106, 0x0691, NT, "VIA", "VT82C69x", via_no_byte_merge}, /* 691, 693a, 694t, 694x checked */
+ {0x1106, 0x0601, NT, "VIA", "VT8601/VT8601A", via_no_byte_merge},
+ {0x1106, 0x8601, NT, "VIA", "VT8601T", via_no_byte_merge},
+ /* VIA southbridges */
{0x1106, 0x8324, OK, "VIA", "CX700", enable_flash_vt823x},
{0x1106, 0x8231, NT, "VIA", "VT8231", enable_flash_vt823x},
{0x1106, 0x3074, NT, "VIA", "VT8233", enable_flash_vt823x},
--
1.7.1
More information about the flashrom
mailing list