aboutsummaryrefslogtreecommitdiff
path: root/fw_cfg.c
diff options
context:
space:
mode:
Diffstat (limited to 'fw_cfg.c')
-rw-r--r--fw_cfg.c11
1 files changed, 10 insertions, 1 deletions
diff --git a/fw_cfg.c b/fw_cfg.c
index 329311a..33b4003 100644
--- a/fw_cfg.c
+++ b/fw_cfg.c
@@ -88,6 +88,15 @@ void fw_cfg_dma(int control, void *buf, int len)
}
}
+void fw_cfg_read(void *buf, int len)
+{
+ if (version & FW_CFG_VERSION_DMA) {
+ fw_cfg_dma(FW_CFG_DMA_CTL_READ, buf, len);
+ } else {
+ insb(buf, FW_CFG_DATA, len);
+ }
+}
+
void
fw_cfg_read_entry(int e, void *buf, int len)
{
@@ -99,7 +108,7 @@ fw_cfg_read_entry(int e, void *buf, int len)
fw_cfg_dma(control, buf, len);
} else {
fw_cfg_select(e);
- fw_cfg_read(buf, len);
+ insb(buf, FW_CFG_DATA, len);
}
}