summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorMarek Vasut <[email protected]>2022-09-28 18:45:04 +0200
committerJagan Teki <[email protected]>2022-10-25 10:17:33 +0530
commit622b5d356136f9172db7fe7ba240cd9e45097a19 (patch)
treea3ec1cec885e4c84d27efb7e2ec9cb33b5087704 /include
parente28d3ead7258ce1deb87003d0064b16ec50abc81 (diff)
cmd: sf: Handle unaligned 'update' start offset
Currently the 'sf update' command fails in case the 'start' offset is not aligned to SPI NOR erase block size. Add the missing alignment calculation. In case the start offset is in the middle of erase block, round start address down to the nearest aligned one, compare only the updated data between what is in the SPI NOR and what is being written, copy new data at offset of the compare buffer, and write back the entire erase block. This is useful e.g. on i.MX6Q where the u-boot-with-spl.imx is at offset 0x400 in the SPI NOR, while the SPI NOR may have erase block size e.g. 0x1000 bytes. Signed-off-by: Marek Vasut <[email protected]> Reviewed-by: Jagan Teki <[email protected]>
Diffstat (limited to 'include')
0 files changed, 0 insertions, 0 deletions