[EXT] Re: [Patch v2] spi: nxp-fspi: Add 1us delay to make controller ready for next transaction
Kuldeep Singh
kuldeep.singh at nxp.com
Tue Apr 21 11:26:51 CEST 2020
> -----Original Message-----
> From: Jagan Teki <jagan at amarulasolutions.com>
> Sent: Tuesday, April 21, 2020 1:45 PM
> To: Kuldeep Singh <kuldeep.singh at nxp.com>
> Cc: U-Boot-Denx <u-boot at lists.denx.de>
> Subject: [EXT] Re: [Patch v2] spi: nxp-fspi: Add 1us delay to make controller
> ready for next transaction
>
> Caution: EXT Email
>
> On Tue, Apr 21, 2020 at 11:57 AM Kuldeep Singh <mailto:kuldeep.singh at nxp.com>
> wrote:
> >
> > Board gets reset when performing burst read/write operations. On the
> > other hand, no such behaviour is observed on small size operations.
> >
> > In Linux, readl_poll_timeout API already add delay of 1us which is
> > skipped in U-boot. Since, NXP Flexspi U-boot driver is a ported
> > version of Linux driver and U-boot poll_timeout API lacks delay
> > functionality, add 1us delay so as to make controller ready for other
> transactions.
>
> Can you link me, where does Linux add this delay?
Please see[1] for Linux nxp flexspi driver code.
fspi_readl_poll_tout, line: 795
If you see implementation of " fspi_readl_poll_tout ", it further calls "readl_poll_timeout" which includes delay of 1us.
And also please see the difference of "readl_poll_timeout" api implementation in uboot and Linux.
This api adds delay in Linux but skips it in uboot.
Thanks
Kuldeep
[1] https://elixir.bootlin.com/linux/latest/source/drivers/spi/spi-nxp-fspi.c
More information about the U-Boot
mailing list