mirror of
https://review.coreboot.org/flashrom.git
synced 2025-07-02 14:33:18 +02:00
Make struct flashchip a field in struct flashctx instead of a complete copy
All the driver conversion work and cleanup has been done by Stefan. flashrom.c and cli_classic.c are a joint work of Stefan and Carl-Daniel. Corresponding to flashrom svn r1579. Signed-off-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net> Signed-off-by: Stefan Tauner <stefan.tauner@alumni.tuwien.ac.at> Acked-by: Stefan Tauner <stefan.tauner@alumni.tuwien.ac.at> Acked-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>
This commit is contained in:
@ -54,7 +54,7 @@ static int unlock_block_stm50flw0x0x(struct flashctx *flash, int offset)
|
||||
/* Check, if it's is a top/bottom-block with 4k-sectors. */
|
||||
/* TODO: What about the other types? */
|
||||
if ((offset == 0) ||
|
||||
(offset == (flash->model_id == ST_M50FLW080A ? 0xE0000 : 0x10000))
|
||||
(offset == (flash->chip->model_id == ST_M50FLW080A ? 0xE0000 : 0x10000))
|
||||
|| (offset == 0xF0000)) {
|
||||
|
||||
// unlock each 4k-sector
|
||||
@ -85,7 +85,7 @@ int unlock_stm50flw0x0x(struct flashctx *flash)
|
||||
{
|
||||
int i;
|
||||
|
||||
for (i = 0; i < flash->total_size * 1024; i+= flash->page_size) {
|
||||
for (i = 0; i < flash->chip->total_size * 1024; i+= flash->chip->page_size) {
|
||||
if(unlock_block_stm50flw0x0x(flash, i)) {
|
||||
msg_cerr("UNLOCK FAILED!\n");
|
||||
return -1;
|
||||
|
Reference in New Issue
Block a user