aboutsummaryrefslogtreecommitdiff
path: root/drivers/ddr/imx/imx8m
diff options
context:
space:
mode:
authorMarek Vasut <marex@denx.de>2022-09-28 18:45:04 +0200
committerJagan Teki <jagan@edgeble.ai>2022-10-25 10:17:33 +0530
commit622b5d356136f9172db7fe7ba240cd9e45097a19 (patch)
treea3ec1cec885e4c84d27efb7e2ec9cb33b5087704 /drivers/ddr/imx/imx8m
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 <marex@denx.de> Reviewed-by: Jagan Teki <jagan@amarulasolutions.com>
Diffstat (limited to 'drivers/ddr/imx/imx8m')
0 files changed, 0 insertions, 0 deletions