summaryrefslogtreecommitdiffstats
path: root/sst_fwhub.c
diff options
context:
space:
mode:
authorCarl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>2011-12-18 15:01:24 +0000
committerCarl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>2011-12-18 15:01:24 +0000
commit8a3c60cdd0e5632173567923ae1927763e31e857 (patch)
tree3a5514d022392cf4d8fa368f9f02653da21a93ca /sst_fwhub.c
parent63fd9026f1e82b67a65072fda862ba7af35839e1 (diff)
downloadast2050-flashrom-8a3c60cdd0e5632173567923ae1927763e31e857.zip
ast2050-flashrom-8a3c60cdd0e5632173567923ae1927763e31e857.tar.gz
Add struct flashctx * parameter to all functions accessing flash chips
All programmer access function prototypes except init have been made static and moved to the respective file. A few internal functions in flash chip drivers had chipaddr parameters which are no longer needed. The lines touched by flashctx changes have been adjusted to 80 columns except in header files. Corresponding to flashrom svn r1474. Signed-off-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net> Acked-by: Michael Karcher <flashrom@mkarcher.dialup.fu-berlin.de>
Diffstat (limited to 'sst_fwhub.c')
-rw-r--r--sst_fwhub.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/sst_fwhub.c b/sst_fwhub.c
index 3656c81..c802a33 100644
--- a/sst_fwhub.c
+++ b/sst_fwhub.c
@@ -29,7 +29,7 @@ static int check_sst_fwhub_block_lock(struct flashctx *flash, int offset)
chipaddr registers = flash->virtual_registers;
uint8_t blockstatus;
- blockstatus = chip_readb(registers + offset + 2);
+ blockstatus = chip_readb(flash, registers + offset + 2);
msg_cdbg("Lock status for 0x%06x (size 0x%06x) is %02x, ",
offset, flash->page_size, blockstatus);
switch (blockstatus & 0x3) {
@@ -59,7 +59,7 @@ static int clear_sst_fwhub_block_lock(struct flashctx *flash, int offset)
if (blockstatus) {
msg_cdbg("Trying to clear lock for 0x%06x... ", offset);
- chip_writeb(0, registers + offset + 2);
+ chip_writeb(flash, 0, registers + offset + 2);
blockstatus = check_sst_fwhub_block_lock(flash, offset);
msg_cdbg("%s\n", (blockstatus) ? "failed" : "OK");
OpenPOWER on IntegriCloud