[PATCH linux v2 3/3] mtd: spi-nor: aspeed: fix DMA access on AST2500
Robert Lippert
roblip at gmail.com
Wed Jan 11 09:55:55 AEDT 2017
AST2500 has additional bits in the dma_addr field. Its easier
to just write the full address into the register as the hardware
will handle the masking properly.
Signed-off-by: Robert Lippert <rlippert at google.com>
---
Changes in v2:
- Cleanups suggested by Cedric.
drivers/mtd/spi-nor/aspeed-smc.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/mtd/spi-nor/aspeed-smc.c b/drivers/mtd/spi-nor/aspeed-smc.c
index 3c8e897048c6..cd8a43238660 100644
--- a/drivers/mtd/spi-nor/aspeed-smc.c
+++ b/drivers/mtd/spi-nor/aspeed-smc.c
@@ -349,7 +349,7 @@ static int aspeed_smc_dma_wait(struct aspeed_smc_chip *chip)
}
#define DMA_LENGTH(x) (((x) - 4) & ~0xFE000003)
-#define DMA_ADDR(x) ((x) & ~0xE0000003)
+#define DMA_ADDR(x) ((x) & ~0x00000003)
static inline void aspeed_smc_chip_configure(struct aspeed_smc_chip *chip,
u32 ctl)
--
2.11.0.390.gc69c2f50cf-goog
More information about the openbmc
mailing list