diff options
author | Boris Brezillon <boris.brezillon@bootlin.com> | 2018-12-06 11:37:35 +0100 |
---|---|---|
committer | Boris Brezillon <boris.brezillon@bootlin.com> | 2018-12-10 21:59:07 +0100 |
commit | 2aaa5f7e0c07a0f14e514ed3b343d66a31dfb300 (patch) | |
tree | ee19535dced00bd86b546e92edd2fd3bc15e41e2 /drivers/mtd/ubi/wl.h | |
parent | 548ed6847f5303e4f33ecd6de5670cac15bfe6ac (diff) | |
download | linux-2aaa5f7e0c07a0f14e514ed3b343d66a31dfb300.tar.gz linux-2aaa5f7e0c07a0f14e514ed3b343d66a31dfb300.tar.bz2 linux-2aaa5f7e0c07a0f14e514ed3b343d66a31dfb300.zip |
mtd: spi-nor: Add a post BFPT parsing fixup hook
Experience has proven that SFDP tables are sometimes wrong, and parsing
of these broken tables can lead to erroneous flash config.
This leaves us 2 options:
1/ set the SPI_NOR_SKIP_SFDP flag and completely ignore SFDP parsing
2/ fix things at runtime
While #1 should always work, it might imply extra work if most of the
SFDP is correct. #2 has the benefit of keeping the generic SFDP parsing
logic almost untouched while allowing SPI NOR manufacturer drivers to
fix the broken bits.
Add a spi_nor_fixups struct where we'll put all our fixup hooks, each
of them being called at a different point in the scan process.
We start a hook called just after the BFPT parsing to allow fixing up
info extracted from the BFPT section. More hooks will be added if other
sections need to be fixed.
Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com>
Reviewed-by: Tudor Ambarus <tudor.ambarus@microchip.com>
Diffstat (limited to 'drivers/mtd/ubi/wl.h')
0 files changed, 0 insertions, 0 deletions