x86: ich-spi: Convert driver to spi-mem ops

With the introduction of the new spi-mem model operations changed
slightly. The new spi-mem operations make things a bit easier to
handle for ich-spi flash interface. This patch converts the ich-spi
driver by using spi-mem operations.

Signed-off-by: Bernhard Messerklinger <bernhard.messerklinger@br-automation.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>

Tested on Intel CrownBay and MinnowMax
Tested-by: Bin Meng <bmeng.cn@gmail.com>

[bmeng: fix compiler warnings when building the driver for 64-bit]
Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
diff --git a/drivers/spi/ich.h b/drivers/spi/ich.h
index a974241..3dfb2aa 100644
--- a/drivers/spi/ich.h
+++ b/drivers/spi/ich.h
@@ -100,13 +100,8 @@
 	HSFC_FSMIE =		0x8000
 };
 
-enum {
-	ICH_MAX_CMD_LEN		= 5,
-};
-
 struct spi_trans {
-	uint8_t cmd[ICH_MAX_CMD_LEN];
-	int cmd_len;
+	uint8_t cmd;
 	const uint8_t *out;
 	uint32_t bytesout;
 	uint8_t *in;
@@ -166,6 +161,8 @@
 #define SPI_OPMENU_LOWER ((SPI_OPMENU_3 << 24) | (SPI_OPMENU_2 << 16) | \
 			  (SPI_OPMENU_1 <<  8) | (SPI_OPMENU_0 <<  0))
 
+#define ICH_BOUNDARY	0x1000
+
 enum ich_version {
 	ICHV_7,
 	ICHV_9,