LinuxPPC-Dev Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: "Sangmoon Kim" <dogoil@etinsys.com>
To: "'Kumar Gala'" <galak@kernel.crashing.org>
Cc: linuxppc-dev@ozlabs.org
Subject: RE: [PATCH] kvme080 board support patch
Date: Fri, 12 Jan 2007 10:45:15 +0900	[thread overview]
Message-ID: <200701120145.l0C1jc1x019343@jupiter.etinsys.com> (raw)
In-Reply-To: <6EAF2EA8-8414-4A4A-9A9A-44AA2FDC8B9D@kernel.crashing.org>

Hi,

> >
> > +static void
> > +kvme080_restart(char *cmd)
> > +{
> > +	unsigned long srr;
> > +
> > +	local_irq_disable();
> > +	asm volatile(
> > +	" lis %0,0xfff0\n \
> > +	  ori %0,%0,0x0100\n \
> > +	  mtspr 26,%0\n \
> > +	  sync\n \
> > +	  lis %0,0x0000\n \
> > +	  ori %0,%0,0x0000\n \
> > +	  mtspr 27,%0\n \
> > +	  sync\n \
> > +	  rfi "
> > +	  : "=r" (srr));
> > +}
> 
> Does this restart actually work for you?  Do you not have any issues with
devices being in a funny state and not actually being restated?

Actually we have some issues with some pci devices not properly initialized
when restarting.
Although it causes some delay, the board eventually boot.
I am considering to put a hardware reset function here.

> Also, you can do mtspr(SPRN_SRR0, val); mtspr(SPRN_SRR1, val); and then
the asm for the "rfi".

Thank you for the good comment.
I made the incremental patch.

Signed-off-by: Sangmoon Kim <dogoil@etinsys.com>

diff --git a/arch/powerpc/platforms/embedded6xx/kvme080.c
b/arch/powerpc/platforms/embedded6xx/kvme080.c
index 6f904ca..8da3464 100644
--- a/arch/powerpc/platforms/embedded6xx/kvme080.c
+++ b/arch/powerpc/platforms/embedded6xx/kvme080.c
@@ -130,20 +130,10 @@ kvme080_init_IRQ(void)
 static void
 kvme080_restart(char *cmd)
 {
-	unsigned long srr;
-
 	local_irq_disable();
-	asm volatile(
-	" lis %0,0xfff0\n \
-	  ori %0,%0,0x0100\n \
-	  mtspr 26,%0\n \
-	  sync\n \
-	  lis %0,0x0000\n \
-	  ori %0,%0,0x0000\n \
-	  mtspr 27,%0\n \
-	  sync\n \
-	  rfi "
-	  : "=r" (srr));
+	mtspr(SPRN_SRR0, 0xfff00100);
+	mtspr(SPRN_SRR1, 0x00000000);
+	asm volatile("rfi");
 }
 
 static void

Regards,
Sangmoon Kim

  reply	other threads:[~2007-01-12  1:45 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-01-11  6:26 [PATCH] kvme080 board support patch Sangmoon Kim
2007-01-11 14:21 ` Kumar Gala
2007-01-12  1:45   ` Sangmoon Kim [this message]
2007-01-15  5:31     ` Sangmoon Kim
2007-01-15  6:04       ` Sangmoon Kim

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=200701120145.l0C1jc1x019343@jupiter.etinsys.com \
    --to=dogoil@etinsys.com \
    --cc=galak@kernel.crashing.org \
    --cc=linuxppc-dev@ozlabs.org \
    /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