From: Peng Ma <peng.ma@nxp.com>
To: "Krzysztof Kozłowski" <k.kozlowski.k@gmail.com>,
"Vinod Koul" <vkoul@kernel.org>,
"dmaengine@vger.kernel.org" <dmaengine@vger.kernel.org>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>
Cc: Fabio Estevam <fabio.estevam@nxp.com>,
Leo Li <leoyang.li@nxp.com>, Andy Tang <andy.tang@nxp.com>
Subject: RE: [EXT] [BUG BISECT] Net boot fails on VF50 after "dmaengine: fsl-edma: support little endian for edma driver"
Date: Thu, 4 Jul 2019 02:10:20 +0000 [thread overview]
Message-ID: <VI1PR04MB44316904F765E93CC1DFA0EDEDFA0@VI1PR04MB4431.eurprd04.prod.outlook.com> (raw)
In-Reply-To: <CAJKOXPfx6HeJgTu9TiusGACyt+uXVSmnpibO0m-qzCvFQNGK7g@mail.gmail.com>
[-- Attachment #1: Type: text/plain, Size: 2708 bytes --]
Hi Krzysztof,
I am sorry, It is my mistake to forget about VF50 used EDMA IP with little endian.
The Register(CHCFG0 - CHCFG15) of our platform designed as follows:
*-------------------------------------------------------------------------------*
| Offset | Big endian Register| Little endian Register|
|---------------------|--------------------------|-----------------------------|
| 0x0 | CHCFG0 | CHCFG3 |
|---------------------|--------------------------|-----------------------------|
| 0x1 | CHCFG1 | CHCFG2 |
|---------------------|--------------------------|-----------------------------|
| 0x2 | CHCFG2 | CHCFG1 |
|---------------------|--------------------------|-----------------------------|
| 0x3 | CHCFG3 | CHCFG0 |
|---------------------|--------------------------|-----------------------------|
| ... | ...... | ...... |
|---------------------|--------------------------|-----------------------------|
| 0xC | CHCFG12 | CHCFG15 |
|---------------------|--------------------------|-----------------------------|
| 0xD | CHCFG13 | CHCFG14 |
|---------------------|--------------------------|-----------------------------|
| 0xE | CHCFG14 | CHCFG13 |
|---------------------|--------------------------|-----------------------------|
| 0xF | CHCFG15 | CHCFG12 |
*-------------------------------------------------------------------------------*
So we need this patch, I make some changes,Please help me to test attatchment on VF50 board,
Thanks.
Best Regards,
Peng
>-----Original Message-----
>From: Krzysztof Kozłowski <k.kozlowski.k@gmail.com>
>Sent: 2019年7月2日 20:13
>To: Peng Ma <peng.ma@nxp.com>; Vinod Koul <vkoul@kernel.org>;
>dmaengine@vger.kernel.org; linux-kernel@vger.kernel.org
>Subject: [EXT] [BUG BISECT] Net boot fails on VF50 after "dmaengine:
>fsl-edma: support little endian for edma driver"
>
>Caution: EXT Email
>
>Hi,
>
>Bisect pointed commit:
>commit 002905eca5bedab08bafd9e325bbbb41670c7712
>Author: Peng Ma <peng.ma@nxp.com>
>Date: Thu Jun 13 10:27:08 2019 +0000
> dmaengine: fsl-edma: support little endian for edma driver
>
>as a reason of NFSv4 root boot failures. Toradex Colibri VF50 (Cortex
>A5) on Toradex Iris board.
>
>The user-space starts but hangs - a lot of messages are missing or seriously
>delayed.
>
>Please revert the patch of fix it. If needed I can provide more details about test
>system - let me know.
>
>Full log attached.
>
>Best regards,
>Krzysztof
[-- Attachment #2: 0001-dmaengine-fsl-edma-support-little-endian-for-edma-dr.patch --]
[-- Type: application/octet-stream, Size: 3060 bytes --]
From 95031d3e00a07bbfe1c987f28a4b468243799ac6 Mon Sep 17 00:00:00 2001
From: Peng Ma <peng.ma@nxp.com>
Date: Thu, 13 Jun 2019 10:27:08 +0000
Subject: [PATCH] dmaengine: fsl-edma: support little endian for edma driver
Our platforms with below registers(CHCFG0 - CHCFG15) of eDMA
*-----------------------------------------------------------*
| Offset | Big endian Register| Little endian Register|
|--------------|--------------------|-----------------------|
| 0x0 | CHCFG0 | CHCFG3 |
|--------------|--------------------|-----------------------|
| 0x1 | CHCFG1 | CHCFG2 |
|--------------|--------------------|-----------------------|
| 0x2 | CHCFG2 | CHCFG1 |
|--------------|--------------------|-----------------------|
| 0x3 | CHCFG3 | CHCFG0 |
|--------------|--------------------|-----------------------|
| ... | ...... | ...... |
|--------------|--------------------|-----------------------|
| 0xC | CHCFG12 | CHCFG15 |
|--------------|--------------------|-----------------------|
| 0xD | CHCFG13 | CHCFG14 |
|--------------|--------------------|-----------------------|
| 0xE | CHCFG14 | CHCFG13 |
|--------------|--------------------|-----------------------|
| 0xF | CHCFG15 | CHCFG12 |
*-----------------------------------------------------------*
Current eDMA driver does not support Little endian, so this
patch is to improve edma driver to support little endian.
Signed-off-by: Peng Ma <peng.ma@nxp.com>
Signed-off-by: Vinod Koul <vkoul@kernel.org>
---
drivers/dma/fsl-edma-common.c | 12 ++++++++++++
1 files changed, 12 insertions(+), 0 deletions(-)
diff --git a/drivers/dma/fsl-edma-common.c b/drivers/dma/fsl-edma-common.c
index 680b2a0..f30c203 100644
--- a/drivers/dma/fsl-edma-common.c
+++ b/drivers/dma/fsl-edma-common.c
@@ -7,6 +7,7 @@
#include <linux/module.h>
#include <linux/slab.h>
#include <linux/dma-mapping.h>
+#include <linux/sys_soc.h>
#include "fsl-edma-common.h"
@@ -42,6 +43,11 @@
#define EDMA_TCD 0x1000
+struct soc_device_attribute soc_fixup_tuning[] = {
+ { .family = "QorIQ LS1028A"},
+ { },
+};
+
static void fsl_edma_enable_request(struct fsl_edma_chan *fsl_chan)
{
struct edma_regs *regs = &fsl_chan->edma->regs;
@@ -83,9 +89,15 @@ void fsl_edma_chan_mux(struct fsl_edma_chan *fsl_chan,
u32 ch = fsl_chan->vchan.chan.chan_id;
void __iomem *muxaddr;
unsigned int chans_per_mux, ch_off;
+ int endian_diff[4] = {3, 1, -1, -3};
chans_per_mux = fsl_chan->edma->n_chans / DMAMUX_NR;
ch_off = fsl_chan->vchan.chan.chan_id % chans_per_mux;
+
+ if (!fsl_chan->edma->big_endian &&
+ soc_device_match(soc_fixup_tuning))
+ ch_off += endian_diff[ch_off % 4];
+
muxaddr = fsl_chan->edma->muxbase[ch / chans_per_mux];
slot = EDMAMUX_CHCFG_SOURCE(slot);
--
1.7.1
next prev parent reply other threads:[~2019-07-04 2:10 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-07-02 12:12 [BUG BISECT] Net boot fails on VF50 after "dmaengine: fsl-edma: support little endian for edma driver" Krzysztof Kozłowski
2019-07-02 12:16 ` Krzysztof Kozlowski
2019-07-02 13:04 ` Fabio Estevam
2019-07-02 13:10 ` Krzysztof Kozlowski
2019-07-02 14:18 ` Fabio Estevam
2019-07-04 2:10 ` Peng Ma [this message]
2019-07-04 12:06 ` [EXT] " Fabio Estevam
2019-07-05 2:02 ` Peng Ma
2019-07-04 12:57 ` Krzysztof Kozlowski
2019-07-05 2:04 ` Peng Ma
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=VI1PR04MB44316904F765E93CC1DFA0EDEDFA0@VI1PR04MB4431.eurprd04.prod.outlook.com \
--to=peng.ma@nxp.com \
--cc=andy.tang@nxp.com \
--cc=dmaengine@vger.kernel.org \
--cc=fabio.estevam@nxp.com \
--cc=k.kozlowski.k@gmail.com \
--cc=leoyang.li@nxp.com \
--cc=linux-kernel@vger.kernel.org \
--cc=vkoul@kernel.org \
/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;
as well as URLs for NNTP newsgroup(s).