aboutsummaryrefslogtreecommitdiffstats
path: root/chipset_enable.c
diff options
context:
space:
mode:
Diffstat (limited to 'chipset_enable.c')
-rw-r--r--chipset_enable.c14
1 files changed, 14 insertions, 0 deletions
diff --git a/chipset_enable.c b/chipset_enable.c
index 6ac829b7..ab68598f 100644
--- a/chipset_enable.c
+++ b/chipset_enable.c
@@ -203,6 +203,7 @@ static int enable_flash_ich_dc(struct pci_dev *dev, const char *name)
{
uint32_t fwh_conf;
int i;
+ char *idsel = NULL;
/* Ignore all legacy ranges below 1 MB. */
/* FWH_SEL1 */
@@ -232,6 +233,19 @@ static int enable_flash_ich_dc(struct pci_dev *dev, const char *name)
(0xff0 + i) * 0x100000,
(fwh_conf >> i) & 0x1 ? "en" : "dis");
+ if (programmer_param)
+ idsel = strstr(programmer_param, "fwh_idsel=");
+
+ if (idsel) {
+ idsel += strlen("fwh_idsel=");
+ fwh_conf = (uint32_t)strtoul(idsel, NULL, 0);
+
+ /* FIXME: Need to undo this on shutdown. */
+ printf("\nSetting IDSEL=0x%x for top 16 MB", fwh_conf);
+ pci_write_long(dev, 0xd0, fwh_conf);
+ pci_write_word(dev, 0xd4, fwh_conf);
+ }
+
return enable_flash_ich(dev, name, 0xdc);
}