public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Paul Mundt <lethal@linux-sh.org>
To: Adrian McMenamin <adrian@newgolddream.dyndns.info>
Cc: Adrian McMenamin <lkmladrian@gmail.com>,
	linux-kernel@vger.kernel.org, linuxsh-dev@lists.sourceforge.net
Subject: Re: Fwd: [PATCH] Reboot Dreamcast under software control
Date: Mon, 30 Jul 2007 08:25:54 +0900	[thread overview]
Message-ID: <20070729232554.GA21913@linux-sh.org> (raw)
In-Reply-To: <1185750331.23949.16.camel@localhost.localdomain>

On Mon, Jul 30, 2007 at 12:05:31AM +0100, Adrian McMenamin wrote:
> On Mon, 2007-07-30 at 07:50 +0900, Paul Mundt wrote:
> > On Sun, Jul 29, 2007 at 07:25:21PM +0100, Adrian McMenamin wrote:
> > > diff --git a/arch/sh/kernel/process.c b/arch/sh/kernel/process.c
> > > index 6334a4c..6f5e9e4 100644
> > > --- a/arch/sh/kernel/process.c
> > > +++ b/arch/sh/kernel/process.c
> > > @@ -97,6 +97,11 @@ void cpu_idle(void)
> > > 
> > >  void machine_restart(char * __unused)
> > >  {
> > > +
> > > +#ifdef CONFIG_SH_DREAMCAST
> > > +       /*reboot the Dreamcast under software control*/
> > > +       writel(0x00007611, 0xA05F6890);
> > > +#endif
> > >         /* SR.BL=1 and invoke address error to let CPU reset (manual reset) */
> > >         asm volatile("ldc %0, sr\n\t"
> > >                      "mov.l @%1, %0" : : "r" (0x10000000), "r" (0x80000001));
> > 
> > No, if you want to do this, at least use a function pointer and leave
> > this as the default implementation. The dreamcast presumably only needs
> > this magic write anyways, rather than the SR.BL trick.
> > 
> 
> Well, when I tested it, it did have a "return" in after the call and it
> worked - but I took that out as it looked like code bloat to me :)
> 
> Explain what you mean by using a function pointer and I'll do that.
> 
Look at the other implementations that are overloaded by the boards.
machine_power_off, the idle loop, etc.

      reply	other threads:[~2007-07-29 23:26 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-07-29 18:04 [PATCH] Reboot Dreamcast under software control Adrian McMenamin
2007-07-29 18:25 ` Fwd: " Adrian McMenamin
2007-07-29 22:50   ` Paul Mundt
2007-07-29 23:05     ` Adrian McMenamin
2007-07-29 23:25       ` Paul Mundt [this message]

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=20070729232554.GA21913@linux-sh.org \
    --to=lethal@linux-sh.org \
    --cc=adrian@newgolddream.dyndns.info \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linuxsh-dev@lists.sourceforge.net \
    --cc=lkmladrian@gmail.com \
    /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