aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorEdward O'Callaghan <quasisec@google.com>2023-03-01 10:50:37 +1100
committerThomas Heijligen <src@posteo.de>2023-03-03 17:33:06 +0000
commitc66d2bd1ca384dd673b24420e11865fde86060fc (patch)
tree59904dcc86a95c34a8ddae5880e08c3c47f894ca /include
parent29a3a09f9155e5de69d6d2a4bf582a9e09b8e0a4 (diff)
downloadflashrom-c66d2bd1ca384dd673b24420e11865fde86060fc.tar.gz
flashrom-c66d2bd1ca384dd673b24420e11865fde86060fc.tar.bz2
flashrom-c66d2bd1ca384dd673b24420e11865fde86060fc.zip
spi: Make default cmd helpers static internal
Avoid these leaking into driver implementations as a NULL field now implies their implementation. This removes one source of a driver bug where both `mst->command` AND `mst->multicommand` are set to default implementations which is actually a cyclical control flow condition. The driver however must still have either `mst->command` OR `mst->multicommand` defined and so both cannot be NULL. This simplifies the code and driver development. Change-Id: I4ef95846c2f005cf4aa727f31548c6877d2d4801 Signed-off-by: Edward O'Callaghan <quasisec@google.com> Reviewed-on: https://review.coreboot.org/c/flashrom/+/73337 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Thomas Heijligen <src@posteo.de> Reviewed-by: Anastasia Klimchuk <aklm@chromium.org>
Diffstat (limited to 'include')
-rw-r--r--include/programmer.h3
1 files changed, 0 insertions, 3 deletions
diff --git a/include/programmer.h b/include/programmer.h
index f72f1d7b..f6bc8ce6 100644
--- a/include/programmer.h
+++ b/include/programmer.h
@@ -318,9 +318,6 @@ struct spi_master {
void *data;
};
-int default_spi_send_command(const struct flashctx *flash, unsigned int writecnt, unsigned int readcnt,
- const unsigned char *writearr, unsigned char *readarr);
-int default_spi_send_multicommand(const struct flashctx *flash, struct spi_command *cmds);
int default_spi_read(struct flashctx *flash, uint8_t *buf, unsigned int start, unsigned int len);
int default_spi_write_256(struct flashctx *flash, const uint8_t *buf, unsigned int start, unsigned int len);
int default_spi_write_aai(struct flashctx *flash, const uint8_t *buf, unsigned int start, unsigned int len);