public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
* [U-Boot-Users] PATCH: Introducing CONFIG_BOARD_PRE_RESET
@ 2004-10-25 14:46 VanBaren, Gerald
  2004-10-25 15:02 ` [U-Boot-Users] PPC as host Richard Klingler
                   ` (2 more replies)
  0 siblings, 3 replies; 19+ messages in thread
From: VanBaren, Gerald @ 2004-10-25 14:46 UTC (permalink / raw)
  To: u-boot

> -----Original Message-----
> From: Steven Scholz [mailto:steven.scholz at imc-berlin.de]
> Sent: Monday, October 25, 2004 10:40 AM
> To: VanBaren, Gerald (AGRE)
> Cc: u-boot-users
> Subject: Re: [U-Boot-Users] PATCH: Introducing CONFIG_BOARD_PRE_RESET
>
> Hi Gerald,
>
> > I like your suggestion a lot, but I would suggest a "#ifdef" around
> > the common.h kind of like I hand-pasted in below (probably
> > incorrectly, but you get my meaning).
>
> >  int board_postclk_init (void);
> >  int board_early_init_r (void);
> >  void board_poweroff (void);
> > +#ifdef CONFIG_BOARD_PRE_RESET
> > +void board_pre_reset (void);
> > +#endif
>
> Since functions like board_postclk_init and
> board_early_init_r etc. don't have an #ifdef I decided to go
> the same way.
>
> Do you see any problems without #ifdef ?
>
> --
> Steven Scholz

The reason I suggested the #ifdef is because the actual code
implementation is surrounded by the #ifdef so, if you don't have
CONFIG_BOARD_PRE_RESET defined, you will have a declaration of
board_pre_reset() but no code implementing it.  I forgot off-hand if
this is a problem, but I think it is (too lazy to be a language lawyer
at the moment).

gvb

******************************************
The following messages are brought to you by the Lawyers' League of
IdioSpeak:

******************************************
The information contained in, or attached to, this e-mail, may contain confidential information and is intended solely for the use of the individual or entity to whom they are addressed and may be subject to legal privilege.  If you have received this e-mail in error you should notify the sender immediately by reply e-mail, delete the message from your system and notify your system manager.  Please do not copy it for any purpose, or disclose its contents to any other person.  The views or opinions presented in this e-mail are solely those of the author and do not necessarily represent those of the company.  The recipient should check this e-mail and any attachments for the presence of viruses.  The company accepts no liability for any damage caused, directly or indirectly, by any virus transmitted in this email.
******************************************

