1b2441318SGreg Kroah-Hartman /* SPDX-License-Identifier: GPL-2.0 */ 255190f88SBenjamin Herrenschmidt #ifndef _POWERNV_H 355190f88SBenjamin Herrenschmidt #define _POWERNV_H 455190f88SBenjamin Herrenschmidt 58471c1ddSOliver O'Halloran /* 68471c1ddSOliver O'Halloran * There's various hacks scattered throughout the generic powerpc arch code 78471c1ddSOliver O'Halloran * that needs to call into powernv platform stuff. The prototypes for those 88471c1ddSOliver O'Halloran * functions are in asm/powernv.h 98471c1ddSOliver O'Halloran */ 108471c1ddSOliver O'Halloran #include <asm/powernv.h> 118471c1ddSOliver O'Halloran 1255190f88SBenjamin Herrenschmidt #ifdef CONFIG_SMP 1355190f88SBenjamin Herrenschmidt extern void pnv_smp_init(void); 1455190f88SBenjamin Herrenschmidt #else pnv_smp_init(void)1555190f88SBenjamin Herrenschmidtstatic inline void pnv_smp_init(void) { } 1655190f88SBenjamin Herrenschmidt #endif 1755190f88SBenjamin Herrenschmidt 18b746e3e0SNicholas Piggin extern void pnv_platform_error_reboot(struct pt_regs *regs, const char *msg) __noreturn; 19b746e3e0SNicholas Piggin 20cd15b048SBenjamin Herrenschmidt struct pci_dev; 21cd15b048SBenjamin Herrenschmidt 2261305a96SBenjamin Herrenschmidt #ifdef CONFIG_PCI 2361305a96SBenjamin Herrenschmidt extern void pnv_pci_init(void); 2473ed148aSBenjamin Herrenschmidt extern void pnv_pci_shutdown(void); 2561305a96SBenjamin Herrenschmidt #else pnv_pci_init(void)2661305a96SBenjamin Herrenschmidtstatic inline void pnv_pci_init(void) { } pnv_pci_shutdown(void)2773ed148aSBenjamin Herrenschmidtstatic inline void pnv_pci_shutdown(void) { } 2861305a96SBenjamin Herrenschmidt #endif 2961305a96SBenjamin Herrenschmidt 308eb8ac89SShreyas B. Prabhu extern u32 pnv_get_supported_cpuidle_states(void); 318eb8ac89SShreyas B. Prabhu 323fafe9c2SBenjamin Herrenschmidt extern void pnv_lpc_init(void); 333fafe9c2SBenjamin Herrenschmidt 3456c0b48bSNicholas Piggin extern void opal_handle_events(void); 3556c0b48bSNicholas Piggin extern bool opal_have_pending_events(void); 369f0fd049SAlistair Popple extern void opal_event_shutdown(void); 379f0fd049SAlistair Popple 38e2186023SMichael Ellerman bool cpu_core_split_required(void); 39e2186023SMichael Ellerman 4068e0aa8eSClaudio Carvalho struct memcons; 4168e0aa8eSClaudio Carvalho ssize_t memcons_copy(struct memcons *mc, char *to, loff_t pos, size_t count); 42e5913db1SNick Child u32 __init memcons_get_size(struct memcons *mc); 43e5913db1SNick Child struct memcons *__init memcons_init(struct device_node *node, const char *mc_prop_name); 4468e0aa8eSClaudio Carvalho 45*f3eac426SJason A. Donenfeld void pnv_rng_init(void); 46*f3eac426SJason A. Donenfeld 4755190f88SBenjamin Herrenschmidt #endif /* _POWERNV_H */ 48