diff mbox

spi: imx: Revert "spi: imx: dynamic burst length adjust for PIO mode"

Message ID 591ECF3B.4040001@mentor.com (mailing list archive)
State New, archived
Headers show

Commit Message

Wang, Jiada May 19, 2017, 10:55 a.m. UTC
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

  }
@@ -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@mentor.com>  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@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Comments

Fabio Estevam May 19, 2017, 3:19 p.m. UTC | #1
On Fri, May 19, 2017 at 7:55 AM, Jiada Wang <jiada_wang@mentor.com> wrote:
> 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

This fixes the SPI NOR detection, thanks:

Tested-by: Fabio Estevam <fabio.estevam@nxp.com>
--
To unsubscribe from this list: send the line "unsubscribe linux-spi" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Mark Brown May 19, 2017, 4:30 p.m. UTC | #2
On Fri, May 19, 2017 at 12:19:42PM -0300, Fabio Estevam wrote:
> On Fri, May 19, 2017 at 7:55 AM, Jiada Wang <jiada_wang@mentor.com> wrote:

> > could you help to check if the following change address the spi-nor

> This fixes the SPI NOR detection, thanks:

> Tested-by: Fabio Estevam <fabio.estevam@nxp.com>

Jiada can you send that as a proper submission please (I need a
changelog and signoffs)?
diff mbox

Patch

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;