forked from flashrom/flashrom
-
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
spi25.c: Rename spi_get_erasefn_from_opcode to spi25_get_erasefn_from…
…_opcode This function works only with spi25 chips Change-Id: Ie054160b0fdd34bcb128285c6a047e3a3fa8be0c Signed-off-by: Thomas Heijligen <[email protected]> Reviewed-on: https://review.coreboot.org/c/flashrom/+/67716 Reviewed-by: Thomas Heijligen <[email protected]> Reviewed-by: Edward O'Callaghan <[email protected]> Tested-by: build bot (Jenkins) <[email protected]>
- Loading branch information
Showing
3 changed files
with
7 additions
and
7 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -621,7 +621,7 @@ int spi_block_erase_dc(struct flashctx *flash, unsigned int addr, unsigned int b | |
static const struct { | ||
enum block_erase_func func; | ||
uint8_t opcode; | ||
} function_opcode_list[] = { | ||
} spi25_function_opcode_list[] = { | ||
{SPI_BLOCK_ERASE_20, 0x20}, | ||
{SPI_BLOCK_ERASE_21, 0x21}, | ||
{SPI_BLOCK_ERASE_50, 0x50}, | ||
|
@@ -639,12 +639,12 @@ static const struct { | |
{SPI_BLOCK_ERASE_DC, 0xdc}, | ||
}; | ||
|
||
enum block_erase_func spi_get_erasefn_from_opcode(uint8_t opcode) | ||
enum block_erase_func spi25_get_erasefn_from_opcode(uint8_t opcode) | ||
{ | ||
size_t i; | ||
for (i = 0; i < ARRAY_SIZE(function_opcode_list); i++) { | ||
if (function_opcode_list[i].opcode == opcode) | ||
return function_opcode_list[i].func; | ||
for (i = 0; i < ARRAY_SIZE(spi25_function_opcode_list); i++) { | ||
if (spi25_function_opcode_list[i].opcode == opcode) | ||
return spi25_function_opcode_list[i].func; | ||
} | ||
msg_cinfo("%s: unknown erase opcode (0x%02x). Please report " | ||
"this at [email protected]\n", __func__, opcode); | ||
|