mirror of
https://review.coreboot.org/flashrom.git
synced 2025-07-02 14:33:18 +02:00
Introduce additional SPI status register helpers
- spi_prettyprint_status_register_default_welwip(): It just prettyprints the plain hex value and the welwip bits. - spi_prettyprint_status_register_default_bp4(): Prints the hex value, welwip, bp0-5 and srwd bits. - spi_disable_blockprotect_bp2_srwd(), - spi_disable_blockprotect_bp3_srwd() and spi_disable_blockprotect_bp4_srwd(): Three new common block unprotection functions for the frequent cases where there is a status register lock bit at bit #7 and some block protection bits at bits #2-#4, #2-#5 and #2-#6 respectively. Corresponding to flashrom svn r1681. Signed-off-by: Stefan Tauner <stefan.tauner@alumni.tuwien.ac.at> Acked-by: Stefan Tauner <stefan.tauner@alumni.tuwien.ac.at>
This commit is contained in:
@ -1849,7 +1849,8 @@ const struct flashchip flashchips[] = {
|
||||
}
|
||||
},
|
||||
.printlock = spi_prettyprint_status_register_at25f4096,
|
||||
.unlock = spi_disable_blockprotect_at25f4096,
|
||||
/* "Bits 5-6 are 0s when device is not in an internal write cycle." Better leave them alone: */
|
||||
.unlock = spi_disable_blockprotect_bp2_srwd,
|
||||
.write = spi_chip_write_256,
|
||||
.read = spi_chip_read,
|
||||
.voltage = {2700, 3600},
|
||||
@ -4473,7 +4474,8 @@ const struct flashchip flashchips[] = {
|
||||
.block_erase = spi_block_erase_c7,
|
||||
}
|
||||
},
|
||||
.printlock = spi_prettyprint_status_register_plain, /* TODO: improve */
|
||||
.printlock = spi_prettyprint_status_register_default_bp4,
|
||||
.unlock = spi_disable_blockprotect_bp4_srwd, /* TODO: 2nd status reg (read with 0x35) */
|
||||
.unlock = spi_disable_blockprotect,
|
||||
.write = spi_chip_write_256,
|
||||
.read = spi_chip_read,
|
||||
|
Reference in New Issue
Block a user