^ permalink raw reply	[flat|nested] 19+ messages in thread
* [U-Boot-Users] PATCH: Introducing CONFIG_BOARD_PRE_RESET
@ 2004-10-25 14:36 VanBaren, Gerald
  2004-10-25 14:39 ` Steven Scholz
  0 siblings, 1 reply; 19+ messages in thread
From: VanBaren, Gerald @ 2004-10-25 14:36 UTC (permalink / raw)
  To: u-boot

> -----Original Message-----
> From: u-boot-users-admin at lists.sourceforge.net
> [mailto:u-boot-users-admin at lists.sourceforge.net] On Behalf
> Of Steven Scholz
> Sent: Monday, October 25, 2004 10:28 AM
> To: u-boot-users
> Subject: [U-Boot-Users] PATCH: Introducing CONFIG_BOARD_PRE_RESET
>
> Hi there,
>
> as mentioned on list before some boards/cpus might need some
> extra code to be executed _before_ rebooting. E.g. the i.MX
> hangs when doing "reset" while the LCD controller is still enabled.
>
> That is why I'd like to introduce CONFIG_BOARD_PRE_RESET and
> board_pre_reset().
> The attached does exactly that. But only for cpu/arm920t.
> If wished I'll add the appropriate code to all cpu/$(CPU)/cpu.c files.
>
> * Patch by Steven Scholz, 25 Oct 2004:
>    - Introducing CONFIG_BOARD_PRE_RESET and board_pre_reset() to allow
>      code to be executed before actually rebooting
>
> --
> Steven Scholz


Hi Steven,

I like your suggestion a lot, but I would suggest a "#ifdef" around the
common.h kind of like I hand-pasted in below (probably incorrectly, but
you get my meaning).

gvb


Index: include/common.h
===================================================================
RCS file: /cvsroot/u-boot/u-boot/include/common.h,v
retrieving revision 1.46
diff -p -u -r1.46 common.h
--- include/common.h	10 Oct 2004 18:41:14 -0000	1.46
+++ include/common.h	25 Oct 2004 13:32:15 -0000
@@ -318,6 +318,9 @@ int board_late_init (void);
 int board_postclk_init (void); /* after clocks/timebase, before
env/serial */
 int board_early_init_r (void);
 void board_poweroff (void);
+#ifdef CONFIG_BOARD_PRE_RESET
+void board_pre_reset (void);
+#endif

 #if defined(CFG_DRAM_TEST)
 int testdram(void);



******************************************
The following messages are brought to you by the Lawyers' League of
IdioSpeak:

******************************************
The information contained in, or attached to, this e-mail, may contain confidential information and is intended solely for the use of the individual or entity to whom they are addressed and may be subject to legal privilege.  If you have received this e-mail in error you should notify the sender immediately by reply e-mail, delete the message from your system and notify your system manager.  Please do not copy it for any purpose, or disclose its contents to any other person.  The views or opinions presented in this e-mail are solely those of the author and do not necessarily represent those of the company.  The recipient should check this e-mail and any attachments for the presence of viruses.  The company accepts no liability for any damage caused, directly or indirectly, by any virus transmitted in this email.
******************************************

^ permalink raw reply	[flat|nested] 19+ messages in thread
* [U-Boot-Users] PATCH: Introducing CONFIG_BOARD_PRE_RESET
@ 2004-10-25 14:27 Steven Scholz
  2004-10-25 18:05 ` Wolfgang Denk
  2004-11-23 14:18 ` Steven Scholz
  0 siblings, 2 replies; 19+ messages in thread
From: Steven Scholz @ 2004-10-25 14:27 UTC (permalink / raw)
  To: u-boot

Hi there,

as mentioned on list before some boards/cpus might need some extra code to be 
executed _before_ rebooting. E.g. the i.MX hangs when doing "reset" while the 
LCD controller is still enabled.

That is why I'd like to introduce CONFIG_BOARD_PRE_RESET and board_pre_reset().
The attached does exactly that. But only for cpu/arm920t.
If wished I'll add the appropriate code to all cpu/$(CPU)/cpu.c files.

* Patch by Steven Scholz, 25 Oct 2004:
   - Introducing CONFIG_BOARD_PRE_RESET and board_pre_reset() to allow
     code to be executed before actually rebooting

-- 
Steven Scholz

-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: board_pre_reset.patch
Url: http://lists.denx.de/pipermail/u-boot/attachments/20041025/a2a33314/attachment.txt 

^ permalink raw reply	[flat|nested] 19+ messages in thread

end of thread, other threads:[~2004-11-23 17:20 UTC | newest]

Thread overview: 19+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2004-10-25 14:46 [U-Boot-Users] PATCH: Introducing CONFIG_BOARD_PRE_RESET VanBaren, Gerald
2004-10-25 15:02 ` [U-Boot-Users] PPC as host Richard Klingler
2004-10-25 17:57   ` Wolfgang Denk
2004-10-25 15:12 ` [U-Boot-Users] PATCH: Introducing CONFIG_BOARD_PRE_RESET Steven Scholz
2004-10-25 18:01 ` Wolfgang Denk
  -- strict thread matches above, loose matches on Subject: below --
2004-10-25 14:36 VanBaren, Gerald
2004-10-25 14:39 ` Steven Scholz
2004-10-25 14:27 Steven Scholz
2004-10-25 18:05 ` Wolfgang Denk
2004-10-26  7:06   ` Steven Scholz
2004-10-26  8:25     ` Wolfgang Denk
2004-10-26  8:32       ` Steven Scholz
2004-10-28  7:36         ` Steven Scholz
2004-11-23 14:18 ` Steven Scholz
2004-11-23 15:41   ` Wolfgang Denk
2004-11-23 15:48     ` Steven Scholz
2004-11-23 16:47       ` Wolfgang Denk
2004-11-23 16:54         ` Steven Scholz
2004-11-23 17:20           ` Wolfgang Denk

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox