From patchwork Thu Mar 12 16:01:45 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Eugeniy Paltsev X-Patchwork-Id: 243594 List-Id: U-Boot discussion From: Eugeniy.Paltsev at synopsys.com (Eugeniy Paltsev) Date: Thu, 12 Mar 2020 16:01:45 +0000 Subject: [PATCH v1 6/8] spi: dw: Add mem_ops In-Reply-To: References: <20200305191925.959494-1-seanga2@gmail.com> <20200305191925.959494-7-seanga2@gmail.com> , Message-ID: Hi Sean, even after fixing build errors with this patch I still have issues with communications to flash IC. Now it is detected correctly (JEDEC id is valid) but I have issues with read or write. I need to look to that more intently. --- Eugeniy Paltsev diff --git a/drivers/spi/designware_spi.c b/drivers/spi/designware_spi.c index 298d1dbab5..a4e3dbd948 100644 --- a/drivers/spi/designware_spi.c +++ b/drivers/spi/designware_spi.c @@ -517,6 +517,8 @@ static int dw_spi_exec_op(struct spi_slave *slave, const struct spi_mem_op *op) if (op->dummy.nbytes) memset(op_buf + pos, 0xff, op->dummy.nbytes); + external_cs_manage(dev, false); + priv->tx = &op_buf; priv->tx_end = priv->tx + op_len; priv->rx = NULL; @@ -586,6 +588,8 @@ static int dw_spi_exec_op(struct spi_slave *slave, const struct spi_mem_op *op) } dw_write(priv, DW_SPI_SER, 0); + external_cs_manage(dev, true); + debug("%s: %u bytes xfered\n", __func__, op->data.nbytes); return ret; }