Subject: Adapt Airoha EN7523 SPI to work with EcoNet EN751221

The SPI driver from Airoha EN7523 is copied here in it's original form
so this patch makes three updates to it in order to make it work
correctly in the EcoNet EN751221 context.

The main change here is that the chip select operation is sent twice.
This pattern is borrowed from the vendor code and it prevents write
operations from being lost sporadically on the EN751221.

Signed-off-by: Caleb James DeLisle <cjd@cjdns.fr>
---
--- a/drivers/spi/Kconfig
+++ b/drivers/spi/Kconfig
@@ -406,7 +406,7 @@ config SPI_DLN2
 
 config SPI_AIROHA_EN7523
 	bool "Airoha EN7523 SPI controller support"
-	depends on ARCH_AIROHA
+	depends on ARCH_AIROHA || ECONET
 	help
 	  This enables SPI controller support for the Airoha EN7523 SoC.
 
--- a/drivers/spi/spi-en7523.c
+++ b/drivers/spi/spi-en7523.c
@@ -82,10 +82,11 @@ static void opfifo_write(u32 cmd, u32 le
 
 static void set_cs(int state)
 {
-	if (state)
-		opfifo_write(OP_CSH, 1);
-	else
-		opfifo_write(OP_CSL, 1);
+	u32 cmd = state ? OP_CSH : OP_CSL;
+
+	/* EN751221 drops writes if we don't send this twice. */
+	opfifo_write(cmd, 1);
+	opfifo_write(cmd, 1);
 }
 
 static void manual_begin_cmd(void)
@@ -226,12 +227,12 @@ static int xfer_write(struct spi_transfe
 	return xfer->len;
 }
 
-size_t max_transfer_size(struct spi_device *spi)
+static size_t max_transfer_size(struct spi_device *spi)
 {
 	return _ENSPI_MAX_XFER;
 }
 
-int transfer_one_message(struct spi_controller *ctrl, struct spi_message *msg)
+static int transfer_one_message(struct spi_controller *ctrl, struct spi_message *msg)
 {
 	struct spi_transfer *xfer;
 	int next_xfer_is_rx = 0;
