lkml.org 
[lkml]   [2012]   [Jul]   [16]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH 5/7 v2] dma: sh: use an integer slave ID to improve API compatibility
On Mon, 16 Jul 2012, Vinod Koul wrote:

> On Mon, 2012-07-16 at 09:13 +0200, Guennadi Liakhovetski wrote:
> > > > They tell the driver how the channel has to be configured to
> > support this
> > > > specific client. They are values of two specific registers. In
> > fact, CHCR
> > > > means exactly that - CHannel Control Register.
> > > what exactly does the channel control register do in shdma? Should
> > shdma
> > > driver deduce this value rather than client giving it?
> > > Same question for mid_rid?
> >
> > See, e.g.,
> > arch/arm/mach-shmobile/setup-sh7372.c::sh7372_dmae_slaves[].
> > Platforms are supplying these values with shdma driver platform data,
> > together with slave IDs. Them when slaves request channels and supply
> > their slave IDs, the driver searches the above array, looking for the
> > matching slave ID, then it uses the rest of the information in those
> > structs to configure the channel for this client. Again, this is
> > nothing
> > new, this is how the driver has been functioning since a long time,
> > this
> > driver is not modifying anything there. Any changes to this
> > procedure,
> > like providing all thig information from clients themselves instead
> > of
> > keeping it with DMACs, requires these patches to be committed first.
> That wasn't my question.
>
> I want to know what does ccr and mid_rid mean to dmac here?

CHCR contains a few fields, some enable various interrupt sources, some
specify repeat- and renew-modes, others yet specify transfer size, source
and destination address-modes (incrementing, constant, decrementing),
others yet select a DMA client category (slave / memcpy / ...), and a
transfer flag. Some of these fields could be calculated, others are
pre-defined for various slaves, the exact layout of those fields can also
vary between SoCs.

MID_RID is actually a slave-selector, it contains a magic value, that
cannot be calculated.

Thanks
Guennadi
---
Guennadi Liakhovetski, Ph.D.
Freelance Open-Source Software Developer
http://www.open-technology.de/


\
 
 \ /
  Last update: 2012-07-16 11:21    [W:0.063 / U:0.680 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site