RE: [PATCH 1/4] dma: fsl-qdma: add qDMA Command queue mode driver

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 




> -----Original Message-----
> From: dmaengine-owner@xxxxxxxxxxxxxxx
> [mailto:dmaengine-owner@xxxxxxxxxxxxxxx] On Behalf Of Vinod Koul
> Sent: 2017年12月21日 0:17
> To: Wen He <wen.he_1@xxxxxxx>
> Cc: Leo Li <leoyang.li@xxxxxxx>; dmaengine@xxxxxxxxxxxxxxx; Jiafei Pan
> <jiafei.pan@xxxxxxx>; Jiaheng Fan <jiaheng.fan@xxxxxxx>
> Subject: Re: [PATCH 1/4] dma: fsl-qdma: add qDMA Command queue mode
> driver
> 
> On Wed, Dec 20, 2017 at 09:13:02AM +0000, Wen He wrote:
> > > > Okay, but DMA_IN/OUT need struct fsldma_chan.
> > > > May be I can refer to it that Implement a similar macro, will and
> > > > below to
> > > instead it in next version.
> > > >
> > > > #define QDMA_IN(fsl_qdma_engine, addr)
> > > \
> > > >                 (((fsl_qdma_engine)->big_endian &
> > > FSL_DMA_BIG_ENDIAN) ?         \
> > > >                         ioread32be(addr) : ioread32(addr))
> > > >
> > > > #define QDMA_OUT(fsl_qdma_engine, addr, val)
> > > \
> > > >                 (((fsl_qdma_engine)->big_endian &
> > > FSL_DMA_BIG_ENDIAN) ?         \
> > > >                         iowrite32be(val, addr) : iowrite32(val,
> > > > addr))
> > >
> > > Ah that would be duplicate. How about making it common and
> > > abstracting this as FSL_DMA_IN/OUT and using in both drivers?
> >
> > OK, but for now we are on rush to let this merged. Could we apply
> > current version fist, then I will discuss with author of that macro to get it
> done? Thank you.
> 
> Am really sorry but that is not how upstreaming works. We dont do this and
> we certainly don't rush.
> 

Okay, got it. through discuss with author, I know the fsldma.c is early freescale powerpc Socs driver and DMA_IN/OUT used.
So I want will and below defined FSL_DMA_IN/OUT instead DMA_IN/OUT in fsldma.h and using in both drivers.
Is that ok?

#ifdef CONFIG_PPC
static void ioread32(const u32 __iomem *addr)
{
        return in_le32(addr);
}

static void iowrite32(u32 __iomem *addr, u32 val)
{
        out_le32(addr, val);
}

static void ioread32be(const u32 __iomem *addr)
{
        return in_be32(addr);
}

static void iowrite32be(u32 __iomem *addr, u32 val)
{
        out_be32(addr, val);
}
#endif

#define FSL_DMA_IN(fsl_dma, addr, width)                                \
                (((fsl_dma)->feature & FSL_DMA_BIG_ENDIAN) ?            \
                        ioread##width##be(addr) : ioread##width(addr))

#define FSL_DMA_OUT(fsl_dma, addr, val, width)                          \
                (((fsl_dma)->feature & FSL_DMA_BIG_ENDIAN) ?            \
                        iowrite##width##be(val, addr) : iowrite##width(val, addr))

Best Regards,
Wen

> --
> ~Vinod
> --
> To unsubscribe from this list: send the line "unsubscribe dmaengine" in the
> body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at
> https://emea01.safelinks.protection.outlook.com/?url=http%3A%2F%2Fvger.
> kernel.org%2Fmajordomo-info.html&data=02%7C01%7Cwen.he_1%40nxp.co
> m%7C74567b527be2494f807008d547c47ce9%7C686ea1d3bc2b4c6fa92cd99
> c5c301635%7C0%7C0%7C636493831608931495&sdata=0nw8F8Vpcszm5WS
> ixNlv2PsonEJu1ippSVwyARvwzLM%3D&reserved=0
?韬{.n?????%??檩??w?{.n???Ё?撖)?骅w*jg????????G??⒏⒎?:+v????????????"??????



[Index of Archives]     [Linux Kernel]     [Linux ARM (vger)]     [Linux ARM MSM]     [Linux Omap]     [Linux Arm]     [Linux Tegra]     [Fedora ARM]     [Linux for Samsung SOC]     [eCos]     [Linux PCI]     [Linux Fastboot]     [Gcc Help]     [Git]     [DCCP]     [IETF Announce]     [Security]     [Linux MIPS]     [Yosemite Campsites]

  Powered by Linux