public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
From: Detlev Zundel <dzu@denx.de>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH v3 2/3] MX31: Introduce get_reset_cause()
Date: Mon, 18 Apr 2011 11:02:50 +0200	[thread overview]
Message-ID: <m2hb9w2apx.fsf@ohwell.denx.de> (raw)
In-Reply-To: <4DA88BF0.6020801@denx.de> (Stefano Babic's message of "Fri, 15 Apr 2011 20:18:24 +0200")

Hi Fabio and Stefan,

> On 04/15/2011 04:21 AM, Fabio Estevam wrote:
>> Introduce get_reset_cause() function to indicate the source of the reset.
>> 
>> Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
>> ---
>>  arch/arm/cpu/arm1136/mx31/generic.c       |   26 ++++++++++++++++++++++++++
>>  arch/arm/include/asm/arch-mx31/imx-regs.h |    2 ++
>>  2 files changed, 28 insertions(+), 0 deletions(-)
>> 
>
> Hi Fabio,
>
>> diff --git a/arch/arm/include/asm/arch-mx31/imx-regs.h
>> b/arch/arm/include/asm/arch-mx31/imx-regs.h
>> index 74444f2..2b0881d 100644
>> --- a/arch/arm/include/asm/arch-mx31/imx-regs.h
>> +++ b/arch/arm/include/asm/arch-mx31/imx-regs.h
>> @@ -27,6 +27,8 @@
>>  #if !(defined(__KERNEL_STRICT_NAMES) || defined(__ASSEMBLY__))
>>  #include <asm/types.h>
>>  
>> +extern char *get_reset_cause(void);
>> +
>
> The imx-regs.h contains only defines and structures for the processor,
> and no prototypes. Function prototypes are then listed in sys_proto.h,
> not only for i.MX processor. I prefer to maintain this rule and to not
> add prototypes to this file.

Why can't we have this code in the cpu specific code _without_ any call
from a board so _ecery_ board gets the additional information for free?

See for example arch/powerpc/cpu/mpc512x/cpu.c where this is done for
RSR on 5121.  I do not understand what the problem is here, can someone
enlighten me please?

Cheers
  Detlev

-- 
The X approach to device independence is to treat everything like a MicroVAX
framebuffer on acid.
                                          -- The UNIX Haters Handbook
--
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

      reply	other threads:[~2011-04-18  9:02 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-04-15  2:21 [U-Boot] [PATCH v3 1/3] ARM: MX31: Fix file name label Fabio Estevam
2011-04-15  2:21 ` [U-Boot] [PATCH v3 2/3] MX31: Introduce get_reset_cause() Fabio Estevam
2011-04-15  2:21   ` [U-Boot] [PATCH v3 3/3] MX31: mx31pdk: Print the cause of reset Fabio Estevam
2011-04-15 18:18   ` [U-Boot] [PATCH v3 2/3] MX31: Introduce get_reset_cause() Stefano Babic
2011-04-18  9:02     ` Detlev Zundel [this message]

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=m2hb9w2apx.fsf@ohwell.denx.de \
    --to=dzu@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