[PATCH 2/2] spi: fsl_qspi: Support to use full AHB space on i.MX
Frieder Schrempf
frieder.schrempf at kontron.de
Wed Nov 9 10:43:22 CET 2022
Hi,
On 09.06.20 09:59, Ye Li wrote:
> i.MX platforms provide large AHB mapped space for QSPI, each
> controller has 256MB. However, current driver only maps small
> size (AHB buffer size) of AHB space, this implementation
> causes i.MX failed to boot M4 with QSPI XIP image.
>
> Add config CONFIG_FSL_QSPI_AHB_FULL_MAP (default enabled for i.MX)
> to address above problem.
>
> When the config is set:
> 1. Full AHB space is divided to each CS.
> 2. A dedicated LUT entry is used for AHB read only.
> 3. The MODE instruction in LUT is replaced to standard ADDR instruction
> 4. The address in spi_mem_op is used to SFAR and AHB read
>
> Signed-off-by: Ye Li <ye.li at nxp.com>
> Reviewed-by: Ashish Kumar <Ashish.Kumar at nxp.com>
> Reviewed-by: Kuldeep Singh <kuldeep.singh at nxp.com>
I know I'm very late, but I seem to have missed this back in the days
when it was posted. Unfortunately there are some problems with this change.
1. The way the memory mapping of the attached flash (QSPI NOR?) is
implemented here is messy. In Linux we have a dirmap API for this kind
of things and it has recently been ported to U-Boot [1][2]. It would be
better to use this, similar to what was done here [3].
2. This change breaks reading from the SPI NAND flash used on the
Kontron SL i.MX6UL/ULL boards. The read operation returns garbage
instead of the actual data on the flash. When I revert this commit or set
# CONFIG_FSL_QSPI_AHB_FULL_MAP is not set
in the defconfig, it works.
Ye, can you come up with a solution for point 1 or if not can we change
the default of CONFIG_FSL_QSPI_AHB_FULL_MAP from enabled to disabled,
please?
For now I will disable CONFIG_FSL_QSPI_AHB_FULL_MAP in the boards
defconfig, but we should fix this globally.
What do you think?
Thanks
Frieder
[1]
https://source.denx.de/u-boot/u-boot/-/commit/f7e1de4c6a43beec438bce04571469145086efed
[2]
https://source.denx.de/u-boot/u-boot/-/commit/463cdf66632a0d67bf824cb43b6c1b41782d0765
[3]
https://source.denx.de/u-boot/u-boot/-/commit/992d02ea737895dc67246bbf7065084bb2721d6b
More information about the U-Boot
mailing list