diff options
author | Yuval Mintz | 2016-02-21 11:40:10 +0200 |
---|---|---|
committer | David S. Miller | 2016-02-21 22:49:16 -0500 |
commit | 944945986f125bdbbeaa78dac0c0eadb963eb34a (patch) | |
tree | 29b0f6667351f3451cde3b0f66fe618bef6da29e /include/linux/qed | |
parent | 06f56b8136b75a04ee6e142a9e345cfd4b357de5 (diff) |
qed: Introduce DMA_REGPAIR_LE
FW hsi contains regpairs, mostly for 64-bit address representations.
Since same paradigm is applied each time a regpair is filled, this
introduces a new utility macro for setting such regpairs.
Signed-off-by: Yuval Mintz <Yuval.Mintz@qlogic.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'include/linux/qed')
-rw-r--r-- | include/linux/qed/qed_chain.h | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/include/linux/qed/qed_chain.h b/include/linux/qed/qed_chain.h index 41b9049b57e2..5f8fcaaa6504 100644 --- a/include/linux/qed/qed_chain.h +++ b/include/linux/qed/qed_chain.h @@ -19,6 +19,10 @@ /* dma_addr_t manip */ #define DMA_LO_LE(x) cpu_to_le32(lower_32_bits(x)) #define DMA_HI_LE(x) cpu_to_le32(upper_32_bits(x)) +#define DMA_REGPAIR_LE(x, val) do { \ + (x).hi = DMA_HI_LE((val)); \ + (x).lo = DMA_LO_LE((val)); \ + } while (0) #define HILO_GEN(hi, lo, type) ((((type)(hi)) << 32) + (lo)) #define HILO_DMA(hi, lo) HILO_GEN(hi, lo, dma_addr_t) |