diff options
Diffstat (limited to 'arch/powerpc/platforms')
-rw-r--r-- | arch/powerpc/platforms/52xx/mpc52xx_pm.c | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/arch/powerpc/platforms/52xx/mpc52xx_pm.c b/arch/powerpc/platforms/52xx/mpc52xx_pm.c index a55b0b6813ed..76722532bd95 100644 --- a/arch/powerpc/platforms/52xx/mpc52xx_pm.c +++ b/arch/powerpc/platforms/52xx/mpc52xx_pm.c | |||
@@ -64,10 +64,19 @@ int mpc52xx_pm_prepare(void) | |||
64 | { .type = "builtin", .compatible = "mpc5200", }, /* efika */ | 64 | { .type = "builtin", .compatible = "mpc5200", }, /* efika */ |
65 | {} | 65 | {} |
66 | }; | 66 | }; |
67 | struct resource res; | ||
67 | 68 | ||
68 | /* map the whole register space */ | 69 | /* map the whole register space */ |
69 | np = of_find_matching_node(NULL, immr_ids); | 70 | np = of_find_matching_node(NULL, immr_ids); |
70 | mbar = of_iomap(np, 0); | 71 | |
72 | if (of_address_to_resource(np, 0, &res)) { | ||
73 | pr_err("mpc52xx_pm_prepare(): could not get IMMR address\n"); | ||
74 | of_node_put(np); | ||
75 | return -ENOSYS; | ||
76 | } | ||
77 | |||
78 | mbar = ioremap(res.start, 0xc000); /* we should map whole region including SRAM */ | ||
79 | |||
71 | of_node_put(np); | 80 | of_node_put(np); |
72 | if (!mbar) { | 81 | if (!mbar) { |
73 | pr_err("mpc52xx_pm_prepare(): could not map registers\n"); | 82 | pr_err("mpc52xx_pm_prepare(): could not map registers\n"); |