[PATCH] [MTD] NAND: Fix endianess bug in ndfc.c

Stefan Roese ml at stefan-roese.de
Fri Nov 10 06:19:32 EST 2006


[PATCH] [MTD] NAND: Fix endianess bug in ndfc.c

The writel() call accidentally clears all bits in the NDFC_CCR
register (endianess problem). Now __raw_writel() is used instead.

Tested on Bamboo with NAND on chip select 0 and chip select 1.

Signed-off-by: Stefan Roese <sr at denx.de>

---
commit 0330ccb7b7c1cdb0b9b24a305c456590184e08ca
tree 0b82605a0620160b49ce61621ee0fda76cdd9678
parent a52e107be42f85bdd2931bf8d3676cfbde418226
author Stefan Roese <sr at denx.de> Thu, 09 Nov 2006 16:50:54 +0100
committer Stefan Roese <sr at denx.de> Thu, 09 Nov 2006 16:50:54 +0100

 drivers/mtd/nand/ndfc.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/drivers/mtd/nand/ndfc.c b/drivers/mtd/nand/ndfc.c
index 039c759..fd7a8d5 100644
--- a/drivers/mtd/nand/ndfc.c
+++ b/drivers/mtd/nand/ndfc.c
@@ -56,7 +56,7 @@ static void ndfc_select_chip(struct mtd_
 		ccr |= NDFC_CCR_BS(chip + pchip->chip_offset);
 	} else
 		ccr |= NDFC_CCR_RESET_CE;
-	writel(ccr, ndfc->ndfcbase + NDFC_CCR);
+	__raw_writel(ccr, ndfc->ndfcbase + NDFC_CCR);
 }
 
 static void ndfc_hwcontrol(struct mtd_info *mtd, int cmd, unsigned int ctrl)





More information about the linux-mtd mailing list