mirror of
https://review.coreboot.org/flashrom.git
synced 2025-04-27 15:12:36 +02:00
jedec.c: Collapse probe_jedec() indirection
Change-Id: I57c27bcf25c5d9ce10fb9c74d9be6ab3544ac7ba Signed-off-by: Edward O'Callaghan <quasisec@google.com> Reviewed-on: https://review.coreboot.org/c/flashrom/+/72504 Reviewed-by: Stefan Reinauer <stefan.reinauer@coreboot.org> Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
This commit is contained in:
parent
d0fbe5344a
commit
7378557e54
13
jedec.c
13
jedec.c
@ -165,11 +165,12 @@ int probe_jedec_29gl(struct flashctx *flash)
|
|||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
static int probe_jedec_common(struct flashctx *flash, unsigned int mask)
|
int probe_jedec(struct flashctx *flash)
|
||||||
{
|
{
|
||||||
chipaddr bios = flash->virtual_memory;
|
const chipaddr bios = flash->virtual_memory;
|
||||||
const struct flashchip *chip = flash->chip;
|
const struct flashchip *chip = flash->chip;
|
||||||
bool shifted = (flash->chip->feature_bits & FEATURE_ADDR_SHIFTED);
|
const bool shifted = (flash->chip->feature_bits & FEATURE_ADDR_SHIFTED);
|
||||||
|
const unsigned int mask = getaddrmask(flash->chip);
|
||||||
uint8_t id1, id2;
|
uint8_t id1, id2;
|
||||||
uint32_t largeid1, largeid2;
|
uint32_t largeid1, largeid2;
|
||||||
uint32_t flashcontent1, flashcontent2;
|
uint32_t flashcontent1, flashcontent2;
|
||||||
@ -518,12 +519,6 @@ int write_jedec(struct flashctx *flash, const uint8_t *buf, unsigned int start,
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
int probe_jedec(struct flashctx *flash)
|
|
||||||
{
|
|
||||||
const unsigned int mask = getaddrmask(flash->chip);
|
|
||||||
return probe_jedec_common(flash, mask);
|
|
||||||
}
|
|
||||||
|
|
||||||
struct unlockblock {
|
struct unlockblock {
|
||||||
unsigned int size;
|
unsigned int size;
|
||||||
unsigned int count;
|
unsigned int count;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user