summaryrefslogtreecommitdiff
path: root/include/linux
diff options
context:
space:
mode:
authorTakahiro Kuwano <Takahiro.Kuwano@infineon.com>2021-06-25 22:17:27 +0300
committerJagan Teki <jagan@amarulasolutions.com>2021-06-28 09:36:07 +0300
commitee52b0b764d3eaa69f20f7e142945d56fe3f6fdb (patch)
treee61be487cd84cfab3f5e941c6519febabfe498ee /include/linux
parentaba0bcd7bda494d7fe9c82e581db9791ce41e2f3 (diff)
downloadu-boot-ee52b0b764d3eaa69f20f7e142945d56fe3f6fdb.tar.xz
mtd: spi-nor-core: Add non-uniform erase for Spansion/Cypress
Some of Spansion/Cypress chips have overlaid 4KB sectors at top and/or bottom, depending on the device configuration, while U-Boot supports uniform sector layout only. The spansion_erase_non_uniform() erases overlaid 4KB sectors, non-overlaid portion of normal sector, and remaining normal sectors, by selecting correct erase command and size based on the address to erase and size of overlaid portion in parameters. Since different Spansion flashes can use different opcode for erasing the 4K sectors, the opcode must be passed in as a parameter based on the flash being used. Signed-off-by: Takahiro Kuwano <Takahiro.Kuwano@infineon.com> Signed-off-by: Pratyush Yadav <p.yadav@ti.com> [p.yadav@ti.com: Refactor the function to be compatible with nor->erase, make 4K opcode customizable, call spi_nor_setup_op() before executing the op.] Acked-by: Jagan Teki <jagan@amarulasolutions.com>
Diffstat (limited to 'include/linux')
0 files changed, 0 insertions, 0 deletions