[U-Boot] Regressions in MTD / SPI FLASH

Vignesh Raghavendra vigneshr at ti.com
Fri Sep 6 07:36:36 UTC 2019


Hi,

On 04/09/19 11:37 PM, Eugeniy Paltsev wrote:
> We faced with regressions caused by
> commit c4e8862308d4 (mtd: spi: Switch to new SPI NOR framework)
> This switch was performed by removing entire u-boot spi-flash
> core implementation and copying it from another project.
> However the switch is performed without proper testing and 
> investigations about fixes/improvements were made in u-boot
> spi-flash core. This results in regressions.
> 

Apologies for the trouble...
As stated in cover letter, this change was necessary as U-Boot SPI flash
stack at that time did not features such as 4 byte addressing, SFDP
parsing, SPI controllers with MMIO interfaces etc. Also there was need
to move to SPI MEM framework to support both SPI NAND and SPI NOR
flashes using a single SPI controller drivers.
I have to disagree on the part that there was no proper testing... As
evident from mailing list archives, patch series was reviewed by
multiple reviewers and tested on their platforms as well...
Unfortunately its impossible to get all boards owners to test it.

> One of regression we faced with is related to SST26 flash series which
> is used on HSDK board. The cause is that SST26 protection ops
> implementation was dropped. The fix of this regression is send
> as a patch in this series.
> 

I retained most U-Boot specific code as is (like support for BANK
address registers, restriction in transfer sizes) but I somehow
overlooked this part. Sorry for that

> However there are another regressions. I.E: we also faced with broken
> SPI flash on another SNPS boards - AXS101 and AXS103. They use different
> flash IC (n25q512ax3) and I didn't investigate the cause yet.
> 

Could you provide more details here:
What exactly fails? Is the detected correctly? Does reads work fine? Is
Erase or Write broken?

Could you enable debug prints in your driver as well as debug prints in
spi_mem_exec_op() (in drivers/spi/spi-mem.c) and post the logs?

Regards
Vignesh

> I can also expect regressions among other u-boot users
> and I believe that subsystem changes mustn't be done such harmful way.
> 
> Eugeniy Paltsev (1):
>   MTD: SPI: revert removing SST26* flash IC protection ops
> 
>  drivers/mtd/spi/sf_internal.h  |   1 +
>  drivers/mtd/spi/spi-nor-core.c | 181 +++++++++++++++++++++++++++++++++
>  drivers/mtd/spi/spi-nor-ids.c  |   8 +-
>  include/linux/mtd/spi-nor.h    |   4 +
>  4 files changed, 190 insertions(+), 4 deletions(-)
> 


More information about the U-Boot mailing list