public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
From: Mike Frysinger <vapier@gentoo.org>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH 01/21] Define new system_restart() and emergency_restart()
Date: Mon, 7 Mar 2011 17:10:26 -0500	[thread overview]
Message-ID: <201103071710.27638.vapier@gentoo.org> (raw)
In-Reply-To: <7F48B228-56B5-4DE7-B526-A0CD80DAA973@boeing.com>

On Monday, March 07, 2011 16:56:31 Moffett, Kyle D wrote:
> On Mar 07, 2011, at 16:40, Mike Frysinger wrote:
> > On Monday, March 07, 2011 12:37:22 Kyle Moffett wrote:
> >> +	udelay(50000);
> > 
> > this doesnt sit well with me.  i dont see why this matters ... we dont
> > have any delays today, and i dont think we should introduce any.
> 
> Actually, several architectures had a printf()+udelay() already.  (i386 and
> ARM, IIRC).  Since I was moving the printf() to common code I figured I'd
> better move the udelay() as well.
> 
> I believe they had comments to the effect of "This udelay() prevents
> garbage on the serial console while rebooting", I would guess because it
> gives the FIFO time to finish flushing.

Blackfin specifically does not do this.  personally, a half baked uart char is 
preferable to a (imo) useless hardcoded delay.  i wonder if they picked a 
number that seems to work, or actually calculated it based on the slowest baud 
times the deepest fifo times the extra bits (parity/stop/etc...).  i'd suspect 
the former which means this is even dumber.

> I can move it back to the individual architectures if you'd like.

if we cant agree to simply punt it, then yes, please do.  or make it a config 
option so board porters can opt out, and default it to on for only the 
existing arches.

> >> +__attribute__((__weak__))
> >> +int __board_restart(void)
> >> +{
> >> +	/* Fallthrough to architecture-specific code */
> >> +	return 0;
> >> +}
> >> +
> >> +__attribute__((__weak__))
> >> +int __arch_restart(void)
> >> +{
> >> +	/* Fallthrough to legacy do_reset() code */
> >> +	return 0;
> >> +}
> > 
> > what use is there in having a return value ?  the do_reset() funcs today
> > dont return, which means they have no meaningful reset value.
> 
> Well, actually, a surprising number of them *do* return (at least on some
> board ports).
> 
> In particular I'm doing this for a custom board of ours (HWW-1U-1A) which
> *must* synchronize with Linux firmware running on another physical
> processor prior to asserting the reset line, otherwise it probably won't
> boot up correctly.  Since the synchronization may take an arbitrary amount
> of time (IE: Waiting for the other Linux to finish initializing), my
> board's __board_restart() function checks for Ctrl-C on the serial
> console.  If I actually *do* get a Ctrl-C I need to prevent the
> __arch_restart() hook from being run, by returning an error code.

hrm, sounds dumb to me.  i guess we cant localize this though, and it isnt 
that much overhead, so i wont complain too much about the board part.

what about the arch hook ?
-mike
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 836 bytes
Desc: This is a digitally signed message part.
Url : http://lists.denx.de/pipermail/u-boot/attachments/20110307/7b54667e/attachment.pgp 

  reply	other threads:[~2011-03-07 22:10 UTC|newest]

