mirror of
https://github.com/AuxXxilium/linux_dsm_epyc7002.git
synced 2024-12-26 17:45:12 +07:00
e790f1deb2
This patch adds support for the Power State Coordination Interface defined by ARM, allowing Linux to request CPU-centric power-management operations from firmware implementing the PSCI protocol. Signed-off-by: Will Deacon <will.deacon@arm.com> [Marc: s/u32/u64/ in the relevant spots, and switch from an initcall to an simpler init function] Signed-off-by: Marc Zyngier <marc.zyngier@arm.com> Signed-off-by: Catalin Marinas <catalin.marinas@arm.com>
39 lines
1.0 KiB
C
39 lines
1.0 KiB
C
/*
|
|
* This program is free software; you can redistribute it and/or modify
|
|
* it under the terms of the GNU General Public License version 2 as
|
|
* published by the Free Software Foundation.
|
|
*
|
|
* This program is distributed in the hope that 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.
|
|
*
|
|
* Copyright (C) 2013 ARM Limited
|
|
*/
|
|
|
|
#ifndef __ASM_PSCI_H
|
|
#define __ASM_PSCI_H
|
|
|
|
#define PSCI_POWER_STATE_TYPE_STANDBY 0
|
|
#define PSCI_POWER_STATE_TYPE_POWER_DOWN 1
|
|
|
|
struct psci_power_state {
|
|
u16 id;
|
|
u8 type;
|
|
u8 affinity_level;
|
|
};
|
|
|
|
struct psci_operations {
|
|
int (*cpu_suspend)(struct psci_power_state state,
|
|
unsigned long entry_point);
|
|
int (*cpu_off)(struct psci_power_state state);
|
|
int (*cpu_on)(unsigned long cpuid, unsigned long entry_point);
|
|
int (*migrate)(unsigned long cpuid);
|
|
};
|
|
|
|
extern struct psci_operations psci_ops;
|
|
|
|
int psci_init(void);
|
|
|
|
#endif /* __ASM_PSCI_H */
|