From ae648cc520474359ec0bc3c84e8da6e255e16ccf Mon Sep 17 00:00:00 2001 From: David Hendricks Date: Mon, 9 Jul 2012 16:41:31 -0700 Subject: [PATCH] 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 Change-Id: I8dae00652f4d74bc6ef449297b6e78b13b21255f Reviewed-on: https://gerrit.chromium.org/gerrit/26985 Reviewed-by: Katie Roberts-Hoffman Reviewed-by: Simon Glass Commit-Ready: David Hendricks Reviewed-by: David Hendricks Tested-by: David Hendricks --- chip/stm32/flash-stm32f100.c | 1 + 1 file changed, 1 insertion(+) diff --git a/chip/stm32/flash-stm32f100.c b/chip/stm32/flash-stm32f100.c index abb9cfb9a9..670f715946 100644 --- a/chip/stm32/flash-stm32f100.c +++ b/chip/stm32/flash-stm32f100.c @@ -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) ;