From: Jiada Wang <jiada_wang-nmGgyN9QBj3QT0dZR+AlfA@public.gmane.org>
To: Fabio Estevam <festevam-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
Cc: Leonard Crestez <leonard.crestez-3arQi8VN3Tc@public.gmane.org>,
Fabio Estevam <fabio.estevam-3arQi8VN3Tc@public.gmane.org>,
"linux-spi-u79uwXL29TY76Z2rM5mHXA@public.gmane.org"
<linux-spi-u79uwXL29TY76Z2rM5mHXA@public.gmane.org>,
Mark Brown <broonie-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org>
Subject: Re: [PATCH] spi: imx: Revert "spi: imx: dynamic burst length adjust for PIO mode"
Date: Fri, 19 May 2017 03:55:55 -0700 [thread overview]
Message-ID: <591ECF3B.4040001@mentor.com> (raw)
In-Reply-To: <CAOMZO5BZvp_iWoJCTkZL-buSu6pscv1U-6XLjjEm8PjVOjf9wQ-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
Hello Fabio
Although I don't have this spi-nor chip populated on my sabresd,
but I think I managed to re-create similar scenario,
could you help to check if the following change address the spi-nor
detection issue
diff --git a/drivers/spi/spi-imx.c b/drivers/spi/spi-imx.c
index 782045f..a097a8d 100644
--- a/drivers/spi/spi-imx.c
+++ b/drivers/spi/spi-imx.c
@@ -242,6 +242,7 @@ static bool spi_imx_can_dma(struct spi_master
*master, struct spi_device *spi,
return false;
spi_imx->wml = i;
+ spi_imx->dynamic_burst = 0;
return true;
}
@@ -288,6 +289,9 @@ static void spi_imx_u32_swap_u8(struct spi_transfer
*transfer, u32 *buf)
{
int i;
+ if (!buf)
+ return;
+
for (i = 0; i < transfer->len / 4; i++)
*(buf + i) = cpu_to_be32(*(buf + i));
}
@@ -296,6 +300,9 @@ static void spi_imx_u32_swap_u16(struct spi_transfer
*transfer, u32 *buf)
{
int i;
+ if (!buf)
+ return;
+
for (i = 0; i < transfer->len / 4; i++) {
Thanks,
Jiada
On 05/18/2017 08:41 AM, Fabio Estevam wrote:
> Hi Jiada,
>
> On Thu, May 18, 2017 at 12:37 PM, Jiada Wang<jiada_wang-nmGgyN9QBj3QT0dZR+AlfA@public.gmane.org> wrote:
>
>> Which kernel and HW version are you using for test?
> I am running linux-next 20170518 on a imx6q sabresd revB board.
>
>> with the test on my imx6q sabresd board,
>> no matter using upstream kernel or our internal kernel,
>> the issue exists with or without the patch.
> There are some imx6q sabresd boards that does not come with the SPI
> NOR flash populated.
>
> I assume your board does not have the SPI NOR populated, so that's why
> you always get the same message.
>
> Reverting 8d4a6cad7adb ("spi: imx: dynamic burst length adjust for PIO
> mode") makes the SPI NOR to work again here.
--
To unsubscribe from this list: send the line "unsubscribe linux-spi" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
next prev parent reply other threads:[~2017-05-19 10:55 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-05-18 13:22 [PATCH] spi: imx: Revert "spi: imx: dynamic burst length adjust for PIO mode" Fabio Estevam
[not found] ` <1495113735-11891-1-git-send-email-fabio.estevam-3arQi8VN3Tc@public.gmane.org>
2017-05-18 13:59 ` Leonard Crestez
[not found] ` <1495115958.26925.23.camel-3arQi8VN3Tc@public.gmane.org>
2017-05-18 14:22 ` Fabio Estevam
[not found] ` <CAOMZO5Adj+sgxgoO9gN232EEH=NtjTHpKfB+EaUAbRXyaPD_Gg-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2017-05-18 15:37 ` Jiada Wang
[not found] ` <591DBFD2.4090601-nmGgyN9QBj3QT0dZR+AlfA@public.gmane.org>
2017-05-18 15:41 ` Fabio Estevam
[not found] ` <CAOMZO5BZvp_iWoJCTkZL-buSu6pscv1U-6XLjjEm8PjVOjf9wQ-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2017-05-19 10:55 ` Jiada Wang [this message]
[not found] ` <591ECF3B.4040001-nmGgyN9QBj3QT0dZR+AlfA@public.gmane.org>
2017-05-19 15:19 ` Fabio Estevam
2017-05-19 16:30 ` Mark Brown
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=591ECF3B.4040001@mentor.com \
--to=jiada_wang-nmggyn9qbj3qt0dzr+alfa@public.gmane.org \
--cc=broonie-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org \
--cc=fabio.estevam-3arQi8VN3Tc@public.gmane.org \
--cc=festevam-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org \
--cc=leonard.crestez-3arQi8VN3Tc@public.gmane.org \
--cc=linux-spi-u79uwXL29TY76Z2rM5mHXA@public.gmane.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.