All of lore.kernel.org
 help / color / mirror / Atom feed
* [U-Boot] [PATCH] add reboot as a synonym for reset
@ 2008-09-08 18:11 Andrew Dyer
  2008-09-08 18:43 ` Wolfgang Denk
  0 siblings, 1 reply; 4+ messages in thread
From: Andrew Dyer @ 2008-09-08 18:11 UTC (permalink / raw)
  To: u-boot

Add 'reboot' as a synonym for 'reset' at the u-boot command line.

This saves me confusion when switching back and forth between linux
and u-boot about which command to use by making u-boot accept both.

Signed-off-by: Andrew Dyer <adyer@righthandtech.com>
---
 common/cmd_boot.c |    6 ++++++
 1 files changed, 6 insertions(+), 0 deletions(-)

diff --git a/common/cmd_boot.c b/common/cmd_boot.c
index d83f5af..644bb85 100644
--- a/common/cmd_boot.c
+++ b/common/cmd_boot.c
@@ -76,3 +76,9 @@ U_BOOT_CMD(
 	"reset   - Perform RESET of the CPU\n",
 	NULL
 );
+
+U_BOOT_CMD(
+	reboot, 1, 0,	do_reset,
+	"reboot  - Perform RESET of the CPU\n",
+	NULL
+);
-- 
1.5.4.3

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

* [U-Boot] [PATCH] add reboot as a synonym for reset
  2008-09-08 18:11 [U-Boot] [PATCH] add reboot as a synonym for reset Andrew Dyer
@ 2008-09-08 18:43 ` Wolfgang Denk
  2008-09-08 19:33   ` Andrew Dyer
  0 siblings, 1 reply; 4+ messages in thread
From: Wolfgang Denk @ 2008-09-08 18:43 UTC (permalink / raw)
  To: u-boot

Dear Andrew Dyer,

In message <48C56AEA.8040706@righthandtech.com> you wrote:
> Add 'reboot' as a synonym for 'reset' at the u-boot command line.

I tend to reject this change, because I think it is  actually  wrong.
'reboot'  and  'reset' are two different things - the former includes
an ordered shut-down  of  running  services  while  the  latter  just
performs what the name says: a hardware reset.

This is a difference which some may consider small, but I think it is
important enough not to confuse terminology.

Best regards,

Wolfgang Denk

-- 
DENX Software Engineering GmbH,     MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de
It's hard to make a program foolproof because fools are so ingenious.

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

* [U-Boot] [PATCH] add reboot as a synonym for reset
  2008-09-08 18:43 ` Wolfgang Denk
@ 2008-09-08 19:33   ` Andrew Dyer
  2008-09-08 20:58     ` Wolfgang Denk
  0 siblings, 1 reply; 4+ messages in thread
From: Andrew Dyer @ 2008-09-08 19:33 UTC (permalink / raw)
  To: u-boot

On Mon, Sep 8, 2008 at 1:43 PM, Wolfgang Denk <wd@denx.de> wrote:
> Dear Andrew Dyer,
>
> In message <48C56AEA.8040706@righthandtech.com> you wrote:
>> Add 'reboot' as a synonym for 'reset' at the u-boot command line.
>
> I tend to reject this change, because I think it is  actually  wrong.
> 'reboot'  and  'reset' are two different things - the former includes
> an ordered shut-down  of  running  services  while  the  latter  just
> performs what the name says: a hardware reset.

I'm fine with your decision, it was just a convenience for me, so I'll
keep it in my local tree, but I would ask in the context of u-boot
where there are essentially no 'services' or state that needs to be
saved, what's the real difference?

For a hypothetical do_reboot(), I suppose one could extract some of
the code of do_bootm() (shut off interrupts, usb, maybe caches) into a
common function, run an optional platform hook and then do_reset(),
but it doesn't seem like it would make much difference for the vast
majority of cases, once the hardware reset comes through.

-- 
Hardware, n.:
 The parts of a computer system that can be kicked.

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

* [U-Boot] [PATCH] add reboot as a synonym for reset
  2008-09-08 19:33   ` Andrew Dyer
@ 2008-09-08 20:58     ` Wolfgang Denk
  0 siblings, 0 replies; 4+ messages in thread
From: Wolfgang Denk @ 2008-09-08 20:58 UTC (permalink / raw)
  To: u-boot

Dear Andrew,

In message <c166aa9f0809081233h10233eaeod842bdda90282a57@mail.gmail.com> you wrote:
> 
> I'm fine with your decision, it was just a convenience for me, so I'll
> keep it in my local tree, but I would ask in the context of u-boot
> where there are essentially no 'services' or state that needs to be
> saved, what's the real difference?

For U-Boot,it makes no difference. The problem is  with  Linux,  when
you get used to using an incorrect or at least imprecise terminology.
When  I ask: "Is it OK to reset the server?" that is pretty different
from "Is it OK to reboot the server?".

My motivation was purely educational :-)

Best regards,

Wolfgang Denk

-- 
DENX Software Engineering GmbH,     MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de
...when fits of creativity run strong, more than  one  programmer  or
writer  has  been  known to abandon the desktop for the more spacious
floor.                                             - Fred Brooks, Jr.

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

end of thread, other threads:[~2008-09-08 20:58 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2008-09-08 18:11 [U-Boot] [PATCH] add reboot as a synonym for reset Andrew Dyer
2008-09-08 18:43 ` Wolfgang Denk
2008-09-08 19:33   ` Andrew Dyer
2008-09-08 20:58     ` Wolfgang Denk

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.