mtd: spi-nor: Allow post_sfdp hook to return errors
authorTudor Ambarus <tudor.ambarus@linaro.org>
Fri, 7 Apr 2023 06:40:58 +0000 (15:40 +0900)
committerTudor Ambarus <tudor.ambarus@linaro.org>
Sat, 8 Apr 2023 06:30:17 +0000 (09:30 +0300)
commite570f7872a34dc290014c80c7bad365d6577836b
tree60a17aa72e72abb7d89eabc2eb629095d02639f7
parent120c94a67b26e4014597fc9f872803621e7a2514
mtd: spi-nor: Allow post_sfdp hook to return errors

Multi die flashes like s25hl02gt need to determine the page_size at
run-time by querying a configuration register for each die. Since the
number of dice is determined in an optional SFDP table, SCCR MC, the
page size configuration must be done in the post_sfdp hook. Allow
post_sfdp to return errors, as reading the configuration register might
return errors.

Link: https://lore.kernel.org/r/924ab710f128448ec62537cfbb377336e390043c.1680849425.git.Takahiro.Kuwano@infineon.com
Signed-off-by: Tudor Ambarus <tudor.ambarus@linaro.org>
drivers/mtd/spi-nor/core.h
drivers/mtd/spi-nor/micron-st.c
drivers/mtd/spi-nor/sfdp.c
drivers/mtd/spi-nor/spansion.c