lkml.org 
[lkml]   [2014]   [Feb]   [28]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
SubjectRe: [PATCH 1/3] i2c: add DMA support for freescale i2c driver
Date
On Friday, February 28, 2014 at 03:23:52 AM, Shawn Guo wrote:
> On Fri, Feb 28, 2014 at 10:13:02AM +0800, Shawn Guo wrote:
> > On Thu, Feb 27, 2014 at 09:39:35PM +0100, Marek Vasut wrote:
> > > > @@ -193,6 +216,7 @@ static const struct imx_i2c_hwdata
> > > > imx1_i2c_hwdata = {
> > > >
> > > > .ndivs = ARRAY_SIZE(imx_i2c_clk_div),
> > > > .i2sr_clr_opcode = I2SR_CLR_OPCODE_W0C,
> > > > .i2cr_ien_opcode = I2CR_IEN_OPCODE_1,
> > > >
> > > > + .has_dma_support = false,
> > > >
> > > > };
> > > >
> > > > @@ -203,6 +227,7 @@ static const struct imx_i2c_hwdata
> > > > imx21_i2c_hwdata = { .ndivs =
ARRAY_SIZE(imx_i2c_clk_div),
> > > >
> > > > .i2sr_clr_opcode = I2SR_CLR_OPCODE_W0C,
> > > > .i2cr_ien_opcode = I2CR_IEN_OPCODE_1,
> > > >
> > > > + .has_dma_support = false,
> > > >
> > > > };
> > > >
> > > > @@ -213,6 +238,7 @@ static struct imx_i2c_hwdata vf610_i2c_hwdata = {
> > > >
> > > > .ndivs = ARRAY_SIZE(vf610_i2c_clk_div),
> > > > .i2sr_clr_opcode = I2SR_CLR_OPCODE_W1C,
> > > > .i2cr_ien_opcode = I2CR_IEN_OPCODE_0,
> > > >
> > > > + .has_dma_support = true,
> > >
> > > So why exactly don't we have a DT prop for determining whether the
> > > controller has DMA support ?
> >
> > Using DMA or PIO is a decision that should be made by driver on its own,
> > not device tree.
>
> Sorry. I misunderstood it. Yes, we can look at the DT property 'dmas'
> to know if the controller has DMA capability.

You're right. Whether or not does the hardware support DMA transfers is a
property of the hardware, that's why it should be in DT.

Best regards,
Marek Vasut


\
 
 \ /
  Last update: 2014-02-28 12:01    [W:0.113 / U:7.012 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site