[PATCH v2 linux dev-4.7 5/7] mtd: spi-nor: aspeed: use smc_read mode when doing DMAs
Cédric Le Goater
clg at kaod.org
Wed Nov 9 19:15:41 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>
Reviewed-by: Joel Stanley <joel at jms.id.au>
---
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 4839a26b387f..bbe505d5d8a3 100644
--- a/drivers/mtd/spi-nor/aspeed-smc.c
+++ b/drivers/mtd/spi-nor/aspeed-smc.c
@@ -405,7 +405,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);
@@ -446,7 +446,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