]> www.pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - arch/powerpc/platforms/52xx/mpc52xx_pm.c
[POWERPC] mpc5200: eliminate mpc52xx_*_map_*() functions.
[linux-2.6-omap-h63xx.git] / arch / powerpc / platforms / 52xx / mpc52xx_pm.c
index 7ffa7babf25416a8f43a98b7595a468391c75472..52f027789c8f96e3070ef1aaf6ecb215c04088a9 100644 (file)
@@ -59,10 +59,14 @@ int mpc52xx_set_wakeup_gpio(u8 pin, u8 level)
 
 int mpc52xx_pm_prepare(void)
 {
+       struct device_node *np;
+
        /* map the whole register space */
-       mbar = mpc52xx_find_and_map("mpc5200");
+       np = of_find_compatible_node(NULL, NULL, "mpc5200");
+       mbar = of_iomap(np, 0);
+       of_node_put(np);
        if (!mbar) {
-               printk(KERN_ERR "%s:%i Error mapping registers\n", __func__, __LINE__);
+               pr_err("mpc52xx_pm_prepare(): could not map registers\n");
                return -ENOSYS;
        }
        /* these offsets are from mpc5200 users manual */