summaryrefslogtreecommitdiff
path: root/arch/powerpc/sysdev/fsl_soc.c
diff options
context:
space:
mode:
authorMatthew McClintock <msm@freescale.com>2010-08-31 17:44:51 -0500
committerKumar Gala <galak@kernel.crashing.org>2010-10-14 00:52:56 -0500
commit4ea7c88bec9221031fa57fc7c290fdb5d279748c (patch)
treea7df33a4768b8759c82da33801fb5f2613ec10f6 /arch/powerpc/sysdev/fsl_soc.c
parent92437d41374bf59b1914b53bd10ca69d31b1b581 (diff)
powerpc/fsl_soc: Search all global-utilities nodes for rstccr
The first global-utilities node might not contain the rstcr property, so we should search all the nodes Signed-off-by: Matthew McClintock <msm@freescale.com> Acked-by: Timur Tabi <timur@freescale.com> Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
Diffstat (limited to 'arch/powerpc/sysdev/fsl_soc.c')
-rw-r--r--arch/powerpc/sysdev/fsl_soc.c20
1 files changed, 13 insertions, 7 deletions
diff --git a/arch/powerpc/sysdev/fsl_soc.c b/arch/powerpc/sysdev/fsl_soc.c
index b91f7acdda6f..6c67d9ebf166 100644
--- a/arch/powerpc/sysdev/fsl_soc.c
+++ b/arch/powerpc/sysdev/fsl_soc.c
@@ -378,17 +378,23 @@ static __be32 __iomem *rstcr;
static int __init setup_rstcr(void)
{
struct device_node *np;
- np = of_find_node_by_name(NULL, "global-utilities");
- if ((np && of_get_property(np, "fsl,has-rstcr", NULL))) {
- rstcr = of_iomap(np, 0) + 0xb0;
- if (!rstcr)
- printk (KERN_EMERG "Error: reset control register "
- "not mapped!\n");
- } else if (ppc_md.restart == fsl_rstcr_restart)
+
+ for_each_node_by_name(np, "global-utilities") {
+ if ((of_get_property(np, "fsl,has-rstcr", NULL))) {
+ rstcr = of_iomap(np, 0) + 0xb0;
+ if (!rstcr)
+ printk (KERN_ERR "Error: reset control "
+ "register not mapped!\n");
+ break;
+ }
+ }
+
+ if (!rstcr && ppc_md.restart == fsl_rstcr_restart)
printk(KERN_ERR "No RSTCR register, warm reboot won't work\n");
if (np)
of_node_put(np);
+
return 0;
}