[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH] hw/ssi: imx_spi: Improve chip select handling
From: |
Bin Meng |
Subject: |
Re: [PATCH] hw/ssi: imx_spi: Improve chip select handling |
Date: |
Sun, 26 Sep 2021 10:49:53 +0800 |
On Sat, Sep 18, 2021 at 12:19 PM Guenter Roeck <linux@roeck-us.net> wrote:
>
> On 9/17/21 8:09 PM, Cheng, Xuzhou wrote:
> >>> I got some free time in the past days to investigate this issue. Guenter
> >>> is right, the Linux imx-spi driver does not work on QEMU.
> >>>
> >>> The reason is that the state of m25p80 machine loops in
> >>> STATE_READING_DATA state after receiving RDSR command, the new command is
> >>> ignored. Before sending a new command, the CS line should be pulled to
> >>> high, this make the state of m25p80 back to IDLE.
> >>>
> >>> I have same point with Guenter, it's that set CS to 1 when burst is zero.
> >>> But i don't think it is necessary to set CS to 0 in
> >>> imx_spi_flush_txfifo(). I will send a new patch to fix this issue.
> >>>
> >>
> >> Thanks a lot for looking into this. If you have a better solution than
> >> mine, by all means, please go for it. As I mentioned in my patch, I didn't
> >> really like it, but I was unable to find a better solution.
> > I am doing some experiment to verify that the new patch is reasonable, so
> > the new patch will be delayed few days.
> >
>
> No problem. Note that I'll be traveling for the next 2-3 weeks, and I won't
> be able
> to test any patches during that time.
>
I have some updates to share, as I have been working with Xuzhou
internally on this issue for the past days:
Current mods using BURST_LEN to determine the timing to pull up the CS
line in the SPI controller codes is a workaround. Hardware does not do
this. To understand what real hardware behavior is, Xuzhou used an
oscilloscope to verify our guess.
It turns out the root cause is elsewhere, and a proper fix will be
sent out soon.
Regards,
Bin
- Re: [PATCH] hw/ssi: imx_spi: Improve chip select handling, (continued)
- Re: [PATCH] hw/ssi: imx_spi: Improve chip select handling, Philippe Mathieu-Daudé, 2021/09/04
- Re: [PATCH] hw/ssi: imx_spi: Improve chip select handling, Guenter Roeck, 2021/09/04
- Re: [PATCH] hw/ssi: imx_spi: Improve chip select handling, Bin Meng, 2021/09/08
- Re: [PATCH] hw/ssi: imx_spi: Improve chip select handling, Bin Meng, 2021/09/08
- RE: [PATCH] hw/ssi: imx_spi: Improve chip select handling, Cheng, Xuzhou, 2021/09/08
- Re: [PATCH] hw/ssi: imx_spi: Improve chip select handling, Guenter Roeck, 2021/09/08
- RE: [PATCH] hw/ssi: imx_spi: Improve chip select handling, Cheng, Xuzhou, 2021/09/16
- Re: [PATCH] hw/ssi: imx_spi: Improve chip select handling, Guenter Roeck, 2021/09/16
- RE: [PATCH] hw/ssi: imx_spi: Improve chip select handling, Cheng, Xuzhou, 2021/09/17
- Re: [PATCH] hw/ssi: imx_spi: Improve chip select handling, Guenter Roeck, 2021/09/18
- Re: [PATCH] hw/ssi: imx_spi: Improve chip select handling,
Bin Meng <=
- Re: [PATCH] hw/ssi: imx_spi: Improve chip select handling, Guenter Roeck, 2021/09/04