From mboxrd@z Thu Jan 1 00:00:00 1970 From: "Fernandes, Joel" Subject: Re: [PATCH 3/9] ARM: edma: Add function to manually trigger an EDMA channel Date: Wed, 31 Jul 2013 05:34:14 +0000 Message-ID: References: <1375104595-16018-1-git-send-email-joelf@ti.com> <1375104595-16018-4-git-send-email-joelf@ti.com> <51F74CAD.3040604@ti.com> <51F892D2.4090805@ti.com>,<51F89F5E.2050605@ti.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <51F89F5E.2050605-l0cyMroinI0@public.gmane.org> Content-Language: en-US List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: Errors-To: davinci-linux-open-source-bounces-VycZQUHpC/PFrsHnngEfi1aTQe2KTcn/@public.gmane.org To: "Nori, Sekhar" Cc: Mark Brown , Tony Lindgren , Grant Likely , "R, Sricharan" , Russell King , Vinod Koul , "Vutla, Lokesh" , Chris Ball , Arnd Bergmann , "Nayak, Rajendra" , Rob Herring , Jason Kridner , Linux OMAP List , Linux ARM Kernel List , Linux DaVinci Kernel List , "Krishnamoorthy, Balaji T" , Linux MMC List , Linux Kernel Mailing List List-Id: linux-mmc@vger.kernel.org On Jul 31, 2013, at 12:23 AM, "Nori, Sekhar" wrote: > On Wednesday 31 July 2013 10:00 AM, Joel Fernandes wrote: >> On 07/30/2013 12:18 AM, Sekhar Nori wrote: >>> On Monday 29 July 2013 06:59 PM, Joel Fernandes wrote: >>>> Manual trigger for events missed as a result of splitting a >>>> scatter gather list and DMA'ing it in batches. Add a helper >>>> function to trigger a channel incase any such events are missed. >>>> >>>> Signed-off-by: Joel Fernandes >>>> --- >>>> arch/arm/common/edma.c | 21 +++++++++++++++++++++ >>>> include/linux/platform_data/edma.h | 2 ++ >>>> 2 files changed, 23 insertions(+) >>>> >>>> diff --git a/arch/arm/common/edma.c b/arch/arm/common/edma.c >>>> index 3567ba1..10995b2 100644 >>>> --- a/arch/arm/common/edma.c >>>> +++ b/arch/arm/common/edma.c >>>> @@ -1236,6 +1236,27 @@ void edma_resume(unsigned channel) >>>> } >>>> EXPORT_SYMBOL(edma_resume); >>>> >>>> +int edma_manual_trigger(unsigned channel) >>> >>> edma_trigger_channel() maybe? Brings consistency with >>> edma_alloc_channel() edma_free_channel() etc. >> >> Ok, sure. >> >>> >>>> +{ >>>> + unsigned ctlr; >>>> + int j; >>>> + unsigned int mask; >>>> + >>>> + ctlr = EDMA_CTLR(channel); >>>> + channel = EDMA_CHAN_SLOT(channel); >>>> + mask = BIT(channel & 0x1f); >>>> + >>>> + j = channel >> 5; >>>> + >>>> + /* EDMA channels without event association */ >>> >>> May be actually check for no-event association before you trigger in >>> software? You can do that by looking at unused channel list, no? >> >> But, we want to trigger whether there is event association or not in >> this function. For ex, MMC has event associated but still this function >> is used to trigger event for it. > > Okay, just drop the misleading comment then. Ok, will do. Thanks, -Joel > > Regards, > Sekhar From mboxrd@z Thu Jan 1 00:00:00 1970 From: joelf@ti.com (Fernandes, Joel) Date: Wed, 31 Jul 2013 05:34:14 +0000 Subject: [PATCH 3/9] ARM: edma: Add function to manually trigger an EDMA channel In-Reply-To: <51F89F5E.2050605@ti.com> References: <1375104595-16018-1-git-send-email-joelf@ti.com> <1375104595-16018-4-git-send-email-joelf@ti.com> <51F74CAD.3040604@ti.com> <51F892D2.4090805@ti.com>,<51F89F5E.2050605@ti.com> Message-ID: To: linux-arm-kernel@lists.infradead.org List-Id: linux-arm-kernel.lists.infradead.org On Jul 31, 2013, at 12:23 AM, "Nori, Sekhar" wrote: > On Wednesday 31 July 2013 10:00 AM, Joel Fernandes wrote: >> On 07/30/2013 12:18 AM, Sekhar Nori wrote: >>> On Monday 29 July 2013 06:59 PM, Joel Fernandes wrote: >>>> Manual trigger for events missed as a result of splitting a >>>> scatter gather list and DMA'ing it in batches. Add a helper >>>> function to trigger a channel incase any such events are missed. >>>> >>>> Signed-off-by: Joel Fernandes >>>> --- >>>> arch/arm/common/edma.c | 21 +++++++++++++++++++++ >>>> include/linux/platform_data/edma.h | 2 ++ >>>> 2 files changed, 23 insertions(+) >>>> >>>> diff --git a/arch/arm/common/edma.c b/arch/arm/common/edma.c >>>> index 3567ba1..10995b2 100644 >>>> --- a/arch/arm/common/edma.c >>>> +++ b/arch/arm/common/edma.c >>>> @@ -1236,6 +1236,27 @@ void edma_resume(unsigned channel) >>>> } >>>> EXPORT_SYMBOL(edma_resume); >>>> >>>> +int edma_manual_trigger(unsigned channel) >>> >>> edma_trigger_channel() maybe? Brings consistency with >>> edma_alloc_channel() edma_free_channel() etc. >> >> Ok, sure. >> >>> >>>> +{ >>>> + unsigned ctlr; >>>> + int j; >>>> + unsigned int mask; >>>> + >>>> + ctlr = EDMA_CTLR(channel); >>>> + channel = EDMA_CHAN_SLOT(channel); >>>> + mask = BIT(channel & 0x1f); >>>> + >>>> + j = channel >> 5; >>>> + >>>> + /* EDMA channels without event association */ >>> >>> May be actually check for no-event association before you trigger in >>> software? You can do that by looking at unused channel list, no? >> >> But, we want to trigger whether there is event association or not in >> this function. For ex, MMC has event associated but still this function >> is used to trigger event for it. > > Okay, just drop the misleading comment then. Ok, will do. Thanks, -Joel > > Regards, > Sekhar