[U-Boot] [PATCH V3 1/2] MX5: factor out boot cause funciton to common code

Detlev Zundel dzu at denx.de
Mon Apr 18 11:19:17 CEST 2011


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.

Thanks!
  Detlev

-- 
Choosing which tool to use is a problem for most users. Therefore
when one tool came along that did everything Perl (Ugly) it took over.
                                    -- Rob Pike
--
DENX Software Engineering GmbH,      MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich,  Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-40 Fax: (+49)-8142-66989-80 Email: dzu at denx.de


More information about the U-Boot mailing list