Subject: [PATCH 4/6] dma: pl08x: Add support for Faraday Technology FTDMAC020

From: [email-masked] (Vinod Koul)
Date: Wed, 24 May 2017 09:41:38 +0530

On Sat, May 20, 2017 at 07:56:34PM +0200, Linus Walleij wrote:
> On Sun, May 14, 2017 at 2:34 PM, Vinod Koul <[email-masked]> wrote:
> > On Sat, Apr 08, 2017 at 02:04:55PM +0200, Linus Walleij wrote:
> >
> >> +#define FTDMAC020_CH_CSR_FIFOTH_MSK          (0x7 << 24)
> >
> > IIUC we can have a GENMASK(27, 25), won't that be a bit better here and
> > other places?
> 
> I will send an additional patch at the end of the series switching *all*
> of these to use GENMASK() so we keep it to one technical step
> per patch, OK?

Sounds good to me

> 
> >> +#define FTDMAC020_CH_CSR_FIFOTH_SHIFT                (24)
> >
> > and you may use ffs(FTDMAC020_CH_CSR_FIFOTH_MSK) or keep a shift define
> 
> I'm more convenient with the shift at least here.
> 
> ffs(DEFINE) makes me thin ffs() is a function invoked all the
> time even if I know very well the compiler will mangle it into
> a constant... just confusing for my perception.

Perhaps we should have a SHIFT_MACRO(x) which would give us the shifted value
from a mask value :)

-- 
~Vinod