[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <1351242325-23724-2-git-send-email-ffainelli@freebox.fr>
Date: Fri, 26 Oct 2012 11:05:23 +0200
From: Florian Fainelli <ffainelli@...ebox.fr>
To: tglx@...utronix.de
Cc: mingo@...hat.com, x86@...nel.org, rui.zhang@...el.com,
alan@...ux.intel.com, linux-kernel@...r.kernel.org,
Florian Fainelli <ffainelli@...ebox.fr>
Subject: [PATCH 1/3] x86: ce4100: implement pm_poweroff
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@...ebox.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.10.4
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists