From: Akhil Goyal Date: Mon, 3 Jul 2017 12:31:35 +0000 (+0530) Subject: bus/fslmc: add macros to get/set FLE context X-Git-Tag: spdx-start~2672 X-Git-Url: http://git.droids-corp.org/?p=dpdk.git;a=commitdiff_plain;h=81d587188aafb97a5aa400f50e06469ea248e769 bus/fslmc: add macros to get/set FLE context Signed-off-by: Akhil Goyal --- diff --git a/drivers/bus/fslmc/portal/dpaa2_hw_pvt.h b/drivers/bus/fslmc/portal/dpaa2_hw_pvt.h index f9f4e295e3..c88bc9f51e 100644 --- a/drivers/bus/fslmc/portal/dpaa2_hw_pvt.h +++ b/drivers/bus/fslmc/portal/dpaa2_hw_pvt.h @@ -195,6 +195,13 @@ enum qbman_fd_format { fle->addr_lo = lower_32_bits((uint64_t)addr); \ fle->addr_hi = upper_32_bits((uint64_t)addr); \ } while (0) +#define DPAA2_GET_FLE_CTXT(fle) \ + (uint64_t)((((uint64_t)((fle)->reserved[1])) << 32) + \ + (fle)->reserved[0]) +#define DPAA2_FLE_SAVE_CTXT(fle, addr) do { \ + fle->reserved[0] = lower_32_bits((uint64_t)addr); \ + fle->reserved[1] = upper_32_bits((uint64_t)addr); \ +} while (0) #define DPAA2_SET_FLE_OFFSET(fle, offset) \ ((fle)->fin_bpid_offset |= (uint32_t)(offset) << 16) #define DPAA2_SET_FLE_BPID(fle, bpid) ((fle)->fin_bpid_offset |= (uint64_t)bpid)