From: Kevin Hilman <khilman@deeprootsystems.com>
To: Venkatraman S <svenkatr@ti.com>
Cc: Manjunatha GK <manjugk@ti.com>,
linux-omap@vger.kernel.org, Tony Lindgren <tony@atomide.com>,
Santosh Shilimkar <santosh.shilimkar@ti.com>,
Govindraj R <govindraj.raja@ti.com>
Subject: Re: [PATCH v2] OMAP: DMA: Add API for setting channel dest addr
Date: Tue, 02 Mar 2010 09:16:45 -0800 [thread overview]
Message-ID: <87635e1w5e.fsf@deeprootsystems.com> (raw)
In-Reply-To: <618f0c911003020551p3af75870u16270b9b9ecb7d94@mail.gmail.com> (Venkatraman S.'s message of "Tue\, 2 Mar 2010 19\:21\:56 +0530")
Venkatraman S <svenkatr@ti.com> writes:
> Manjunath,
>
> On Tue, Mar 2, 2010 at 7:06 PM, Manjunatha GK <manjugk@ti.com> wrote:
>> The new API - omap_set_dma_dst_pos(int lch, int value) is added
>> for setting channel destination address in CPC/CDAC register
>>
>> Cc: Tony Lindgren <tony@atomide.com>
>> Cc: Santosh Shilimkar <santosh.shilimkar@ti.com>
>> Cc: S, Venkatraman <svenkatr@ti.com>
>> Signed-off-by: Manjunatha GK <manjugk@ti.com>
>> Signed-off-by: Govindraj R <govindraj.raja@ti.com>
>> ---
>> arch/arm/plat-omap/dma.c | 17 +++++++++++++++++
>> arch/arm/plat-omap/include/plat/dma.h | 1 +
>> 2 files changed, 18 insertions(+), 0 deletions(-)
>>
>> diff --git a/arch/arm/plat-omap/dma.c b/arch/arm/plat-omap/dma.c
>> index 2ab224c..c73f11a 100644
>> --- a/arch/arm/plat-omap/dma.c
>> +++ b/arch/arm/plat-omap/dma.c
>> @@ -1109,6 +1109,23 @@ dma_addr_t omap_get_dma_dst_pos(int lch)
>> }
>> EXPORT_SYMBOL(omap_get_dma_dst_pos);
>>
>> +/**
>> + * omap_set_dma_dst_pos() - Set DMA channel destination address
>> + * @arg1: lch DMA logical channel number
>> + * @arg2: value Value to write into CDAC register
>> + *
>> + * Writes "value" into the register CPC/CDAC
>> + */
>> +void omap_set_dma_dst_pos(int lch, int value)
>> +{
>> + if (cpu_is_omap15xx())
>> + dma_write(value, CPC(lch));
>> + else
>> + dma_write(value, CDAC(lch));
>> +
>> +}
>> +EXPORT_SYMBOL(omap_set_dma_dst_pos);
>> +
>> int omap_get_dma_active_status(int lch)
>> {
>> return (dma_read(CCR(lch)) & OMAP_DMA_CCR_EN) != 0;
>> diff --git a/arch/arm/plat-omap/include/plat/dma.h b/arch/arm/plat-omap/include/plat/dma.h
>> index 02232ca..3b6e43e 100644
>> --- a/arch/arm/plat-omap/include/plat/dma.h
>> +++ b/arch/arm/plat-omap/include/plat/dma.h
>> @@ -509,6 +509,7 @@ extern int omap_set_dma_callback(int lch,
>> void *data);
>> extern dma_addr_t omap_get_dma_src_pos(int lch);
>> extern dma_addr_t omap_get_dma_dst_pos(int lch);
>> +extern void omap_set_dma_dst_pos(int lch, int value);
>> extern void omap_clear_dma(int lch);
>> extern int omap_get_dma_active_status(int lch);
>> extern int omap_dma_running(void);
>> --
> CDAC is not the destination address, as the API seems to suggest.
> CDSA (Channel Destination Start Address) is.
>
> CDAC is a running counter of the current transfer.
> I propose to update the omap_start_dma to reset CDAC to 0 always.
I agree with Venkat. I think having it reset for every transfer
by default is the right way to handle this.
Kevin
--
To unsubscribe from this list: send the line "unsubscribe linux-omap" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
prev parent reply other threads:[~2010-03-02 17:16 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-03-02 13:36 [PATCH v2] OMAP: DMA: Add API for setting channel dest addr Manjunatha GK
2010-03-02 13:51 ` Venkatraman S
2010-03-02 17:16 ` Kevin Hilman [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87635e1w5e.fsf@deeprootsystems.com \
--to=khilman@deeprootsystems.com \
--cc=govindraj.raja@ti.com \
--cc=linux-omap@vger.kernel.org \
--cc=manjugk@ti.com \
--cc=santosh.shilimkar@ti.com \
--cc=svenkatr@ti.com \
--cc=tony@atomide.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox