mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Florian Fainelli <ffainelli@freebox.fr>
To: bigeasy@linutronix.de
Cc: linux-kernel@vger.kernel.org, x86@vger.kernel.org,
	mbizon@freebox.fr, Florian Fainelli <ffainelli@freebox.fr>,
	Thomas Gleixner <tglx@linutronix.de>,
	Ingo Molnar <mingo@redhat.com>, "H. Peter Anvin" <hpa@zytor.com>,
	x86@kernel.org, Zhang Rui <rui.zhang@intel.com>,
	Alan Cox <alan@linux.intel.com>
Subject: [PATCH 1/3] x86: ce4100: implement pm_poweroff
Date: Fri, 19 Oct 2012 13:51:54 +0200	[thread overview]
Message-ID: <1350647516-4842-2-git-send-email-ffainelli@freebox.fr> (raw)
In-Reply-To: <1350647516-4842-1-git-send-email-ffainelli@freebox.fr>

The CE4100 platform is currently missing a proper pm_poweroff implementation
leading to poweroff making the CPU spin forever and the CE4100 platform does
not enter a low-power mode where the external Power Management Unit can
properly power off the system. Power off on this platform is implemented pretty
much like reboot, by writing to the SoC built-in 8051 microcontroller mapped at
I/O port 0xcf9, the value 0x4.

Signed-off-by: Florian Fainelli <ffainelli@freebox.fr>
---
 arch/x86/platform/ce4100/ce4100.c |    7 +++++++
 1 file changed, 7 insertions(+)

diff --git a/arch/x86/platform/ce4100/ce4100.c b/arch/x86/platform/ce4100/ce4100.c
index 4c61b52..74f8774 100644
--- a/arch/x86/platform/ce4100/ce4100.c
+++ b/arch/x86/platform/ce4100/ce4100.c
@@ -27,6 +27,11 @@ static int ce4100_i8042_detect(void)
 	return 0;
 }
 
+static void ce4100_power_off(void)
+{
+	outb(0x4, 0xcf9);
+}
+
 #ifdef CONFIG_SERIAL_8250
 
 static unsigned int mem_serial_in(struct uart_port *p, int offset)
@@ -143,4 +148,6 @@ void __init x86_ce4100_early_setup(void)
 	x86_init.pci.init_irq = sdv_pci_init;
 	x86_init.mpparse.setup_ioapic_ids = setup_ioapic_ids_from_mpc_nocheck;
 #endif
+
+	pm_power_off = ce4100_power_off;
 }
-- 
1.7.9.5


  reply	other threads:[~2012-10-19 11:53 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-10-19 11:51 [PATCH 0/3] x86: ce4100: various fixes Florian Fainelli
2012-10-19 11:51 ` Florian Fainelli [this message]
2012-10-19 11:51 ` [PATCH 2/3] x86: ce4100: force reboot method to be KBD Florian Fainelli
2012-10-19 11:51 ` [PATCH 3/3] x86: ce4100: fixup PCI configuration register access for devices without interrupts Florian Fainelli
2012-10-26 15:49   ` Sebastian Andrzej Siewior
2012-10-26  9:05 [PATCH 0/3] x86: ce4100 fixes and improvements Florian Fainelli
2012-10-26  9:05 ` [PATCH 1/3] x86: ce4100: implement pm_poweroff Florian Fainelli
2012-10-26  9:30   ` Ingo Molnar

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=1350647516-4842-2-git-send-email-ffainelli@freebox.fr \
    --to=ffainelli@freebox.fr \
    --cc=alan@linux.intel.com \
    --cc=bigeasy@linutronix.de \
    --cc=hpa@zytor.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mbizon@freebox.fr \
    --cc=mingo@redhat.com \
    --cc=rui.zhang@intel.com \
    --cc=tglx@linutronix.de \
    --cc=x86@kernel.org \
    --cc=x86@vger.kernel.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

all inboxes | Powered by JetHome®