1/* 2 * Copyright 2006 IBM Corporation. 3 * 4 * This program is free software; you can redistribute it and/or 5 * modify it under the terms of the GNU General Public License 6 * as published by the Free Software Foundation; either version 7 * 2 of the License, or (at your option) any later version. 8 */ 9 10#ifndef _PSERIES_PSERIES_H 11#define _PSERIES_PSERIES_H 12 13#include <linux/interrupt.h> 14#include <asm/rtas.h> 15 16struct device_node; 17 18extern void request_event_sources_irqs(struct device_node *np, 19 irq_handler_t handler, const char *name); 20 21#include <linux/of.h> 22 23extern void __init fw_hypertas_feature_init(const char *hypertas, 24 unsigned long len); 25extern void __init fw_vec5_feature_init(const char *hypertas, 26 unsigned long len); 27 28struct pt_regs; 29 30extern int pSeries_system_reset_exception(struct pt_regs *regs); 31extern int pSeries_machine_check_exception(struct pt_regs *regs); 32 33#ifdef CONFIG_SMP 34extern void smp_init_pseries_mpic(void); 35extern void smp_init_pseries_xics(void); 36#else 37static inline void smp_init_pseries_mpic(void) { }; 38static inline void smp_init_pseries_xics(void) { }; 39#endif 40 41#ifdef CONFIG_KEXEC 42extern void setup_kexec_cpu_down_xics(void); 43extern void setup_kexec_cpu_down_mpic(void); 44#else 45static inline void setup_kexec_cpu_down_xics(void) { } 46static inline void setup_kexec_cpu_down_mpic(void) { } 47#endif 48 49extern void pSeries_final_fixup(void); 50 51/* Poweron flag used for enabling auto ups restart */ 52extern unsigned long rtas_poweron_auto; 53 54/* Provided by HVC VIO */ 55extern void hvc_vio_init_early(void); 56 57/* Dynamic logical Partitioning/Mobility */ 58extern void dlpar_free_cc_nodes(struct device_node *); 59extern void dlpar_free_cc_property(struct property *); 60extern struct device_node *dlpar_configure_connector(__be32, 61 struct device_node *); 62extern int dlpar_attach_node(struct device_node *); 63extern int dlpar_detach_node(struct device_node *); 64extern int dlpar_acquire_drc(u32 drc_index); 65extern int dlpar_release_drc(u32 drc_index); 66 67#ifdef CONFIG_MEMORY_HOTPLUG 68int dlpar_memory(struct pseries_hp_errorlog *hp_elog); 69#else 70static inline int dlpar_memory(struct pseries_hp_errorlog *hp_elog) 71{ 72 return -EOPNOTSUPP; 73} 74#endif 75 76#ifdef CONFIG_HOTPLUG_CPU 77int dlpar_cpu(struct pseries_hp_errorlog *hp_elog); 78#else 79static inline int dlpar_cpu(struct pseries_hp_errorlog *hp_elog) 80{ 81 return -EOPNOTSUPP; 82} 83#endif 84 85/* PCI root bridge prepare function override for pseries */ 86struct pci_host_bridge; 87int pseries_root_bridge_prepare(struct pci_host_bridge *bridge); 88 89extern struct pci_controller_ops pseries_pci_controller_ops; 90 91unsigned long pseries_memory_block_size(void); 92 93#endif /* _PSERIES_PSERIES_H */ 94