aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--fw_cfg.c11
-rw-r--r--include/fw_cfg.h5
2 files changed, 10 insertions, 6 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);
}
}
diff --git a/include/fw_cfg.h b/include/fw_cfg.h
index 52ed4e3..1ddfc1f 100644
--- a/include/fw_cfg.h
+++ b/include/fw_cfg.h
@@ -101,11 +101,6 @@ static inline uint32_t fw_cfg_readl_le(void)
return val;
}
-static inline void fw_cfg_read(void *buf, int len)
-{
- insb(buf, FW_CFG_DATA, len);
-}
-
static inline void fw_cfg_skip(int len)
{
while (len--)