]> git.karo-electronics.de Git - mv-sheeva.git/blobdiff - arch/powerpc/sysdev/pmi.c
[POWERPC] add of_iomap function
[mv-sheeva.git] / arch / powerpc / sysdev / pmi.c
index 05db1f9f82d3dfad9f26038a4ad8aa9685f2a5de..85a7c99c1003682c10c4317a5f7f4888c0033c80 100644 (file)
@@ -33,7 +33,7 @@
 #include <asm/of_platform.h>
 #include <asm/io.h>
 #include <asm/pmi.h>
-
+#include <asm/prom.h>
 
 struct pmi_data {
        struct list_head        handler;
@@ -49,21 +49,6 @@ struct pmi_data {
 };
 
 
-
-static void __iomem *of_iomap(struct device_node *np)
-{
-       struct resource res;
-
-       if (of_address_to_resource(np, 0, &res))
-               return NULL;
-
-       pr_debug("Resource start: 0x%lx\n", res.start);
-       pr_debug("Resource end: 0x%lx\n", res.end);
-
-       return ioremap(res.start, 1 + res.end - res.start);
-}
-
-
 static int pmi_irq_handler(int irq, void *dev_id)
 {
        struct pmi_data *data;
@@ -154,7 +139,7 @@ static int pmi_of_probe(struct of_device *dev,
                goto out;
        }
 
-       data->pmi_reg = of_iomap(np);
+       data->pmi_reg = of_iomap(np, 0);
        if (!data->pmi_reg) {
                printk(KERN_ERR "pmi: invalid register address.\n");
                rc = -EFAULT;