[PATCH] [MTD] NAND: Fix erpn usage in ndfc driver

Stefan Roese ml at stefan-roese.de
Sat Jan 6 06:27:39 EST 2007


[PATCH] [MTD]: NAND: Fix erpn usage in ndfc driver

Since 440EPx uses erpn != 0 this patch fixes the usage of erpn passing
via platform_devices.

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

---
commit 8ff908ce0b12fc6fbfb73cc95eaf5be4d793e66f
tree d00ab09cd4adddca0fbdefc2cc08069eff3079f0
parent 05a8057bb38bc803682f3e0af305c258b4566285
author Stefan Roese <sr at denx.de> Sat, 06 Jan 2007 12:25:24 +0100
committer Stefan Roese <sr at denx.de> Sat, 06 Jan 2007 12:25:24 +0100

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

diff --git a/drivers/mtd/nand/ndfc.c b/drivers/mtd/nand/ndfc.c
index 039c759..fd8e910 100644
--- a/drivers/mtd/nand/ndfc.c
+++ b/drivers/mtd/nand/ndfc.c
@@ -228,7 +228,8 @@ static int ndfc_nand_probe(struct platform_device *pdev)
 	struct ndfc_controller_settings *settings = nc->priv;
 	struct resource *res = pdev->resource;
 	struct ndfc_controller *ndfc = &ndfc_ctrl;
-	unsigned long long phys = settings->ndfc_erpn | res->start;
+	unsigned long long phys = ((unsigned long long)settings->ndfc_erpn << 32)
+		| res->start;
 
 	ndfc->ndfcbase = ioremap64(phys, res->end - res->start + 1);
 	if (!ndfc->ndfcbase) {




More information about the linux-mtd mailing list