Skip to content

Commit b9251e2

Browse files
committed
Revert "[nrf fromlist] susbys/dfu/img_util: support ERASE PROGRESSIVELY for non-flash mem"
This reverts commit 30f066a.
1 parent b10af16 commit b9251e2

File tree

1 file changed

+3
-21
lines changed

1 file changed

+3
-21
lines changed

subsys/dfu/img_util/flash_img.c

Lines changed: 3 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -56,27 +56,9 @@ int flash_img_buffered_write(struct flash_img_context *ctx, const uint8_t *data,
5656
#ifdef CONFIG_IMG_ERASE_PROGRESSIVELY
5757
ssize_t status_offset = boot_get_trailer_status_offset(
5858
ctx->flash_area->fa_size);
59-
60-
#ifdef CONFIG_STREAM_FLASH_ERASE
61-
const struct flash_parameters *fparams =
62-
flash_get_parameters(flash_area_get_device(ctx->flash_area));
63-
64-
if ((flash_params_get_erase_cap(fparams) & FLASH_ERASE_C_EXPLICIT)) {
65-
/* use pistine-page-erase procedure for a device which needs it */
66-
rc = stream_flash_erase_page(&ctx->stream,
67-
ctx->flash_area->fa_off +
68-
status_offset);
69-
} else
70-
#endif
71-
{
72-
if (status_offset > stream_flash_bytes_written(&ctx->stream)) {
73-
rc = flash_area_flatten(ctx->flash_area, status_offset,
74-
ctx->flash_area->fa_off - status_offset);
75-
} else {
76-
rc = 0;
77-
}
78-
}
79-
59+
rc = stream_flash_erase_page(&ctx->stream,
60+
ctx->flash_area->fa_off +
61+
status_offset);
8062
if (rc) {
8163
return rc;
8264
}

0 commit comments

Comments
 (0)