blob: e297bf4abfcb8033e6bb770e8a70fa253de8c6e1 [file] [log] [blame]
Greg Kroah-Hartmanb2441312017-11-01 15:07:57 +01001/* SPDX-License-Identifier: GPL-2.0 */
Benjamin Herrenschmidt55190f82011-09-19 17:44:52 +00002#ifndef _POWERNV_H
3#define _POWERNV_H
4
Oliver O'Halloran8471c1d2020-08-04 10:54:06 +10005/*
6 * There's various hacks scattered throughout the generic powerpc arch code
7 * that needs to call into powernv platform stuff. The prototypes for those
8 * functions are in asm/powernv.h
9 */
10#include <asm/powernv.h>
11
Benjamin Herrenschmidt55190f82011-09-19 17:44:52 +000012#ifdef CONFIG_SMP
13extern void pnv_smp_init(void);
14#else
15static inline void pnv_smp_init(void) { }
16#endif
17
Nicholas Pigginb746e3e2017-07-19 16:59:10 +100018extern void pnv_platform_error_reboot(struct pt_regs *regs, const char *msg) __noreturn;
19
Benjamin Herrenschmidtcd15b042014-02-11 11:32:38 +110020struct pci_dev;
21
Benjamin Herrenschmidt61305a92011-09-19 17:45:05 +000022#ifdef CONFIG_PCI
23extern void pnv_pci_init(void);
Benjamin Herrenschmidt73ed1482013-05-10 16:59:18 +100024extern void pnv_pci_shutdown(void);
Benjamin Herrenschmidt61305a92011-09-19 17:45:05 +000025#else
26static inline void pnv_pci_init(void) { }
Benjamin Herrenschmidt73ed1482013-05-10 16:59:18 +100027static inline void pnv_pci_shutdown(void) { }
Benjamin Herrenschmidt61305a92011-09-19 17:45:05 +000028#endif
29
Shreyas B. Prabhu8eb8ac82014-12-10 00:26:51 +053030extern u32 pnv_get_supported_cpuidle_states(void);
31
Benjamin Herrenschmidt3fafe9c2013-07-15 13:03:11 +100032extern void pnv_lpc_init(void);
33
Nicholas Piggin56c0b482018-05-11 03:20:05 +100034extern void opal_handle_events(void);
35extern bool opal_have_pending_events(void);
Alistair Popple9f0fd042015-05-15 14:06:37 +100036extern void opal_event_shutdown(void);
37
Michael Ellermane2186022014-05-23 18:15:30 +100038bool cpu_core_split_required(void);
39
Claudio Carvalho68e0aa82019-08-28 23:05:21 +100040struct memcons;
41ssize_t memcons_copy(struct memcons *mc, char *to, loff_t pos, size_t count);
Nick Childe5913db2021-12-16 17:00:26 -050042u32 __init memcons_get_size(struct memcons *mc);
43struct memcons *__init memcons_init(struct device_node *node, const char *mc_prop_name);
Claudio Carvalho68e0aa82019-08-28 23:05:21 +100044
Benjamin Herrenschmidt55190f82011-09-19 17:44:52 +000045#endif /* _POWERNV_H */