From mboxrd@z Thu Jan 1 00:00:00 1970 From: Tony Lindgren Subject: Re: [PATCH] OMAP: Store reboot mode in scratchpad on OMAP34xx Date: Mon, 9 Mar 2009 10:21:40 -0700 Message-ID: <20090309172140.GF7329@atomide.com> References: <1236532839-3696-1-git-send-email-juha.yrjola@solidboot.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Return-path: Received: from mho-01-bos.mailhop.org ([63.208.196.178]:53052 "EHLO mho-01-bos.mailhop.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751031AbZCIRVn (ORCPT ); Mon, 9 Mar 2009 13:21:43 -0400 Content-Disposition: inline In-Reply-To: <1236532839-3696-1-git-send-email-juha.yrjola@solidboot.com> Sender: linux-omap-owner@vger.kernel.org List-Id: linux-omap@vger.kernel.org To: Juha Yrjola Cc: linux-omap@vger.kernel.org, Kevin Hilman , Paul Walmsley * Juha Yrjola [090308 10:20]: > The reboot mode can be communicated to a bootloader (or the > kernel itself) with a scratchpad register. This functionality > is especially useful, if userspace is allowed to change > the reboot mode. > > Signed-off-by: Juha Yrjola > --- > arch/arm/mach-omap2/prcm.c | 10 ++++++++-- > 1 files changed, 8 insertions(+), 2 deletions(-) > > diff --git a/arch/arm/mach-omap2/prcm.c b/arch/arm/mach-omap2/prcm.c > index f945156..2bd239e 100644 > --- a/arch/arm/mach-omap2/prcm.c > +++ b/arch/arm/mach-omap2/prcm.c > @@ -43,9 +43,15 @@ void omap_prcm_arch_reset(char mode) > > if (cpu_is_omap24xx()) > prcm_offs = WKUP_MOD; > - else if (cpu_is_omap34xx()) > + else if (cpu_is_omap34xx()) { > + u32 l; > + > prcm_offs = OMAP3430_GR_MOD; > - else > + l = ('B' << 24) | ('M' << 16) | mode; > + /* Reserve the first word in scratchpad for communicating > + * with the boot ROM. */ > + omap_writel(l, OMAP343X_SCRATCHPAD + 4); > + } else > WARN_ON(1); > > prm_set_mod_reg_bits(OMAP_RST_DPLL3, prcm_offs, RM_RSTCTRL); Looks OK to me, any comments from Kevin or Paul? Regards, Tony