summaryrefslogtreecommitdiffstats
path: root/at25.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 /at25.c
parent63fd9026f1e82b67a65072fda862ba7af35839e1 (diff)
downloadflashrom-8a3c60cdd0e5632173567923ae1927763e31e857.tar.gz
flashrom-8a3c60cdd0e5632173567923ae1927763e31e857.tar.bz2
flashrom-8a3c60cdd0e5632173567923ae1927763e31e857.zip
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 'at25.c')
-rw-r--r--at25.c22
1 files changed, 11 insertions, 11 deletions
diff --git a/at25.c b/at25.c
index eccf4c899..ec9b4b69c 100644
--- a/at25.c
+++ b/at25.c
@@ -61,7 +61,7 @@ int spi_prettyprint_status_register_at25df(struct flashctx *flash)
{
uint8_t status;
- status = spi_read_status_register();
+ status = spi_read_status_register(flash);
msg_cdbg("Chip status register is %02x\n", status);
spi_prettyprint_status_register_atmel_at25_srpl(status);
@@ -84,7 +84,7 @@ int spi_prettyprint_status_register_at25f(struct flashctx *flash)
{
uint8_t status;
- status = spi_read_status_register();
+ status = spi_read_status_register(flash);
msg_cdbg("Chip status register is %02x\n", status);
spi_prettyprint_status_register_atmel_at25_srpl(status);
@@ -103,7 +103,7 @@ int spi_prettyprint_status_register_at25fs010(struct flashctx *flash)
{
uint8_t status;
- status = spi_read_status_register();
+ status = spi_read_status_register(flash);
msg_cdbg("Chip status register is %02x\n", status);
msg_cdbg("Chip status register: Status Register Write Protect (WPEN) "
@@ -127,7 +127,7 @@ int spi_prettyprint_status_register_at25fs040(struct flashctx *flash)
{
uint8_t status;
- status = spi_read_status_register();
+ status = spi_read_status_register(flash);
msg_cdbg("Chip status register is %02x\n", status);
msg_cdbg("Chip status register: Status Register Write Protect (WPEN) "
@@ -151,7 +151,7 @@ int spi_prettyprint_status_register_atmel_at26df081a(struct flashctx *flash)
{
uint8_t status;
- status = spi_read_status_register();
+ status = spi_read_status_register(flash);
msg_cdbg("Chip status register is %02x\n", status);
spi_prettyprint_status_register_atmel_at25_srpl(status);
@@ -168,7 +168,7 @@ int spi_disable_blockprotect_at25df(struct flashctx *flash)
uint8_t status;
int result;
- status = spi_read_status_register();
+ status = spi_read_status_register(flash);
/* If block protection is disabled, stop here. */
if ((status & (3 << 2)) == 0)
return 0;
@@ -195,7 +195,7 @@ int spi_disable_blockprotect_at25df(struct flashctx *flash)
msg_cerr("spi_write_status_register failed\n");
return result;
}
- status = spi_read_status_register();
+ status = spi_read_status_register(flash);
if ((status & (3 << 2)) != 0) {
msg_cerr("Block protection could not be disabled!\n");
return 1;
@@ -223,7 +223,7 @@ int spi_disable_blockprotect_at25fs010(struct flashctx *flash)
uint8_t status;
int result;
- status = spi_read_status_register();
+ status = spi_read_status_register(flash);
/* If block protection is disabled, stop here. */
if ((status & 0x6c) == 0)
return 0;
@@ -244,7 +244,7 @@ int spi_disable_blockprotect_at25fs010(struct flashctx *flash)
msg_cerr("spi_write_status_register failed\n");
return result;
}
- status = spi_read_status_register();
+ status = spi_read_status_register(flash);
if ((status & 0x6c) != 0) {
msg_cerr("Block protection could not be disabled!\n");
return 1;
@@ -257,7 +257,7 @@ int spi_disable_blockprotect_at25fs040(struct flashctx *flash)
uint8_t status;
int result;
- status = spi_read_status_register();
+ status = spi_read_status_register(flash);
/* If block protection is disabled, stop here. */
if ((status & 0x7c) == 0)
return 0;
@@ -278,7 +278,7 @@ int spi_disable_blockprotect_at25fs040(struct flashctx *flash)
msg_cerr("spi_write_status_register failed\n");
return result;
}
- status = spi_read_status_register();
+ status = spi_read_status_register(flash);
if ((status & 0x7c) != 0) {
msg_cerr("Block protection could not be disabled!\n");
return 1;