X86 platform: New Intel Atom SOC power management controller driver
PATCH RESEND v3 1/3 X86 platform: New Intel Atom SOC power management controller driver
The Power Management Controller (PMC) controls many of the power management features present in the Atom SoC. This driver provides a native power off function via PMC PCI IO port.
On some ACPI hardware-reduced platforms(e.g. ASUS-T100), ACPI sleep registers are not valid so that (*pm_power_off)() is not hooked by acpi_power_off(). The power off function in this driver is installed only when pm_power_off is NULL.
--- arch/x86/Kconfig | 4 ++ arch/x86/include/asm/pmc_atom.h | 31 ++++++++++++ arch/x86/kernel/Makefile | 1 + arch/x86/kernel/pmc_atom.c | 104 +++++++++++++++++++++++++++++++++++++++ 4 files changed, 140 insertions(+) create mode 100644 arch/x86/include/asm/pmc_atom.h create mode 100644 arch/x86/kernel/pmc_atom.c
arch/x86/Kconfig +4 -0
@@ -2403,6 +2403,10 @@ config IOSF_MBI default m depends on PCI +config PMC_ATOM + def_bool y + depends on PCI + source "net/Kconfig" source "drivers/Kconfig"
arch/x86/include/asm/pmc_atom.h new file +31 -0
@@ -0,0 +1,31 @@ +/* +* Intel Atom SOC Power Management Controller Header File +* Copyright (c) 2014, Intel Corporation. +* +* This program is free software; you can redistribute it and/or modify it +* under the terms and conditions of the GNU General Public License, +* version 2, as published by the Free Software Foundation. +* +* This program is distributed in the hope it will be useful, but WITHOUT +* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or +* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for +* more details. +* +*/ + +#ifndef PMC_ATOM_H +#define PMC_ATOM_H + +/* ValleyView Power Control Unit PCI Device ID */ +#define PCI_DEVICE_ID_VLV_PMC 0x0F1C + +/* PMC I/O Registers */ +#define ACPI_BASE_ADDR_OFFSET 0x40 +#define ACPI_BASE_ADDR_MASK 0xFFFFFE00 +#define ACPI_MMIO_REG_LEN 0x100 + +#define PM1_CNT 0x4 +#define SLEEP_TYPE_MASK 0xFFFFECFF +#define SLEEP_TYPE_S5 0x1C00 +#define SLEEP_ENABLE 0x2000 +#endif /* PMC_ATOM_H */
arch/x86/kernel/Makefile +1 -0
@@ -106,6 +106,7 @@ obj-$(CONFIG_EFI) += sysfb_efi.o obj-$(CONFIG_PERF_EVENTS) += perf_regs.o obj-$(CONFIG_TRACING) += tracepoint.o obj-$(CONFIG_IOSF_MBI) += iosf_mbi.o +obj-$(CONFIG_PMC_ATOM) += pmc_atom.o ### # 64 bit specific files
arch/x86/kernel/pmc_atom.c new file +104 -0
104 lines not on this page · raw message
Signature · 1 line
1.7.10.4
tip-bot for Li, Aubrey
merge bot[tip:x86/platform] x86/platform: New Intel Atom SOC power management controller driver
x86/platform: New Intel Atom SOC power management controller driver
Commit-ID: 93e5eadd1f6e7f45c31aa327c42ac52e4df5ff6f Gitweb: http://git.kernel.org/tip/93e5eadd1f6e7f45c31aa327c42ac52e4df5ff6f Author: Li, Aubrey <[email protected]> AuthorDate: Mon, 30 Jun 2014 14:08:42 +0800 Committer: H. Peter Anvin <[email protected]> CommitDate: Fri, 25 Jul 2014 14:11:29 -0700
x86/platform: New Intel Atom SOC power management controller driver
The Power Management Controller (PMC) controls many of the power management features present in the Atom SoC. This driver provides a native power off function via PMC PCI IO port.
On some ACPI hardware-reduced platforms(e.g. ASUS-T100), ACPI sleep registers are not valid so that (*pm_power_off)() is not hooked by acpi_power_off(). The power off function in this driver is installed only when pm_power_off is NULL.
--- arch/x86/Kconfig | 4 ++ arch/x86/include/asm/pmc_atom.h | 31 ++++++++++++ arch/x86/kernel/Makefile | 1 + arch/x86/kernel/pmc_atom.c | 104 ++++++++++++++++++++++++++++++++++++++++ 4 files changed, 140 insertions(+)
arch/x86/Kconfig +4 -0
@@ -2403,6 +2403,10 @@ config IOSF_MBI default m depends on PCI +config PMC_ATOM + def_bool y + depends on PCI + source "net/Kconfig" source "drivers/Kconfig"
arch/x86/include/asm/pmc_atom.h new file +31 -0
@@ -0,0 +1,31 @@ +/* +* Intel Atom SOC Power Management Controller Header File +* Copyright (c) 2014, Intel Corporation. +* +* This program is free software; you can redistribute it and/or modify it +* under the terms and conditions of the GNU General Public License, +* version 2, as published by the Free Software Foundation. +* +* This program is distributed in the hope it will be useful, but WITHOUT +* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or +* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for +* more details. +* +*/ + +#ifndef PMC_ATOM_H +#define PMC_ATOM_H + +/* ValleyView Power Control Unit PCI Device ID */ +#define PCI_DEVICE_ID_VLV_PMC 0x0F1C + +/* PMC I/O Registers */ +#define ACPI_BASE_ADDR_OFFSET 0x40 +#define ACPI_BASE_ADDR_MASK 0xFFFFFE00 +#define ACPI_MMIO_REG_LEN 0x100 + +#define PM1_CNT 0x4 +#define SLEEP_TYPE_MASK 0xFFFFECFF +#define SLEEP_TYPE_S5 0x1C00 +#define SLEEP_ENABLE 0x2000 +#endif /* PMC_ATOM_H */
arch/x86/kernel/Makefile +1 -0
@@ -106,6 +106,7 @@ obj-$(CONFIG_EFI) += sysfb_efi.o obj-$(CONFIG_PERF_EVENTS) += perf_regs.o obj-$(CONFIG_TRACING) += tracepoint.o obj-$(CONFIG_IOSF_MBI) += iosf_mbi.o +obj-$(CONFIG_PMC_ATOM) += pmc_atom.o ### # 64 bit specific files
arch/x86/kernel/pmc_atom.c new file +104 -0
104 lines not on this page · raw message