spi: Die if Winbond chip driver gets probed twice

The way we use the SPI API does not allow for multiple chips to be
used simultaneously. This adds a dumb check to see if the chip has
already been probed/initialized, which should only happen once given
the current assumptions.

If we want to support multiple chips simultaneously, we should
further re-factor these chip drivers to be malloc()-friendly in
early stages (Julius suggested suggested implementing a mini-heap).

BUG=none
BRANCH=none
TEST=none (current ToT is broken)

Signed-off-by: David Hendricks <dhendrix@chromium.org>
Change-Id: I27ccbd5d94e00970f3a07c6383ccdce14a09cb60
Reviewed-on: https://chromium-review.googlesource.com/236080
Reviewed-by: Julius Werner <jwerner@chromium.org>
diff --git a/src/drivers/spi/winbond.c b/src/drivers/spi/winbond.c
index a0abeb4..d4f61df 100644
--- a/src/drivers/spi/winbond.c
+++ b/src/drivers/spi/winbond.c
@@ -192,6 +192,9 @@
 	unsigned page_size;
 	unsigned int i;
 
+	if (stm.params)
+		die("Winbond driver already initialized.");
+
 	for (i = 0; i < ARRAY_SIZE(winbond_spi_flash_table); i++) {
 		params = &winbond_spi_flash_table[i];
 		if (params->id == ((idcode[1] << 8) | idcode[2]))