mirror of
https://github.com/Telecominfraproject/OpenCellular.git
synced 2025-12-29 10:00:51 +00:00
stm32: fix data buffer increment bug in flash_physical_write
This fixes a small bug introduced in a previous refactoring CL where by the data buffer offset wasn't being incremented, thus causing writes to repeatedly write the first two bytes of the incoming data to each chunk of memory. BUG=chrome-os-partner:11097 TEST=successfully wrote and verified data on Snow Signed-off-by: David Hendricks <dhendrix@chromium.org> Change-Id: I8dae00652f4d74bc6ef449297b6e78b13b21255f Reviewed-on: https://gerrit.chromium.org/gerrit/26985 Reviewed-by: Katie Roberts-Hoffman <katierh@chromium.org> Reviewed-by: Simon Glass <sjg@chromium.org> Commit-Ready: David Hendricks <dhendrix@chromium.org> Reviewed-by: David Hendricks <dhendrix@chromium.org> Tested-by: David Hendricks <dhendrix@chromium.org>
This commit is contained in:
@@ -152,6 +152,7 @@ int flash_physical_write(int offset, int size, const char *data)
|
||||
|
||||
/* write the half word */
|
||||
*address++ = data[0] + (data[1] << 8);
|
||||
data += 2;
|
||||
|
||||
/* Wait for writes to complete */
|
||||
for (i = 0; (STM32_FLASH_SR & 1) && (i < FLASH_TIMEOUT_LOOP) ;
|
||||
|
||||
Reference in New Issue
Block a user