From: Jingchang Lu <jingchang.lu@freescale.com>
To: "Lothar Waßmann" <LW@KARO-electronics.de>
Cc: "vinod.koul@intel.com" <vinod.koul@intel.com>,
"linux@arm.linux.org.uk" <linux@arm.linux.org.uk>,
"arnd@arndb.de" <arnd@arndb.de>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
"dmaengine@vger.kernel.org" <dmaengine@vger.kernel.org>,
"linux-arm-kernel@lists.infradead.org"
<linux-arm-kernel@lists.infradead.org>
Subject: RE: [PATCHv3] dmaengine: fsl-edma: fixup reg offset and hw S/G support in big-endian model
Date: Thu, 25 Sep 2014 06:42:00 +0000 [thread overview]
Message-ID: <7635751d171a401d88ce70f9adee88bb@BL2PR03MB467.namprd03.prod.outlook.com> (raw)
In-Reply-To: <20140924130510.62d78440@ipc1.ka-ro>
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain; charset="utf-8", Size: 2854 bytes --]
>-----Original Message-----
>From: Lothar WaÃmann [mailto:LW@KARO-electronics.de]
>Sent: Wednesday, September 24, 2014 7:05 PM
>To: Lu Jingchang-B35083
>Cc: vinod.koul@intel.com; linux@arm.linux.org.uk; arnd@arndb.de; linux-
>kernel@vger.kernel.org; dmaengine@vger.kernel.org; linux-arm-
>kernel@lists.infradead.org
>Subject: Re: [PATCHv3] dmaengine: fsl-edma: fixup reg offset and hw S/G
>support in big-endian model
>
>Hi,
>
>Jingchang Lu wrote:
>> The offset of all 8-/16-bit register in big-endian eDMA model are
>s/register/registers/
>
>> swapped in a 32-bit size opposite those in the little-endian model.
>>
>> The hardware Scatter/Gather requires the subsequent TCDs in memory to
>> be auto loaded should retain little endian independent of the register
>> endian model, the dma engine will do the swap if need.
>>
>> This patch also use regular assignment for tcd variables r/w instead
>> of with io function previously that may not always be true.
>>
>> Signed-off-by: Jingchang Lu <jingchang.lu@freescale.com>
>> ---
>> changes in v3:
>> use unsigned long instead of u32 in reg offset swap cast to avoid
>warning.
>>
>> changes in v2:
>> simplify register offset swap calculation.
>> use regular assignment for tcd variables r/w instead of io function.
>>
>> drivers/dma/fsl-edma.c | 106
>> ++++++++++++++++++++++++++-----------------------
>> 1 file changed, 57 insertions(+), 49 deletions(-)
>>
>> diff --git a/drivers/dma/fsl-edma.c b/drivers/dma/fsl-edma.c index
>> 3c5711d..9ca55ee 100644
>> --- a/drivers/dma/fsl-edma.c
>> +++ b/drivers/dma/fsl-edma.c
>> @@ -177,16 +177,10 @@ struct fsl_edma_engine {
>> /*
>> * R/W functions for big- or little-endian registers
>> * the eDMA controller's endian is independent of the CPU core's endian.
>> + * for the big-endian IP module, the offset for 8-bit or 16-bit
>> + register
>s/for/For/
>
>> + * should also be swapped oposite to that in little-endian IP.
>s/oposite/opposite/
>
>[...]
>> @@ -459,20 +460,27 @@ static void fill_tcd_params(struct fsl_edma_engine
>*edma,
>> u16 csr = 0;
>>
>> /*
>> - * eDMA hardware SGs require the TCD parameters stored in memory
>> - * the same endian as the eDMA module so that they can be loaded
>> - * automatically by the engine
>> + * eDMA hardware SGs requires the TCDs to be auto loaded
>> + * in the little endian whenver the register endian model,
>"in little endian whatever the register endian model"
>
>> + * So we put the value in little endian in memory, waitting
>s/waitting/waiting/
>
>> + * for fsl_set_tcd_params doing the swap.
>fsl_set_tcd_params()
>
>
>
>Lothar WaÃmann
>--
Thanks, I will amend them in the next version patch.
Best Regards,
Jingchang
ÿôèº{.nÇ+·®+%Ëÿ±éݶ\x17¥wÿº{.nÇ+·¥{±þG«éÿ{ayº\x1dÊÚë,j\a¢f£¢·hïêÿêçz_è®\x03(éÝ¢j"ú\x1a¶^[m§ÿÿ¾\a«þG«éÿ¢¸?¨èÚ&£ø§~á¶iOæ¬z·vØ^\x14\x04\x1a¶^[m§ÿÿÃ\fÿ¶ìÿ¢¸?I¥
prev parent reply other threads:[~2014-09-25 6:42 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-09-24 9:24 Jingchang Lu
2014-09-24 11:05 ` Lothar Waßmann
2014-09-24 12:03 ` Russell King - ARM Linux
2014-09-25 7:39 ` Jingchang Lu
2014-09-25 6:42 ` Jingchang Lu [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=7635751d171a401d88ce70f9adee88bb@BL2PR03MB467.namprd03.prod.outlook.com \
--to=jingchang.lu@freescale.com \
--cc=LW@KARO-electronics.de \
--cc=arnd@arndb.de \
--cc=dmaengine@vger.kernel.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux@arm.linux.org.uk \
--cc=vinod.koul@intel.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
all inboxes | Powered by JetHome®