[PATCH] [5/9] pasemi: Implement restart
Kumar Gala
galak at kernel.crashing.org
Fri Feb 2 17:07:42 EST 2007
On Feb 1, 2007, at 10:54 PM, Olof Johansson wrote:
> Implement reset on platforms/pasemi. Default is just to reset the
> cpu using the SDC registers.
>
> Signed-off-by: Olof Johansson <olof at 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
> @@ -42,19 +42,13 @@
>
> 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 pas_halt(void)
> -{
> - pas_power_off();
> + void __iomem *sdcreg;
> + printk("Restarting...\n");
> + /* XXXOJN This should maybe come out of the device tree */
> + sdcreg = ioremap(0xfc101100, 4);
You can't do the ioremap here, restart may get call an oops from
interrupt context.
> + while (1)
> + out_le32(sdcreg, 0x6000000);
> + /* No need to iounmap; never coming back */
> }
>
> #ifdef CONFIG_SMP
> @@ -220,8 +214,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,
>
> --
>
> _______________________________________________
> Linuxppc-dev mailing list
> Linuxppc-dev at ozlabs.org
> https://ozlabs.org/mailman/listinfo/linuxppc-dev
More information about the Linuxppc-dev
mailing list