[PATCH] powerpc/fsl_soc: Search all global-utilities nodes for rstccr
Timur Tabi
timur.tabi at gmail.com
Sun Aug 29 08:34:18 EST 2010
> <msm at freescale.com> wrote:
> +
> + 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_EMERG "Error: reset control "
I'm not sure KERN_EMERG is warranted for this kind of error.
> + "register not mapped!\n");
> + }
So if a node has an fsl,rstcr property, but the of_iomap() fails, we
jump to the next global-utilities node? Perhaps you need a 'break'
after the printk()?
> + }
> +
> + if (!rstcr && ppc_md.restart == fsl_rstcr_restart)
Wouldn't it make more sense to assign fsl_rstcr_restart to
ppc_md.restart only if we find a valid fsl,has-rstcr property?
--
Timur Tabi
Linux kernel developer at Freescale
More information about the Linuxppc-dev
mailing list