From 81d587188aafb97a5aa400f50e06469ea248e769 Mon Sep 17 00:00:00 2001 From: Akhil Goyal Date: Mon, 3 Jul 2017 18:01:35 +0530 Subject: [PATCH] bus/fslmc: add macros to get/set FLE context Signed-off-by: Akhil Goyal --- drivers/bus/fslmc/portal/dpaa2_hw_pvt.h | 7 +++++++ 1 file changed, 7 insertions(+) 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) -- 2.20.1