Commit 87b04596 authored by Andy Shevchenko's avatar Andy Shevchenko Committed by Vinod Koul

dmaengine: idma64: convert to __ffs()

We replace __fls() by __ffs() since we have to find a *minimum* data width that
satisfies both source and destination.
Signed-off-by: default avatarAndy Shevchenko <andriy.shevchenko@linux.intel.com>
Signed-off-by: default avatarVinod Koul <vinod.koul@intel.com>
parent 9ab8b4e7
...@@ -257,15 +257,15 @@ static u64 idma64_hw_desc_fill(struct idma64_hw_desc *hw, ...@@ -257,15 +257,15 @@ static u64 idma64_hw_desc_fill(struct idma64_hw_desc *hw,
dar = config->dst_addr; dar = config->dst_addr;
ctllo |= IDMA64C_CTLL_DST_FIX | IDMA64C_CTLL_SRC_INC | ctllo |= IDMA64C_CTLL_DST_FIX | IDMA64C_CTLL_SRC_INC |
IDMA64C_CTLL_FC_M2P; IDMA64C_CTLL_FC_M2P;
src_width = min_t(u32, 2, __fls(sar | hw->len)); src_width = min_t(u32, 2, __ffs(sar | hw->len));
dst_width = __fls(config->dst_addr_width); dst_width = __ffs(config->dst_addr_width);
} else { /* DMA_DEV_TO_MEM */ } else { /* DMA_DEV_TO_MEM */
sar = config->src_addr; sar = config->src_addr;
dar = hw->phys; dar = hw->phys;
ctllo |= IDMA64C_CTLL_DST_INC | IDMA64C_CTLL_SRC_FIX | ctllo |= IDMA64C_CTLL_DST_INC | IDMA64C_CTLL_SRC_FIX |
IDMA64C_CTLL_FC_P2M; IDMA64C_CTLL_FC_P2M;
src_width = __fls(config->src_addr_width); src_width = __ffs(config->src_addr_width);
dst_width = min_t(u32, 2, __fls(dar | hw->len)); dst_width = min_t(u32, 2, __ffs(dar | hw->len));
} }
lli->sar = sar; lli->sar = sar;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment