mirror of
https://review.coreboot.org/flashrom.git
synced 2025-07-02 22:43:17 +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:
@ -31,7 +31,7 @@ static int check_sst_fwhub_block_lock(struct flashctx *flash, int offset)
|
||||
|
||||
blockstatus = chip_readb(flash, registers + offset + 2);
|
||||
msg_cdbg("Lock status for 0x%06x (size 0x%06x) is %02x, ",
|
||||
offset, flash->page_size, blockstatus);
|
||||
offset, flash->chip->page_size, blockstatus);
|
||||
switch (blockstatus & 0x3) {
|
||||
case 0x0:
|
||||
msg_cdbg("full access\n");
|
||||
@ -72,7 +72,7 @@ int printlock_sst_fwhub(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)
|
||||
check_sst_fwhub_block_lock(flash, i);
|
||||
|
||||
return 0;
|
||||
@ -82,7 +82,7 @@ int unlock_sst_fwhub(struct flashctx *flash)
|
||||
{
|
||||
int i, ret=0;
|
||||
|
||||
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 (clear_sst_fwhub_block_lock(flash, i))
|
||||
{
|
||||
|
Reference in New Issue
Block a user