Thread overview: 54+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-03-07 17:37 [U-Boot] [PATCH 0/21] Generic cross-architecture system restart support Kyle Moffett
2011-03-07 17:37 ` [U-Boot] [PATCH 01/21] Define new system_restart() and emergency_restart() Kyle Moffett
2011-03-07 21:40   ` Mike Frysinger
2011-03-07 21:56     ` Moffett, Kyle D
2011-03-07 22:10       ` Mike Frysinger [this message]
2011-03-07 23:09         ` Graeme Russ
2011-03-08  2:45           ` Mike Frysinger
2011-03-13 19:24   ` Wolfgang Denk
2011-03-14 16:23     ` Moffett, Kyle D
2011-03-14 18:59       ` Wolfgang Denk
2011-03-14 19:52         ` Moffett, Kyle D
2011-03-14 20:38           ` Wolfgang Denk
2011-03-14 21:20             ` Moffett, Kyle D
2011-03-14 22:01               ` Wolfgang Denk
2011-03-21 11:43                 ` Graeme Russ
2011-03-21 12:00                   ` Wolfgang Denk
2011-03-22 12:05                     ` Graeme Russ
2011-03-22 13:28                       ` Wolfgang Denk
2011-03-23  0:19                         ` Graeme Russ
2011-04-11 18:31                           ` Wolfgang Denk
2011-03-07 17:37 ` [U-Boot] [PATCH 02/21] Replace do_reset() calls with {system, emergency}_restart() Kyle Moffett
2011-03-07 17:37 ` [U-Boot] [PATCH 03/21] arm: Call "panic()" instead of "hang()" for div-by-zero Kyle Moffett
2011-03-07 17:37 ` [U-Boot] [PATCH 04/21] arm: Replace unnecessary bad_mode() with panic() Kyle Moffett
2011-03-07 17:37 ` [U-Boot] [PATCH 05/21] arm: cpux9k2: Remove unnecessary XF_do_reset assignment Kyle Moffett
2011-03-07 17:37 ` [U-Boot] [PATCH 06/21] arm: Rename nonstandard board_reset() as at91_board_reset() Kyle Moffett
2011-03-07 17:37 ` [U-Boot] [PATCH 07/21] arm: Generic system restart support Kyle Moffett
2011-03-07 17:37 ` [U-Boot] [PATCH 08/21] avr32: " Kyle Moffett
2011-03-07 17:37 ` [U-Boot] [PATCH 09/21] blackfin: Replace "bfin_reset_or_hang()" with "panic()" Kyle Moffett
2011-03-07 21:44   ` Mike Frysinger
2011-03-07 17:37 ` [U-Boot] [PATCH 10/21] blackfin: Generic system restart support Kyle Moffett
2011-03-07 17:37 ` [U-Boot] [PATCH 11/21] i386: " Kyle Moffett
2011-03-07 21:54   ` Graeme Russ
2011-03-07 22:06     ` Moffett, Kyle D
2011-03-07 22:26       ` Graeme Russ
2011-03-07 22:57         ` Moffett, Kyle D
2011-03-07 23:06           ` Graeme Russ
2011-03-07 17:37 ` [U-Boot] [PATCH 12/21] m68k: " Kyle Moffett
2011-03-07 17:37 ` [U-Boot] [PATCH 13/21] microblaze: " Kyle Moffett
2011-03-07 17:37 ` [U-Boot] [PATCH 14/21] mips: " Kyle Moffett
2011-03-07 17:37 ` [U-Boot] [PATCH 15/21] nios2: " Kyle Moffett
2011-03-09  0:13   ` Scott McNutt
2011-03-09  0:42     ` Moffett, Kyle D
2011-03-09  1:33       ` Scott McNutt
2011-03-07 17:37 ` [U-Boot] [PATCH 16/21] powerpc: " Kyle Moffett
2011-03-07 17:37 ` [U-Boot] [PATCH 17/21] sh: Unify duplicate reset code Kyle Moffett
2011-03-07 17:37 ` [U-Boot] [PATCH 18/21] sh: Generic system restart support Kyle Moffett
2011-03-07 17:37 ` [U-Boot] [PATCH 19/21] sparc: Unify duplicate reset code Kyle Moffett
2011-03-07 17:37 ` [U-Boot] [PATCH 20/21] sparc: Generic system restart support Kyle Moffett
2011-03-07 17:37 ` [U-Boot] [PATCH 21/21] Remove legacy do_reset() function Kyle Moffett
2011-03-07 21:55   ` Graeme Russ
2011-03-07 23:00     ` Moffett, Kyle D
2011-03-07 23:03       ` Graeme Russ
2011-03-07 21:44 ` [U-Boot] [PATCH 0/21] Generic cross-architecture system restart support Graeme Russ
2011-03-13 19:16 ` Wolfgang Denk

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=201103071710.27638.vapier@gentoo.org \
    --to=vapier@gentoo.org \
    --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