~ubuntu-branches/ubuntu/trusty/linux-armadaxp/trusty

« back to all changes in this revision

Viewing changes to include/linux/cpu_pm.h

  • Committer: Package Import Robot
  • Author(s): Michael Casadevall, Bryan Wu, Dann Frazier, Michael Casadeall
  • Date: 2012-03-10 15:00:54 UTC
  • mfrom: (1.1.1)
  • Revision ID: package-import@ubuntu.com-20120310150054-flugb39zon8vvgwe
Tags: 3.2.0-1600.1
[ Bryan Wu ]
* UBUNTU: import debian/debian.env and debian.armadaxp

[ Dann Frazier ]
* ARM: Armada XP: remove trailing '/' in dirnames in mvRules.mk

[ Michael Casadeall ]
* tools: add some tools for Marvell Armada XP processor
* kernel: timer tick hacking from Marvell
* kernel: Sheeva Errata: add delay on Sheeva when powering down
* net: add Marvell NFP netfilter
* net: socket and skb modifications made by Marvell
* miscdevice: add minor IDs for some Marvell Armada drivers
* fs: introduce memory pool for splice()
* video: EDID detection updates from Marvell Armada XP patchset
* video: backlight: add Marvell Dove LCD backlight driver
* video: display: add THS8200 display driver
* video: framebuffer: add Marvell Dove and Armada XP processor onchip LCD controller driver
* usbtest: add Interrupt transfer testing by Marvell Armada XP code
* usb: ehci: add support for Marvell EHCI controler
* tty/serial: 8250: add support for Marvell Armada XP processor and DeviceTree work
* rtc: add support for Marvell Armada XP onchip RTC controller
* net: pppoe: add Marvell ethernet NFP hook in PPPoE networking driver
* mtd: nand: add support for Marvell Armada XP Nand Flash Controller
* mtd: maps: add Marvell Armada XP specific map driver
* mmc: add support for Marvell Armada XP MMC/SD host controller
* i2c: add support for Marvell Armada XP onchip i2c bus controller
* hwmon: add Kconfig option for Armada XP onchip thermal sensor driver
* dmaengine: add Net DMA support for splice and update Marvell XOR DMA engine driver
* ata: add support for Marvell Armada XP SATA controller and update some quirks
* ARM: add Marvell Armada XP machine to mach-types
* ARM: oprofile: add support for Marvell PJ4B core
* ARM: mm: more ARMv6 switches for Marvell Armada XP
* ARM: remove static declaration to allow compilation
* ARM: alignment access fault trick
* ARM: mm: skip some fault fixing when run on NONE SMP ARMv6 mode during early abort event
* ARM: mm: add Marvell Sheeva CPU Architecture for PJ4B
* ARM: introduce optimized copy operation for Marvell Armada XP
* ARM: SAUCE: hardware breakpoint trick for Marvell Armada XP
* ARM: big endian and little endian tricks for Marvell Armada XP
* ARM: SAUCE: Add Marvell Armada XP build rules to arch/arm/kernel/Makefile
* ARM: vfp: add special handling for Marvell Armada XP
* ARM: add support for Marvell U-Boot
* ARM: add mv_controller_num for ARM PCI drivers
* ARM: add support for local PMUs, general SMP tweaks and cache flushing
* ARM: add Marvell device identifies in glue-proc.h
* ARM: add IPC driver support for Marvell platforms
* ARM: add DMA mapping for Marvell platforms
* ARM: add Sheeva errata and PJ4B code for booting
* ARM: update Kconfig and Makefile to include Marvell Armada XP platforms
* ARM: Armada XP: import LSP from Marvell for Armada XP 3.2 kernel enablement

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/*
 
2
 * Copyright (C) 2011 Google, Inc.
 
3
 *
 
4
 * Author:
 
5
 *      Colin Cross <ccross@android.com>
 
6
 *
 
7
 * This software is licensed under the terms of the GNU General Public
 
8
 * License version 2, as published by the Free Software Foundation, and
 
9
 * may be copied, distributed, and modified under those terms.
 
10
 *
 
11
 * This program is distributed in the hope that it will be useful,
 
12
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 
13
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 
14
 * GNU General Public License for more details.
 
15
 *
 
16
 */
 
