From: Kevin Hilman <khilman@deeprootsystems.com>
To: Tony Lindgren <tony@atomide.com>
Cc: Juha Yrjola <juha.yrjola@solidboot.com>,
linux-omap@vger.kernel.org, Paul Walmsley <paul@pwsan.com>
Subject: Re: [PATCH] OMAP: Store reboot mode in scratchpad on OMAP34xx
Date: Mon, 09 Mar 2009 10:50:51 -0700 [thread overview]
Message-ID: <8763iizitg.fsf@deeprootsystems.com> (raw)
In-Reply-To: <20090309172140.GF7329@atomide.com> (Tony Lindgren's message of "Mon\, 9 Mar 2009 10\:21\:40 -0700")
Tony Lindgren <tony@atomide.com> writes:
> * Juha Yrjola <juha.yrjola@solidboot.com> [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@solidboot.com>
>> ---
>> 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?
>
Looks ok to me.
Maybe just a brief description of this scratchpad location is reserved.
Is there a boot ROM doc that could be referenced?
Any interactions with bootrom are a bit of black magic, so I like there to be
as much description as possible.
Kevin
next prev parent reply other threads:[~2009-03-09 17:50 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-03-08 17:20 [PATCH] OMAP: Store reboot mode in scratchpad on OMAP34xx Juha Yrjola
2009-03-09 17:21 ` Tony Lindgren
2009-03-09 17:50 ` Kevin Hilman [this message]
2009-03-09 18:08 ` Juha Yrjola
2009-03-09 18:25 ` Kevin Hilman
2009-03-12 7:57 ` Paul Walmsley
2009-08-13 12:51 ` Kevin Hilman
2009-08-13 12:54 ` Paul Walmsley
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=8763iizitg.fsf@deeprootsystems.com \
--to=khilman@deeprootsystems.com \
--cc=juha.yrjola@solidboot.com \
--cc=linux-omap@vger.kernel.org \
--cc=paul@pwsan.com \
--cc=tony@atomide.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox