powerpc/powernv: Add support for powercap framework

Adds a generic powercap framework to change the system powercap
inband through OPAL-OCC command/response interface.

Signed-off-by: Shilpasri G Bhat <shilpa.bhat@linux.vnet.ibm.com>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
This commit is contained in:
Shilpasri G Bhat
2017-08-10 09:01:18 +05:30
committed by Michael Ellerman
parent a70a0b9f44
commit cb8b340de2
7 changed files with 290 additions and 1 deletions

View File

@@ -275,6 +275,9 @@ int64_t opal_imc_counters_init(uint32_t type, uint64_t address,
int64_t opal_imc_counters_start(uint32_t type, uint64_t cpu_pir);
int64_t opal_imc_counters_stop(uint32_t type, uint64_t cpu_pir);
int opal_get_powercap(u32 handle, int token, u32 *pcap);
int opal_set_powercap(u32 handle, int token, u32 pcap);
/* Internal functions */
extern int early_init_dt_scan_opal(unsigned long node, const char *uname,
int depth, void *data);
@@ -352,6 +355,8 @@ static inline int opal_get_async_rc(struct opal_msg msg)
void opal_wake_poller(void);
void opal_powercap_init(void);
#endif /* __ASSEMBLY__ */
#endif /* _ASM_POWERPC_OPAL_H */