On Aug 28, 2010, at 5:34 PM, Timur Tabi wrote: >> <m...@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.
I'm not sure either - I left it as it was before. > >> + "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()? Or potentially a continue to be more robust? Or would two (or more) "has-rstcr" nodes be wrong? > >> + } >> + >> + 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? Again I'm not entirely sure, I left this as it was before. Is there another way to reset the board if the rstcr node was not found correctly? -M > > -- > Timur Tabi > Linux kernel developer at Freescale > _______________________________________________ Linuxppc-dev mailing list Linuxppc-dev@lists.ozlabs.org https://lists.ozlabs.org/listinfo/linuxppc-dev