mirror of
https://github.com/torvalds/linux.git
synced 2024-11-08 05:01:48 +00:00
powerpc/5200: fix oops during going to standby
When going to standby mode mpc code maps the whole soc5200 node to access warious MBAR registers. However as of_iomap uses 'reg' property of device node, only small part of MBAR is getting mapped. Thus pm code gets oops when trying to access high parts of MBAR. As a way to overcome this, make mpc52xx_pm_prepare() explicitly map whole MBAR (0xc0000). Signed-off-by: Dmitry Eremin-Solenikov <dbaryshkov@gmail.com> Signed-off-by: Grant Likely <grant.likely@secretlab.ca>
This commit is contained in:
parent
a2c9a603c7
commit
fb73538e10
@ -64,10 +64,19 @@ int mpc52xx_pm_prepare(void)
|
|||||||
{ .type = "builtin", .compatible = "mpc5200", }, /* efika */
|
{ .type = "builtin", .compatible = "mpc5200", }, /* efika */
|
||||||
{}
|
{}
|
||||||
};
|
};
|
||||||
|
struct resource res;
|
||||||
|
|
||||||
/* map the whole register space */
|
/* map the whole register space */
|
||||||
np = of_find_matching_node(NULL, immr_ids);
|
np = of_find_matching_node(NULL, immr_ids);
|
||||||
mbar = of_iomap(np, 0);
|
|
||||||
|
if (of_address_to_resource(np, 0, &res)) {
|
||||||
|
pr_err("mpc52xx_pm_prepare(): could not get IMMR address\n");
|
||||||
|
of_node_put(np);
|
||||||
|
return -ENOSYS;
|
||||||
|
}
|
||||||
|
|
||||||
|
mbar = ioremap(res.start, 0xc000); /* we should map whole region including SRAM */
|
||||||
|
|
||||||
of_node_put(np);
|
of_node_put(np);
|
||||||
if (!mbar) {
|
if (!mbar) {
|
||||||
pr_err("mpc52xx_pm_prepare(): could not map registers\n");
|
pr_err("mpc52xx_pm_prepare(): could not map registers\n");
|
||||||
|
Loading…
Reference in New Issue
Block a user