[PATCH v3]: Fix e500 v2 core reboot bug

Segher Boessenkool segher at kernel.crashing.org
Wed Jun 13 14:44:50 EST 2007


> +		global-utilities at e0000 {	//global utilities reg
> +			compatible = "fsl,mpc8548-guts";
> +			reg = <e0000 1000>;
> +			fsl,has-rstcr;
> +		};

Looks good.

> +	np = of_find_node_by_name(NULL, "global-utilities");
> +	if ((np && of_get_property(np, "fsl,has-rstcr", NULL))) {
> +		const u32 *prop = of_get_property(np, "reg", NULL);
> +		if (prop) {
> +		/* map reset control register
> +		 * 0xE00B0 is offset of reset control register
> +		 */
> +			rstcr = ioremap(get_immrbase() + *prop + 0xB0, 0xff);
> +			if (!rstcr)
> +				printk (KERN_EMERG "Error: reset control register not mapped, 
> spinning!\n");
> +		}
> +	else
> +		printk (KERN_INFO "rstcr compatible register does not exist!\n");
> +	}

This needs an of_node_put(np).  Oh and the indenting
is off.


Segher




More information about the Linuxppc-dev mailing list