summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJack Rosenthal <jrosenth@chromium.org>2022-06-27 14:18:03 -0600
committerChromeos LUCI <chromeos-scoped@luci-project-accounts.iam.gserviceaccount.com>2022-07-01 07:52:06 +0000
commit922d51a6dbde3d4e7eb3f8359df11fecf3f7489e (patch)
treeae002f4ebc37cddd9ac086188b362852832c9ae2
parent22ef41d4e34bb6044e0b3c5c9af607cd0476d539 (diff)
downloadchrome-ec-922d51a6dbde3d4e7eb3f8359df11fecf3f7489e.tar.gz
chip/max32660/flash_chip.c: Format with clang-format
BUG=b:236386294 BRANCH=none TEST=none Change-Id: Ief6b204e4fb74f5528cf5b1ff57a561af49436ee Signed-off-by: Jack Rosenthal <jrosenth@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3729229 Reviewed-by: Jeremy Bettis <jbettis@chromium.org>
-rw-r--r--chip/max32660/flash_chip.c12
1 files changed, 5 insertions, 7 deletions
diff --git a/chip/max32660/flash_chip.c b/chip/max32660/flash_chip.c
index 747d7dcc58..29d2f35489 100644
--- a/chip/max32660/flash_chip.c
+++ b/chip/max32660/flash_chip.c
@@ -25,7 +25,7 @@
#define MXC_FLASH_PAGE_MASK ~(MXC_FLASH_PAGE_SIZE - 1)
/// Calculate the address of a page in flash from the page number
-#define MXC_FLASH_PAGE_ADDR(page) \
+#define MXC_FLASH_PAGE_ADDR(page) \
(MXC_FLASH_MEM_BASE + ((unsigned long)page * MXC_FLASH_PAGE_SIZE))
void flash_operation(void)
@@ -123,7 +123,6 @@ int crec_flash_physical_write(int offset, int size, const char *data)
// Align the address and read/write if we have to
if (offset & 0x3) {
-
// Figure out how many bytes we have to write to round up the
// address
bytes_written = 4 - (offset & 0x3);
@@ -163,7 +162,6 @@ int crec_flash_physical_write(int offset, int size, const char *data)
}
if (size >= 16) {
-
// write in 128-bit bursts while we can
MXC_FLC->cn &= ~MXC_F_FLC_CN_WDTH;
@@ -330,8 +328,8 @@ static int command_flash_test1(int argc, char **argv)
/*
* erase page
*/
- error_status = crec_flash_physical_erase(flash_address,
- CONFIG_FLASH_ERASE_SIZE);
+ error_status = crec_flash_physical_erase(
+ flash_address, CONFIG_FLASH_ERASE_SIZE);
if (error_status != EC_SUCCESS) {
CPRINTS("Error with crec_flash_physical_erase\n");
return EC_ERROR_UNKNOWN;
@@ -389,8 +387,8 @@ static int command_flash_test1(int argc, char **argv)
*/
for (page = PAGE_START; page <= PAGE_END; page++) {
flash_address = page * CONFIG_FLASH_ERASE_SIZE;
- error_status = crec_flash_physical_erase(flash_address,
- CONFIG_FLASH_ERASE_SIZE);
+ error_status = crec_flash_physical_erase(
+ flash_address, CONFIG_FLASH_ERASE_SIZE);
if (error_status != EC_SUCCESS) {
CPRINTS("Error with crec_flash_physical_erase\n");
return EC_ERROR_UNKNOWN;