summaryrefslogtreecommitdiffstats
path: root/at45db.c
diff options
context:
space:
mode:
authorCarl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>2014-07-19 22:03:29 +0000
committerCarl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>2014-07-19 22:03:29 +0000
commita5bcbceb581f27cfc0055369d3dd9cfd1ae00bfa (patch)
tree5daecd880a16b7011be28e064fb7550f3e6b7e58 /at45db.c
parent82b6ec1df30d3fca55547f230c76718d6e613b2a (diff)
downloadast2050-flashrom-a5bcbceb581f27cfc0055369d3dd9cfd1ae00bfa.zip
ast2050-flashrom-a5bcbceb581f27cfc0055369d3dd9cfd1ae00bfa.tar.gz
Rename programmer registration functions
Register_programmer suggests that we register a programmer. However, that function registers a master for a given bus type, and a programmer may support multiple masters (e.g. SPI, FWH). Rename a few other functions to be more consistent. Corresponding to flashrom svn r1831. Signed-off-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net> Acked-by: Stefan Tauner <stefan.tauner@alumni.tuwien.ac.at>
Diffstat (limited to 'at45db.c')
-rw-r--r--at45db.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/at45db.c b/at45db.c
index 5396d7f..3293a85 100644
--- a/at45db.c
+++ b/at45db.c
@@ -241,7 +241,7 @@ int spi_read_at45db(struct flashctx *flash, uint8_t *buf, unsigned int addr, uns
/* We have to split this up into chunks to fit within the programmer's read size limit, but those
* chunks can cross page boundaries. */
- const unsigned int max_data_read = flash->pgm->spi.max_data_read;
+ const unsigned int max_data_read = flash->mst->spi.max_data_read;
const unsigned int max_chunk = (max_data_read > 0) ? max_data_read : page_size;
while (len > 0) {
unsigned int chunk = min(max_chunk, len);
@@ -272,7 +272,7 @@ int spi_read_at45db_e8(struct flashctx *flash, uint8_t *buf, unsigned int addr,
/* We have to split this up into chunks to fit within the programmer's read size limit, but those
* chunks can cross page boundaries. */
- const unsigned int max_data_read = flash->pgm->spi.max_data_read;
+ const unsigned int max_data_read = flash->mst->spi.max_data_read;
const unsigned int max_chunk = (max_data_read > 0) ? max_data_read : page_size;
while (len > 0) {
const unsigned int addr_at45 = at45db_convert_addr(addr, page_size);
@@ -463,7 +463,7 @@ static int at45db_fill_buffer1(struct flashctx *flash, const uint8_t *bytes, uns
}
/* Create a suitable buffer to store opcode, address and data chunks for buffer1. */
- const unsigned int max_data_write = flash->pgm->spi.max_data_write;
+ const unsigned int max_data_write = flash->mst->spi.max_data_write;
const unsigned int max_chunk = (max_data_write > 0 && max_data_write <= page_size) ?
max_data_write : page_size;
uint8_t buf[4 + max_chunk];
OpenPOWER on IntegriCloud