Browse Source

[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@denx.de>
Signed-off-by: David Woodhouse <dwmw2@infradead.org>
Stefan Roese 18 years ago
parent
commit
4010db56c8
1 changed files with 1 additions and 1 deletions
  1. 1 1
      drivers/mtd/nand/ndfc.c

+ 1 - 1
drivers/mtd/nand/ndfc.c

@@ -56,7 +56,7 @@ static void ndfc_select_chip(struct mtd_info *mtd, int chip)
 		ccr |= NDFC_CCR_BS(chip + pchip->chip_offset);
 		ccr |= NDFC_CCR_BS(chip + pchip->chip_offset);
 	} else
 	} else
 		ccr |= NDFC_CCR_RESET_CE;
 		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)
 static void ndfc_hwcontrol(struct mtd_info *mtd, int cmd, unsigned int ctrl)