public inbox for linuxppc-dev@ozlabs.org 
 help / color / mirror / Atom feed
From: Olof Johansson <olof@lixom•net>
To: Paul Mackerras <paulus@samba•org>
Cc: linuxppc-dev@ozlabs•org
Subject: [PATCH] [v2] [4/8] pasemi: Implement restart
Date: Sun, 04 Feb 2007 16:36:52 -0600	[thread overview]
Message-ID: <20070204223752.761620000@lixom.net> (raw)
In-Reply-To: 20070204223648.767950000@lixom.net

Implement reset on platforms/pasemi. Default is just to reset the
cpu using the SDC registers.

Signed-off-by: Olof Johansson <olof@lixom•net>


Index: merge/arch/powerpc/platforms/pasemi/setup.c
===================================================================
--- merge.orig/arch/powerpc/platforms/pasemi/setup.c
+++ merge/arch/powerpc/platforms/pasemi/setup.c
@@ -38,21 +38,13 @@
 
 #include "pasemi.h"
 
-static void pas_restart(char *cmd)
-{
-	printk("restart unimplemented, looping...\n");
-	for (;;) ;
-}
-
-static void pas_power_off(void)
-{
-	printk("power off unimplemented, looping...\n");
-	for (;;) ;
-}
+static void __iomem *reset_reg;
 
-static void pas_halt(void)
+static void pas_restart(char *cmd)
 {
-	pas_power_off();
+	printk("Restarting...\n");
+	while (1)
+		out_le32(reset_reg, 0x6000000);
 }
 
 #ifdef CONFIG_SMP
@@ -82,6 +74,10 @@ void __init pas_setup_arch(void)
 	conswitchp = &dummy_con;
 #endif
 
+	/* Remap SDC register for doing reset */
+	/* XXXOJN This should maybe come out of the device tree */
+	reset_reg = ioremap(0xfc101100, 4);
+
 	pasemi_idle_init();
 }
 
@@ -210,8 +206,6 @@ define_machine(pas) {
 	.init_IRQ		= pas_init_IRQ,
 	.get_irq		= mpic_get_irq,
 	.restart		= pas_restart,
-	.power_off		= pas_power_off,
-	.halt			= pas_halt,
 	.get_boot_time		= pas_get_boot_time,
 	.calibrate_decr		= generic_calibrate_decr,
 	.check_legacy_ioport    = pas_check_legacy_ioport,

--

  parent reply	other threads:[~2007-02-04 22:41 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-02-04 22:36 [PATCH] [v2] [0/8] PA Semi patches Olof Johansson
2007-02-04 22:36 ` [PATCH] [v2] [1/8] pasemi: UART udbg support Olof Johansson
2007-02-04 22:36 ` [PATCH] [v2] [2/8] pasemi: Machine check handler Olof Johansson
2007-02-04 22:36 ` [PATCH] [v2] [3/8] pasemi: Idle loops Olof Johansson
2007-02-06 12:56   ` Arnd Bergmann
2007-02-06 15:09     ` Olof Johansson
2007-02-04 22:36 ` Olof Johansson [this message]
2007-02-04 22:36 ` [PATCH] [v2] [5/8] pasemi: SMP timebase sync Olof Johansson
2007-02-04 22:36 ` [PATCH] [v2] [6/8] pasemi: Configure DMA controller interrupts Olof Johansson
2007-02-04 22:36 ` [PATCH] [v2] [7/8] pasemi: iommu support Olof Johansson
2007-02-04 22:36 ` [PATCH] [v2] [8/8] pasemi: defconfig Olof Johansson

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=20070204223752.761620000@lixom.net \
    --to=olof@lixom$(echo .)net \
    --cc=linuxppc-dev@ozlabs$(echo .)org \
    --cc=paulus@samba$(echo .)org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html
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