From: Stefano Babic <sbabic@denx.de>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH V3 1/2] MX5: factor out boot cause funciton to common code
Date: Wed, 20 Apr 2011 11:54:45 +0200 [thread overview]
Message-ID: <4DAEAD65.4060707@denx.de> (raw)
In-Reply-To: <m2d3kj3oiy.fsf@ohwell.denx.de>
On 04/18/2011 11:19 AM, Detlev Zundel wrote:
> Hi Stefano,
>
>> On 04/15/2011 02:47 PM, Fabio Estevam wrote:
>>>> +char *get_reset_cause(void)
>>>> +{
>>>> + u32 cause;
>>>> + struct src *src_regs = (struct src
>>>> *)SRC_BASE_ADDR;
>>>> +
>>>> + cause = readl(&src_regs->srsr);
>>>
>>> You need to mask the 7 LSB of SRSR register.
>>>
>>> If you don?t bit 16 can still affect its result.
>>
>> Why ? As this becomes a general function for i.MX5, should we not
>> provide a way to check all significant bits ? Why should we exclude the
>> "warm boot" bit to be checked and printed out ?
>
> And _please_ (as indictated in my i.MX31 mail) use the code for _all_
> iMX51 boards withoput the need for them to call a function and print the
> result.
Jason,
I noted only now that this comment was not directly addressed to you,
but it is related to your patch. As you see for the i.MX31, the result
of the discussion was to call the get_reset_cause() inside the
print_cpuinfo() function, to make automatically this function available
for all MX5 boards.
Regards,
Stefano
--
=====================================================================
DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: +49-8142-66989-0 Fax: +49-8142-66989-80 Email: office at denx.de
=====================================================================
next prev parent reply other threads:[~2011-04-20 9:54 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-04-15 7:08 [U-Boot] [PATCH V3 1/2] MX5: factor out boot cause funciton to common code Jason Liu
2011-04-15 12:47 ` Fabio Estevam
2011-04-15 18:35 ` Stefano Babic
2011-04-18 9:19 ` Detlev Zundel
2011-04-20 9:54 ` Stefano Babic [this message]
2011-04-20 10:50 ` Jason Liu
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=4DAEAD65.4060707@denx.de \
--to=sbabic@denx.de \
--cc=u-boot@lists.denx.de \
/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