* [PATCH v2] OMAP: Store reboot mode in scratchpad on OMAP34xx
@ 2009-03-09 21:21 Juha Yrjola
2009-03-09 22:12 ` Kevin Hilman
2009-03-10 19:35 ` [APPLIED] " Tony Lindgren
0 siblings, 2 replies; 5+ messages in thread
From: Juha Yrjola @ 2009-03-09 21:21 UTC (permalink / raw)
To: linux-omap; +Cc: Juha Yrjola
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>
---
arch/arm/mach-omap2/prcm.c | 13 +++++++++++--
1 files changed, 11 insertions(+), 2 deletions(-)
diff --git a/arch/arm/mach-omap2/prcm.c b/arch/arm/mach-omap2/prcm.c
index f945156..2f828cb 100644
--- a/arch/arm/mach-omap2/prcm.c
+++ b/arch/arm/mach-omap2/prcm.c
@@ -43,9 +43,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);
--
1.6.1.3
^ permalink raw reply related [flat|nested] 5+ messages in thread* Re: [PATCH v2] OMAP: Store reboot mode in scratchpad on OMAP34xx
2009-03-09 21:21 [PATCH v2] OMAP: Store reboot mode in scratchpad on OMAP34xx Juha Yrjola
@ 2009-03-09 22:12 ` Kevin Hilman
2009-03-10 19:35 ` [APPLIED] " Tony Lindgren
1 sibling, 0 replies; 5+ messages in thread
From: Kevin Hilman @ 2009-03-09 22:12 UTC (permalink / raw)
To: Juha Yrjola; +Cc: linux-omap
Juha Yrjola <juha.yrjola@solidboot.com> writes:
> 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>
Acked-by: Kevin Hilman <khilman@deeprootsystems.com>
> ---
> arch/arm/mach-omap2/prcm.c | 13 +++++++++++--
> 1 files changed, 11 insertions(+), 2 deletions(-)
>
> diff --git a/arch/arm/mach-omap2/prcm.c b/arch/arm/mach-omap2/prcm.c
> index f945156..2f828cb 100644
> --- a/arch/arm/mach-omap2/prcm.c
> +++ b/arch/arm/mach-omap2/prcm.c
> @@ -43,9 +43,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);
> --
> 1.6.1.3
>
> --
> To unsubscribe from this list: send the line "unsubscribe linux-omap" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
^ permalink raw reply [flat|nested] 5+ messages in thread* [APPLIED] [PATCH v2] OMAP: Store reboot mode in scratchpad on OMAP34xx
2009-03-09 21:21 [PATCH v2] OMAP: Store reboot mode in scratchpad on OMAP34xx Juha Yrjola
2009-03-09 22:12 ` Kevin Hilman
@ 2009-03-10 19:35 ` Tony Lindgren
2009-03-10 21:05 ` David Brownell
1 sibling, 1 reply; 5+ messages in thread
From: Tony Lindgren @ 2009-03-10 19:35 UTC (permalink / raw)
To: linux-omap
This patch has been applied to the linux-omap
by youw fwiendly patch wobot.
Commit: 73b65cde9647508313b3d686dff0f3d1d92482d1
PatchWorks
http://patchwork.kernel.org/patch/10718/
Git
http://git.kernel.org/?p=linux/kernel/git/tmlind/linux-omap-2.6.git;a=commit;h=73b65cde9647508313b3d686dff0f3d1d92482d1
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2009-03-10 21:14 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-03-09 21:21 [PATCH v2] OMAP: Store reboot mode in scratchpad on OMAP34xx Juha Yrjola
2009-03-09 22:12 ` Kevin Hilman
2009-03-10 19:35 ` [APPLIED] " Tony Lindgren
2009-03-10 21:05 ` David Brownell
2009-03-10 21:14 ` Tony Lindgren
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox