From: Nathan Lynch <ntl@pobox.com>
To: Michael Ellerman <michael@ellerman.id.au>
Cc: linuxppc-dev@ozlabs.org, Paul Mackerras <paulus@samba.org>
Subject: Re: [RFC/PATCH] Maple: Use RTAS power off methods if available
Date: Wed, 25 Oct 2006 08:58:53 -0500 [thread overview]
Message-ID: <20061025135853.GB5408@localdomain> (raw)
In-Reply-To: <20061025102823.CF83667BBC@ozlabs.org>
Michael Ellerman wrote:
>
> Index: powerpc/arch/powerpc/Kconfig
> ===================================================================
> --- powerpc.orig/arch/powerpc/Kconfig
> +++ powerpc/arch/powerpc/Kconfig
> @@ -422,6 +422,7 @@ config PPC_MAPLE
> select GENERIC_TBSYNC
> select PPC_UDBG_16550
> select PPC_970_NAP
> + select PPC_RTAS
> default n
> help
> This option enables support for the Maple 970FX Evaluation Board.
> Index: powerpc/arch/powerpc/platforms/maple/setup.c
> ===================================================================
> --- powerpc.orig/arch/powerpc/platforms/maple/setup.c
> +++ powerpc/arch/powerpc/platforms/maple/setup.c
> @@ -61,6 +61,7 @@
> #include <asm/lmb.h>
> #include <asm/mpic.h>
> #include <asm/udbg.h>
> +#include <asm/rtas.h>
>
> #include "maple.h"
>
> @@ -185,6 +186,26 @@ void __init maple_setup_arch(void)
> printk(KERN_DEBUG "Using native/NAP idle loop\n");
> }
>
> +static void __init maple_check_for_rtas_poweroff(void)
> +{
> +#ifdef CONFIG_PPC_RTAS
> + struct device_node *rtas;
> +
> + rtas = of_find_node_by_path("/rtas");
> + if (rtas) {
> + if (get_property(rtas, "system-reboot", NULL))
> + ppc_md.restart = rtas_restart;
> +
> + if (get_property(rtas, "power-off", NULL)) {
> + ppc_md.power_off = rtas_power_off;
> + ppc_md.halt = rtas_halt;
> + }
> +
> + of_node_put(rtas);
> + }
> +#endif
PPC_RTAS is selected in Kconfig, the ifdef isn't necessary.
prev parent reply other threads:[~2006-10-25 13:59 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-10-25 10:28 [RFC/PATCH] Maple: Use RTAS power off methods if available Michael Ellerman
2006-10-25 13:58 ` Nathan Lynch [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=20061025135853.GB5408@localdomain \
--to=ntl@pobox.com \
--cc=linuxppc-dev@ozlabs.org \
--cc=michael@ellerman.id.au \
--cc=paulus@samba.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;
as well as URLs for NNTP newsgroup(s).