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>
diff --git a/at45db.c b/at45db.c
index 5396d7f..3293a85 100644
--- a/at45db.c
+++ b/at45db.c
@@ -241,7 +241,7 @@
/* 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 @@
/* 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 @@
}
/* 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];