Re: [PATCH] OMAP: Store reboot mode in scratchpad on OMAP34xx

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Thu, 13 Aug 2009, Kevin Hilman wrote:

> Tony Lindgren <tony@xxxxxxxxxxx> writes:
> 
> > * Juha Yrjola <juha.yrjola@xxxxxxxxxxxxx> [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 <juha.yrjola@xxxxxxxxxxxxx>
> >> ---
> >>  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?
> >
> 
> Acked-by: Kevin Hilman <khilman@xxxxxxxxxxxxxxxxxxx>
> 
> I've had this one in the PM branch for awhile now I think can go upstream.

The omap_writel() should be nuked and replaced that with an 
omap_ctrl_write().  Other than that, I don't have any comment on it...


- Paul
--
To unsubscribe from this list: send the line "unsubscribe linux-omap" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Arm (vger)]     [ARM Kernel]     [ARM MSM]     [Linux Tegra]     [Linux WPAN Networking]     [Linux Wireless Networking]     [Maemo Users]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite Trails]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux