public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
From: Richard Retanubun <RichardRetanubun@RuggedCom.com>
To: u-boot@lists.denx.de
Subject: [U-Boot] replacing do_reset with a custom one
Date: Fri, 23 Oct 2009 17:43:18 -0400	[thread overview]
Message-ID: <4AE22376.5050107@RuggedCom.com> (raw)

Greetings,

I am sorry if this has been asked before, It does not appear so on the mailing list archive.

I'd like to replace do_reset function with my own custom one, (i.e. resetting by not petting an external hw watchdog).

In previous discussion,
http://lists.denx.de/pipermail/u-boot/2007-January/018848.html

Wolfgang seems to favor creating a custom-board specific command (e.g. wdreset) and calling that
but If I do that, I have to replace all instances of do_reset that matters to my board.
It seems simpler to simply 'hijack and replace/enhance' the existing 'do_reset' to do my bidding.

Is there a recommended way of doing this? Any chance of adding something like this:

/cpu/$some-cpu/cpu.c

do_reset()
{

#ifdef CUSTOM_BOARD_RESET
	custom_board_reset();
#endif;

<normal do_reset command>
}

This way each board can define their own "call_custom_board" function.

Thanks for everyone's time

- Richard

             reply	other threads:[~2009-10-23 21:43 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-10-23 21:43 Richard Retanubun [this message]
2009-10-24  6:19 ` [U-Boot] replacing do_reset with a custom one Mike Frysinger
2009-10-26 18:44   ` Richard Retanubun
2009-10-26 20:50     ` Mike Frysinger

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=4AE22376.5050107@RuggedCom.com \
    --to=richardretanubun@ruggedcom.com \
    --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