Greg Kroah-Hartman | b244131 | 2017-11-01 15:07:57 +0100 | [diff] [blame] | 1 | /* SPDX-License-Identifier: GPL-2.0 */ |
Benjamin Herrenschmidt | 55190f8 | 2011-09-19 17:44:52 +0000 | [diff] [blame] | 2 | #ifndef _POWERNV_H |
| 3 | #define _POWERNV_H |
| 4 | |
Oliver O'Halloran | 8471c1d | 2020-08-04 10:54:06 +1000 | [diff] [blame] | 5 | /* |
| 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 Herrenschmidt | 55190f8 | 2011-09-19 17:44:52 +0000 | [diff] [blame] | 12 | #ifdef CONFIG_SMP |
| 13 | extern void pnv_smp_init(void); |
| 14 | #else |
| 15 | static inline void pnv_smp_init(void) { } |
| 16 | #endif |
| 17 | |
Nicholas Piggin | b746e3e | 2017-07-19 16:59:10 +1000 | [diff] [blame] | 18 | extern void pnv_platform_error_reboot(struct pt_regs *regs, const char *msg) __noreturn; |
| 19 | |
Benjamin Herrenschmidt | cd15b04 | 2014-02-11 11:32:38 +1100 | [diff] [blame] | 20 | struct pci_dev; |
| 21 | |
Benjamin Herrenschmidt | 61305a9 | 2011-09-19 17:45:05 +0000 | [diff] [blame] | 22 | #ifdef CONFIG_PCI |
| 23 | extern void pnv_pci_init(void); |
Benjamin Herrenschmidt | 73ed148 | 2013-05-10 16:59:18 +1000 | [diff] [blame] | 24 | extern void pnv_pci_shutdown(void); |
Benjamin Herrenschmidt | 61305a9 | 2011-09-19 17:45:05 +0000 | [diff] [blame] | 25 | #else |
| 26 | static inline void pnv_pci_init(void) { } |
Benjamin Herrenschmidt | 73ed148 | 2013-05-10 16:59:18 +1000 | [diff] [blame] | 27 | static inline void pnv_pci_shutdown(void) { } |
Benjamin Herrenschmidt | 61305a9 | 2011-09-19 17:45:05 +0000 | [diff] [blame] | 28 | #endif |
| 29 | |
Shreyas B. Prabhu | 8eb8ac8 | 2014-12-10 00:26:51 +0530 | [diff] [blame] | 30 | extern u32 pnv_get_supported_cpuidle_states(void); |
| 31 | |
Benjamin Herrenschmidt | 3fafe9c | 2013-07-15 13:03:11 +1000 | [diff] [blame] | 32 | extern void pnv_lpc_init(void); |
| 33 | |
Nicholas Piggin | 56c0b48 | 2018-05-11 03:20:05 +1000 | [diff] [blame] | 34 | extern void opal_handle_events(void); |
| 35 | extern bool opal_have_pending_events(void); |
Alistair Popple | 9f0fd04 | 2015-05-15 14:06:37 +1000 | [diff] [blame] | 36 | extern void opal_event_shutdown(void); |
| 37 | |
Michael Ellerman | e218602 | 2014-05-23 18:15:30 +1000 | [diff] [blame] | 38 | bool cpu_core_split_required(void); |
| 39 | |
Claudio Carvalho | 68e0aa8 | 2019-08-28 23:05:21 +1000 | [diff] [blame] | 40 | struct memcons; |
| 41 | ssize_t memcons_copy(struct memcons *mc, char *to, loff_t pos, size_t count); |
Nick Child | e5913db | 2021-12-16 17:00:26 -0500 | [diff] [blame] | 42 | u32 __init memcons_get_size(struct memcons *mc); |
| 43 | struct memcons *__init memcons_init(struct device_node *node, const char *mc_prop_name); |
Claudio Carvalho | 68e0aa8 | 2019-08-28 23:05:21 +1000 | [diff] [blame] | 44 | |
Benjamin Herrenschmidt | 55190f8 | 2011-09-19 17:44:52 +0000 | [diff] [blame] | 45 | #endif /* _POWERNV_H */ |