spi: Make 'default_spi_write_aai' the default unless defined

A NULL func pointer is necessary and sufficient for the
condition `NULL func pointer => default_spi_write_aai' as to not
need this explicit specification of 'default'.

Therefore drop the explicit need to specify the 'default_spi_write_aai'
callback function pointer in the spi_master struct. This is a reasonable
default for every other driver in the tree with only a few exceptions.

This simplifies the code and driver development.

flashrom-stable: Updated `dirtyjtag_spi` which was added earlier.

Change-Id: I7f14aaea0edcf0c08cea0e9cd27d58152707fb2a
Signed-off-by: Edward O'Callaghan <quasisec@google.com>
Original-Reviewed-on: https://review.coreboot.org/c/flashrom/+/67479
Original-Reviewed-by: Peter Marheine <pmarheine@chromium.org>
Original-Reviewed-by: Anastasia Klimchuk <aklm@chromium.org>
Original-Reviewed-by: Felix Singer <felixsinger@posteo.net>
Reviewed-on: https://review.coreboot.org/c/flashrom-stable/+/72369
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Nico Huber <nico.h@gmx.de>
diff --git a/spi.c b/spi.c
index b7a7a21..ac79f73 100644
--- a/spi.c
+++ b/spi.c
@@ -126,7 +126,9 @@
 
 int spi_aai_write(struct flashctx *flash, const uint8_t *buf, unsigned int start, unsigned int len)
 {
-	return flash->mst->spi.write_aai(flash, buf, start, len);
+	if (flash->mst->spi.write_aai)
+		return flash->mst->spi.write_aai(flash, buf, start, len);
+	return default_spi_write_aai(flash, buf, start, len);
 }
 
 int register_spi_master(const struct spi_master *mst, void *data)
@@ -140,7 +142,7 @@
 		}
 	}
 
-	if (!mst->write_aai || !mst->write_256 || !mst->read || !mst->command ||
+	if (!mst->write_256 || !mst->read || !mst->command ||
 	    !mst->multicommand ||
 	    ((mst->command == default_spi_send_command) &&
 	     (mst->multicommand == default_spi_send_multicommand))) {