Edward O'Callaghan submitted this change.

View Change



1 is the latest approved patch-set.
No files were changed between the latest approved patch-set and the submitted one.

Approvals: build bot (Jenkins): Verified Stefan Reinauer: Looks good to me, approved
jedec.c: Collapse erase_sector_jedec() indirection

Change-Id: I9cc9e8c88c0442dc2602bbb2de2073113e9c484b
Signed-off-by: Edward O'Callaghan <quasisec@google.com>
Reviewed-on: https://review.coreboot.org/c/flashrom/+/72500
Reviewed-by: Stefan Reinauer <stefan.reinauer@coreboot.org>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
---
M jedec.c
1 file changed, 15 insertions(+), 9 deletions(-)

diff --git a/jedec.c b/jedec.c
index d3665b8..20f2ff3 100644
--- a/jedec.c
+++ b/jedec.c
@@ -281,11 +281,11 @@
return 1;
}

-static int erase_sector_jedec_common(struct flashctx *flash, unsigned int page,
- unsigned int pagesize, unsigned int mask)
+int erase_sector_jedec(struct flashctx *flash, unsigned int page, unsigned int size)
{
chipaddr bios = flash->virtual_memory;
bool shifted = (flash->chip->feature_bits & FEATURE_ADDR_SHIFTED);
+ const unsigned int mask = getaddrmask(flash->chip);
unsigned int delay_us = 0;

if(flash->chip->probe_timing != TIMING_ZERO)
@@ -529,13 +529,6 @@
return probe_jedec_common(flash, mask);
}

-int erase_sector_jedec(struct flashctx *flash, unsigned int page,
- unsigned int size)
-{
- const unsigned int mask = getaddrmask(flash->chip);
- return erase_sector_jedec_common(flash, page, size, mask);
-}
-
int erase_block_jedec(struct flashctx *flash, unsigned int page,
unsigned int size)
{

To view, visit change 72500. To unsubscribe, or for help writing mail filters, visit settings.

Gerrit-Project: flashrom
Gerrit-Branch: master
Gerrit-Change-Id: I9cc9e8c88c0442dc2602bbb2de2073113e9c484b
Gerrit-Change-Number: 72500
Gerrit-PatchSet: 3
Gerrit-Owner: Edward O'Callaghan <quasisec@chromium.org>
Gerrit-Reviewer: Edward O'Callaghan <quasisec@chromium.org>
Gerrit-Reviewer: Stefan Reinauer <stefan.reinauer@coreboot.org>
Gerrit-Reviewer: build bot (Jenkins) <no-reply@coreboot.org>
Gerrit-MessageType: merged