17
 
 
18
#ifndef _LINUX_CPU_PM_H
 
19
#define _LINUX_CPU_PM_H
 
20
 
 
21
#include <linux/kernel.h>
 
22
#include <linux/notifier.h>
 
23
 
 
24
/*
 
25
 * When a CPU goes to a low power state that turns off power to the CPU's
 
26
 * power domain, the contents of some blocks (floating point coprocessors,
 
27
 * interrupt controllers, caches, timers) in the same power domain can
 
28
 * be lost.  The cpm_pm notifiers provide a method for platform idle, suspend,
 
29
 * and hotplug implementations to notify the drivers for these blocks that
 
30
 * they may be reset.
 
31
 *
 
32
 * All cpu_pm notifications must be called with interrupts disabled.
 
33
 *
 
34
 * The notifications are split into two classes: CPU notifications and CPU
 
35
 * cluster notifications.
 
36
 *
 
37
 * CPU notifications apply to a single CPU and must be called on the affected
 
38
 * CPU.  They are used to save per-cpu context for affected blocks.
 
39
 *
 
40
 * CPU cluster notifications apply to all CPUs in a single power domain. They
 
41
 * are used to save any global context for affected blocks, and must be called
 
42
 * after all the CPUs in the power domain have been notified of the low power
 
43
 * state.
 
44
 */
 
45
 
 
46
/*
 
47
 * Event codes passed as unsigned long val to notifier calls
 
48
 */
 
49
enum cpu_pm_event {
 
50
        /* A single cpu is entering a low power state */
 
51
        CPU_PM_ENTER,
 
52
 
 
53
        /* A single cpu failed to enter a low power state */
 
54
        CPU_PM_ENTER_FAILED,
 
55
 
 
56
        /* A single cpu is exiting a low power state */
 
57
        CPU_PM_EXIT,
 
58
 
 
59
        /* A cpu power domain is entering a low power state */
 
60
        CPU_CLUSTER_PM_ENTER,
 
61
 
 
62
        /* A cpu power domain failed to enter a low power state */
 
63
        CPU_CLUSTER_PM_ENTER_FAILED,
 
64
 
 
65
        /* A cpu power domain is exiting a low power state */
 
66
        CPU_CLUSTER_PM_EXIT,
 
67
};
 
68
 
 
69
#ifdef CONFIG_CPU_PM
 
70
int cpu_pm_register_notifier(struct notifier_block *nb);
 
71
int cpu_pm_unregister_notifier(struct notifier_block *nb);
 
72
int cpu_pm_enter(void);
 
73
int cpu_pm_exit(void);
 
74
int cpu_cluster_pm_enter(void);
 
75
int cpu_cluster_pm_exit(void);
 
76
 
 
77
#else
 
78
 
 
79
static inline int cpu_pm_register_notifier(struct notifier_block *nb)
 
80
{
 
81
        return 0;
 
82
}
 
83
 
 
84
static inline int cpu_pm_unregister_notifier(struct notifier_block *nb)
 
85
{
 
86
        return 0;
 
87
}
 
88
 
 
89
static inline int cpu_pm_enter(void)
 
90
{
 
91
        return 0;
 
92
}
 
93
 
 
94
static inline int cpu_pm_exit(void)
 
95
{
 
96
        return 0;
 
97
}
 
98
 
 
99
static inline int cpu_cluster_pm_enter(void)
 
100
{
 
101
        return 0;
 
102
}
 
103
 
 
104
static inline int cpu_cluster_pm_exit(void)
 
105
{
 
106
        return 0;
 
107
}
 
108
#endif
 
109
#endif