[U-Boot-Users] PATCH: Introducing CONFIG_BOARD_PRE_RESET

VanBaren, Gerald (AGRE) Gerald.VanBaren at smiths-aerospace.com
Mon Oct 25 16:36:36 CEST 2004


> -----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.
******************************************




More information about the U-Boot mailing list