OMAP: Store reboot mode in scratchpad on OMAP34xx
Subsystems (3)
PATCH v2 1/1 OMAP: Store reboot mode in scratchpad on OMAP34xx
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.
--- arch/arm/mach-omap2/prcm.c | 13 +++++++++++-- 1 files changed, 11 insertions(+), 2 deletions(-)
arch/arm/mach-omap2/prcm.c +11 -2
@@ -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 );
Signature · 1 line
1.6.1.3
Quoted 6 lines · 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 <[email protected]>
Quoted 36 lines
--- arch/arm/mach-omap2/prcm.c | 13 +++++++++++-- 1 files changed, 11 insertions(+), 2 deletions(-)arch/arm/mach-omap2/prcm.c +11
-2@@ -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 );Signature · 6 lines
1.6.1.3 -- To unsubscribe from this list: send the line "unsubscribe linux-omap" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html
Tony Lindgren
maintainerPATCH v2 1/1 OMAP: Store reboot mode in scratchpad on OMAP34xx
In reply to Juha YrjolaThis patch has been applied to the linux-omap
by youw fwiendly patch wobot.
Commit: 73b65cde9647508313b3d686dff0f3d1d92482d1
PatchWorks
http://patchwork.kernel.org/patch/10718/
Quoted 2 lines · Tony Lindgren
This patch has been applied to the linux-omap
by youw fwiendly patch wobot.
CC arch/arm/mach-omap2/prcm.oarch/arm/mach-omap2/prcm.c: In function 'omap_prcm_arch_reset':arch/arm/mach-omap2/prcm.c:56: error: 'OMAP343X_SCRATCHPAD' undeclared (first use in this function) arch/arm/mach-omap2/prcm.c:56: error: (Each undeclared identifier is reported only once arch/arm/mach-omap2/prcm.c:56: error: for each function it appears in.)
make[1]: *** [arch/arm/mach-omap2/prcm.o] Error 1
make: *** [arch/arm/mach-omap2] Error 2
Quoted 11 lines
Commit:
73b65cde9647508313b3d686dff0f3d1d92482d1PatchWorks
http://patchwork.kernel.org/patch/10718/
Tony Lindgren
maintainerQuoted 11 lines · David Brownell
Quoted 2 lines · Tony Lindgren
This patch has been applied to the linux-omap
by youw fwiendly patch wobot.CC
arch/arm/mach-omap2/prcm.oarch/arm/mach-omap2/prcm.c: In function 'omap_prcm_arch_reset':arch/arm/mach-omap2/prcm.c:56: error: 'OMAP343X_SCRATCHPAD' undeclared (first use in this function)arch/arm/mach-omap2/prcm.c:56: error: (Each undeclared identifier is reported only oncearch/arm/mach-omap2/prcm.c:56: error: for each function it appears in.)
make[1]: *** [arch/arm/mach-omap2/prcm.o] Error 1
make: *** [arch/arm/mach-omap2] Error 2
I already pushed a fix for that as commit3388c8ffb612af2c9d4267e0401378c3afb05f5f.
Tony
Quoted 12 lines
Quoted 11 lines
Commit:
73b65cde9647508313b3d686dff0f3d1d92482d1PatchWorks
http://patchwork.kernel.org/patch/10718/