18c2ecf20Sopenharmony_ci/* SPDX-License-Identifier: GPL-2.0 */
28c2ecf20Sopenharmony_ci#ifndef _POWERNV_H
38c2ecf20Sopenharmony_ci#define _POWERNV_H
48c2ecf20Sopenharmony_ci
58c2ecf20Sopenharmony_ci/*
68c2ecf20Sopenharmony_ci * There's various hacks scattered throughout the generic powerpc arch code
78c2ecf20Sopenharmony_ci * that needs to call into powernv platform stuff. The prototypes for those
88c2ecf20Sopenharmony_ci * functions are in asm/powernv.h
98c2ecf20Sopenharmony_ci */
108c2ecf20Sopenharmony_ci#include <asm/powernv.h>
118c2ecf20Sopenharmony_ci
128c2ecf20Sopenharmony_ci#ifdef CONFIG_SMP
138c2ecf20Sopenharmony_ciextern void pnv_smp_init(void);
148c2ecf20Sopenharmony_ci#else
158c2ecf20Sopenharmony_cistatic inline void pnv_smp_init(void) { }
168c2ecf20Sopenharmony_ci#endif
178c2ecf20Sopenharmony_ci
188c2ecf20Sopenharmony_ciextern void pnv_platform_error_reboot(struct pt_regs *regs, const char *msg) __noreturn;
198c2ecf20Sopenharmony_ci
208c2ecf20Sopenharmony_cistruct pci_dev;
218c2ecf20Sopenharmony_ci
228c2ecf20Sopenharmony_ci#ifdef CONFIG_PCI
238c2ecf20Sopenharmony_ciextern void pnv_pci_init(void);
248c2ecf20Sopenharmony_ciextern void pnv_pci_shutdown(void);
258c2ecf20Sopenharmony_ci#else
268c2ecf20Sopenharmony_cistatic inline void pnv_pci_init(void) { }
278c2ecf20Sopenharmony_cistatic inline void pnv_pci_shutdown(void) { }
288c2ecf20Sopenharmony_ci#endif
298c2ecf20Sopenharmony_ci
308c2ecf20Sopenharmony_ciextern u32 pnv_get_supported_cpuidle_states(void);
318c2ecf20Sopenharmony_ci
328c2ecf20Sopenharmony_ciextern void pnv_lpc_init(void);
338c2ecf20Sopenharmony_ci
348c2ecf20Sopenharmony_ciextern void opal_handle_events(void);
358c2ecf20Sopenharmony_ciextern bool opal_have_pending_events(void);
368c2ecf20Sopenharmony_ciextern void opal_event_shutdown(void);
378c2ecf20Sopenharmony_ci
388c2ecf20Sopenharmony_cibool cpu_core_split_required(void);
398c2ecf20Sopenharmony_ci
408c2ecf20Sopenharmony_cistruct memcons;
418c2ecf20Sopenharmony_cissize_t memcons_copy(struct memcons *mc, char *to, loff_t pos, size_t count);
428c2ecf20Sopenharmony_ciu32 memcons_get_size(struct memcons *mc);
438c2ecf20Sopenharmony_cistruct memcons *memcons_init(struct device_node *node, const char *mc_prop_name);
448c2ecf20Sopenharmony_ci
458c2ecf20Sopenharmony_civoid pnv_rng_init(void);
468c2ecf20Sopenharmony_ci
478c2ecf20Sopenharmony_ci#endif /* _POWERNV_H */
48