Skip to content

Commit

Permalink
OMAP: Store reboot mode in scratchpad on OMAP34xx
Browse files Browse the repository at this point in the history
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@solidboot.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
Signed-off-by: Kevin Hilman <khilman@deeprootsystems.com>
  • Loading branch information
Juha Yrjola authored and Kevin Hilman committed Nov 11, 2009
1 parent bf07c9f commit 692ec4a
Showing 1 changed file with 11 additions and 2 deletions.
13 changes: 11 additions & 2 deletions arch/arm/mach-omap2/prcm.c
Original file line number Diff line number Diff line change
Expand Up @@ -135,9 +135,18 @@ 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. A pointer to a data structure
* describing the boot process can be stored there,
* cf. OMAP34xx TRM, Initialization / Software Booting
* Configuration. */
omap_writel(l, OMAP343X_SCRATCHPAD + 4);
} else
WARN_ON(1);

prm_set_mod_reg_bits(OMAP_RST_DPLL3, prcm_offs, RM_RSTCTRL);
Expand Down

0 comments on commit 692ec4a

Please sign in to comment.