mtd: spinand: Extend spinand_wait() to match Linux kernel implementation
authorMikhail Kshevetskiy <mikhail.kshevetskiy@iopsys.eu>
Tue, 30 Sep 2025 00:20:50 +0000 (03:20 +0300)
committerMichael Trimarchi <michael@amarulasolutions.com>
Sun, 5 Oct 2025 18:25:51 +0000 (20:25 +0200)
commit64b7865c72b8b3bc3c08e095888d6c7dce7c7c27
tree58907c7622d6af83c0f4a954ec0cd46ddce48043
parentbae27e402d050154ebb8e677d409f49376cc985a
mtd: spinand: Extend spinand_wait() to match Linux kernel implementation

This aligns spinand_wait() with the linux kernel. Instead of calling into
spi_mem_poll_status() which is not implemented in U-Boot, we code the
polling logic and make sure that schedule() is called periodically.

Signed-off-by: Mikhail Kshevetskiy <mikhail.kshevetskiy@iopsys.eu>
Reviewed-by: Frieder Schrempf <frieder.schrempf@kontron.de>
Signed-off-by: Michael Trimarchi <michael@amarulasolutions.com>
drivers/mtd/nand/spi/core.c
include/linux/mtd/spinand.h