From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-in-10.arcor-online.net (mail-in-10.arcor-online.net [151.189.21.50]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client CN "mx.arcor.de", Issuer "Thawte Premium Server CA" (verified OK)) by ozlabs.org (Postfix) with ESMTP id B613DDDE25 for ; Wed, 13 Jun 2007 14:45:03 +1000 (EST) In-Reply-To: <1181639293.8953.7.camel@localhost.localdomain> References: <1180406209.8139.13.camel@localhost.localdomain> <1181639293.8953.7.camel@localhost.localdomain> Mime-Version: 1.0 (Apple Message framework v623) Content-Type: text/plain; charset=US-ASCII; format=flowed Message-Id: From: Segher Boessenkool Subject: Re: [PATCH v3]: Fix e500 v2 core reboot bug Date: Wed, 13 Jun 2007 06:44:50 +0200 To: Zang Roy-r61911 Cc: linuxppc-dev list , Paul Mackerras List-Id: Linux on PowerPC Developers Mail List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , > + global-utilities@e0000 { //global utilities reg > + compatible = "fsl,mpc8548-guts"; > + reg = ; > + 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