mtd: spi: Replace ad-hoc default implementation with spi_mem_op
Replace the ad-hoc erase operation implementation with a simple spi_mem_op
implementation of the same functionality. This is a minor optimization and
removal of the ad-hoc code.
This however also changes the behavior of the execution of the erase
opcode from two separate transfer requests to the SPI NOR driver to
one transfer request to the SPI NOR driver. The former was how U-Boot
behaved before the SPI NOR framework was imported and the later was
introduced by the SPI NOR framework. The former is more optimal, so
keep that.
Signed-off-by: Marek Vasut <[email protected]>
Cc: Horatiu Vultur <[email protected]>
Cc: Jagan Teki <[email protected]>
Cc: Simon Goldschmidt <[email protected]>
Cc: Stefan Roese <[email protected]>
Cc: Vignesh R <[email protected]>
Tested-by: Ashish Kumar <[email protected]>