[PATCH 2/6] MTD: xway: fix invalid operator
Hauke Mehrtens
hauke at hauke-m.de
Sun Jun 5 14:20:05 PDT 2016
From: John Crispin <john at phrozen.org>
xway_read_byte should use a logic or and not an add operator when
working out the NAND address. The NAND address bits are used to
activate the pins to the NAND flash.
Signed-off-by: John Crispin <john at phrozen.org>
Signed-off-by: Hauke Mehrtens <hauke at hauke-m.de>
---
drivers/mtd/nand/xway_nand.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/mtd/nand/xway_nand.c b/drivers/mtd/nand/xway_nand.c
index ccac19c..0ab6e83 100644
--- a/drivers/mtd/nand/xway_nand.c
+++ b/drivers/mtd/nand/xway_nand.c
@@ -134,7 +134,7 @@ static unsigned char xway_read_byte(struct mtd_info *mtd)
int ret;
spin_lock_irqsave(&ebu_lock, flags);
- ret = ltq_r8((void __iomem *)(nandaddr + NAND_READ_DATA));
+ ret = ltq_r8((void __iomem *)(nandaddr | NAND_READ_DATA));
spin_unlock_irqrestore(&ebu_lock, flags);
return ret;
--
2.8.1
More information about the linux-mtd
mailing list