diff options
author | Stefan Roese <ml@stefan-roese.de> | 2007-05-22 11:23:45 +0200 |
---|---|---|
committer | David Woodhouse <dwmw2@infradead.org> | 2007-06-28 20:33:04 +0100 |
commit | 02d929187414f2095b30ebf4acee1ce6617add45 (patch) | |
tree | 5d5afa22b3b5d7ba9438af5a20fd0ffa4d200bfb /drivers/mtd/nand/ndfc.c | |
parent | 356d70f19d949a11320ab626037b2d197a8e8b51 (diff) | |
download | op-kernel-dev-02d929187414f2095b30ebf4acee1ce6617add45.zip op-kernel-dev-02d929187414f2095b30ebf4acee1ce6617add45.tar.gz |
[MTD] [NAND] Change NDFC driver to support 405 platforms too
This patch adds 405 platform support to the 440 NDFC driver. The new
AMCC 405EZ PPC is equipped with the same NDFC core as the 440EP(x)
and other will follow soon.
Signed-off-by: Stefan Roese <sr@denx.de>
Signed-off-by: David Woodhouse <dwmw2@infradead.org>
Diffstat (limited to 'drivers/mtd/nand/ndfc.c')
-rw-r--r-- | drivers/mtd/nand/ndfc.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/drivers/mtd/nand/ndfc.c b/drivers/mtd/nand/ndfc.c index fd7a8d5..1c0e89f 100644 --- a/drivers/mtd/nand/ndfc.c +++ b/drivers/mtd/nand/ndfc.c @@ -24,7 +24,11 @@ #include <linux/platform_device.h> #include <asm/io.h> +#ifdef CONFIG_40x +#include <asm/ibm405.h> +#else #include <asm/ibm44x.h> +#endif struct ndfc_nand_mtd { struct mtd_info mtd; @@ -230,7 +234,11 @@ static int ndfc_nand_probe(struct platform_device *pdev) struct ndfc_controller *ndfc = &ndfc_ctrl; unsigned long long phys = settings->ndfc_erpn | res->start; +#ifndef CONFIG_PHYS_64BIT + ndfc->ndfcbase = ioremap((phys_addr_t)phys, res->end - res->start + 1); +#else ndfc->ndfcbase = ioremap64(phys, res->end - res->start + 1); +#endif if (!ndfc->ndfcbase) { printk(KERN_ERR "NDFC: ioremap failed\n"); return -EIO; |