[PATCH linux dev-4.7 5/8] mtd: spi-nor: aspeed: use smc_read mode when doing DMAs

Cédric Le Goater clg at kaod.org
Sat Nov 5 04:00:44 AEDT 2016


smc_base is to send commands. smc_read is for flash content accesses.

Signed-off-by: Cédric Le Goater <clg at kaod.org>
---
 drivers/mtd/spi-nor/aspeed-smc.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/mtd/spi-nor/aspeed-smc.c b/drivers/mtd/spi-nor/aspeed-smc.c
index ca213f67c486..73adf409ac34 100644
--- a/drivers/mtd/spi-nor/aspeed-smc.c
+++ b/drivers/mtd/spi-nor/aspeed-smc.c
@@ -394,7 +394,7 @@ static int aspeed_smc_dma_start(struct aspeed_smc_chip *chip,
 	int ret;
 
 	aspeed_smc_chip_configure(chip, is_write ? chip->ctl_val[smc_write] :
-		chip->ctl_val[smc_base]);
+		chip->ctl_val[smc_read]);
 
 	dev_dbg(chip->nor.dev, "DMA %s to=0x%08x len=0x%08x\n",
 		is_write ? "write" : "read", offset, length);
@@ -435,7 +435,7 @@ static int aspeed_smc_dma_start(struct aspeed_smc_chip *chip,
 			 controller->dma_addr, controller->dma_length,
 			 (is_write ? DMA_TO_DEVICE : DMA_FROM_DEVICE));
 out:
-	aspeed_smc_chip_configure(chip, chip->ctl_val[smc_base]);
+	aspeed_smc_chip_configure(chip, chip->ctl_val[smc_read]);
 	return ret;
 }
 
-- 
2.7.4



More information about the openbmc mailing list