RE: [PATCH v28 2/4] dt-bindings: i2c: ast2600-i2c.yaml: Add global-regs and enable-dma properties

Ryan Chen <[email protected]>
Newsgroups org.ozlabs.lists.openbmc,org.infradead.lists.linux-arm-kernel,org.kernel.vger.linux-devicetree,org.kernel.vger.linux-i2c,org.kernel.vger.linux-kernel,org.ozlabs.lists.linux-aspeed
Message-ID <TY2PPF5CB9A1BE6B6C124B8DE265562A722F2242@TY2PPF5CB9A1BE6.apcprd06.prod.outlook.com>
> > Subject: Re: [PATCH v28 2/4] dt-bindings: i2c: ast2600-i2c.yaml: Add
> > global-regs and enable-dma properties
> >
> > Hi Ryan,
> >
> > > > Sounds reasonable, but before you do so, how are you planning to
> > > > manage the allocation of DMA channels across multiple i2c peripherals?
> > > >
> > > The AST2600 I2C hardware has only one can use DMA at a time.
> > > To avoid the complexity of managing DMA channel contention, I plan
> > > to use buffer mode by default for all controllers, which still
> > > provides better performance than byte mode without requiring DMA
> > > channel
> > allocation.
> >
> > OK, but your wording there ("by default") implies that DMA is still
> > selectable for one controller peripheral. In which case: you still
> > have the problem of managing DMA channel contention, but now it's at
> runtime instead.
> >
> > So my question still stands: how are you planning to enforce that DMA
> > is only enabled for one controller?
> >
> > Or are you planning to disable I2C DMA entirely on AST2600?
> Yes, This is my intent to do.
> Disable I2C DMA entirely on AST2600.
> If I remove DMA, should can I keep byte and buffer for sysfs?

Hello Rob,

On the AST2600, we have a single-channel constraint, which makes DMA
support across all controllers difficult to implement without some kind of
predefined configuration. That would be a bit of a misuse of a DT property.

For future platforms such as the AST2700, DMA support should be much
more straightforward. DMA capability can be inferred from the compatible
string.

Unless there are any objections, I will rework this series to use buffer mode
only on the AST2600, and add AST2700 DMA support separately.

Ryan
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.