Michael Ellerman | 577830b | 2007-02-08 18:33:51 +1100 | [diff] [blame] | 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 | |
Mark Nelson | 32c96f7 | 2010-05-18 22:51:00 +0000 | [diff] [blame] | 13 | #include <linux/interrupt.h> |
Nathan Fontenot | 999e2da | 2015-02-10 13:47:02 -0600 | [diff] [blame] | 14 | #include <asm/rtas.h> |
Mark Nelson | 32c96f7 | 2010-05-18 22:51:00 +0000 | [diff] [blame] | 15 | |
| 16 | struct device_node; |
| 17 | |
| 18 | extern void request_event_sources_irqs(struct device_node *np, |
| 19 | irq_handler_t handler, const char *name); |
| 20 | |
Nathan Fontenot | 2064897 | 2010-09-10 09:40:32 +0000 | [diff] [blame] | 21 | #include <linux/of.h> |
| 22 | |
Nathan Fontenot | f0ff7eb | 2013-04-24 05:57:18 +0000 | [diff] [blame] | 23 | extern void __init fw_hypertas_feature_init(const char *hypertas, |
| 24 | unsigned long len); |
| 25 | extern void __init fw_vec5_feature_init(const char *hypertas, |
| 26 | unsigned long len); |
Michael Ellerman | 577830b | 2007-02-08 18:33:51 +1100 | [diff] [blame] | 27 | |
| 28 | struct pt_regs; |
| 29 | |
| 30 | extern int pSeries_system_reset_exception(struct pt_regs *regs); |
| 31 | extern int pSeries_machine_check_exception(struct pt_regs *regs); |
| 32 | |
Michael Ellerman | 8feaeca | 2007-02-08 18:33:55 +1100 | [diff] [blame] | 33 | #ifdef CONFIG_SMP |
| 34 | extern void smp_init_pseries_mpic(void); |
| 35 | extern void smp_init_pseries_xics(void); |
| 36 | #else |
Stephen Rothwell | f7c0d13 | 2007-05-16 13:21:09 +1000 | [diff] [blame] | 37 | static inline void smp_init_pseries_mpic(void) { }; |
| 38 | static inline void smp_init_pseries_xics(void) { }; |
Michael Ellerman | 8feaeca | 2007-02-08 18:33:55 +1100 | [diff] [blame] | 39 | #endif |
| 40 | |
Michael Ellerman | dce623e | 2007-02-08 18:33:55 +1100 | [diff] [blame] | 41 | #ifdef CONFIG_KEXEC |
| 42 | extern void setup_kexec_cpu_down_xics(void); |
| 43 | extern void setup_kexec_cpu_down_mpic(void); |
| 44 | #else |
Michael Ellerman | 8c0238b | 2007-02-14 16:08:05 +1100 | [diff] [blame] | 45 | static inline void setup_kexec_cpu_down_xics(void) { } |
| 46 | static inline void setup_kexec_cpu_down_mpic(void) { } |
Michael Ellerman | dce623e | 2007-02-08 18:33:55 +1100 | [diff] [blame] | 47 | #endif |
| 48 | |
Benjamin Herrenschmidt | 3d5134e | 2007-06-04 15:15:36 +1000 | [diff] [blame] | 49 | extern void pSeries_final_fixup(void); |
| 50 | |
Manish Ahuja | 5d30bf3 | 2007-02-08 16:01:17 -0600 | [diff] [blame] | 51 | /* Poweron flag used for enabling auto ups restart */ |
| 52 | extern unsigned long rtas_poweron_auto; |
| 53 | |
Benjamin Herrenschmidt | 4d2bb3f | 2011-05-12 13:46:38 +1000 | [diff] [blame] | 54 | /* Provided by HVC VIO */ |
| 55 | extern void hvc_vio_init_early(void); |
Michael Ellerman | 21cf913 | 2008-04-16 13:51:48 +1000 | [diff] [blame] | 56 | |
Nathan Fontenot | 2064897 | 2010-09-10 09:40:32 +0000 | [diff] [blame] | 57 | /* Dynamic logical Partitioning/Mobility */ |
| 58 | extern void dlpar_free_cc_nodes(struct device_node *); |
| 59 | extern void dlpar_free_cc_property(struct property *); |
Bharata B Rao | d6f1e7a | 2014-09-16 15:15:45 -0500 | [diff] [blame] | 60 | extern struct device_node *dlpar_configure_connector(__be32, |
| 61 | struct device_node *); |
Nathan Fontenot | 2064897 | 2010-09-10 09:40:32 +0000 | [diff] [blame] | 62 | extern int dlpar_attach_node(struct device_node *); |
| 63 | extern int dlpar_detach_node(struct device_node *); |
Nathan Fontenot | 5e51d3c | 2015-02-10 13:45:01 -0600 | [diff] [blame] | 64 | extern int dlpar_acquire_drc(u32 drc_index); |
| 65 | extern int dlpar_release_drc(u32 drc_index); |
Nathan Fontenot | 2064897 | 2010-09-10 09:40:32 +0000 | [diff] [blame] | 66 | |
Nathan Fontenot | 999e2da | 2015-02-10 13:47:02 -0600 | [diff] [blame] | 67 | #ifdef CONFIG_MEMORY_HOTPLUG |
| 68 | int dlpar_memory(struct pseries_hp_errorlog *hp_elog); |
| 69 | #else |
| 70 | static inline int dlpar_memory(struct pseries_hp_errorlog *hp_elog) |
| 71 | { |
| 72 | return -EOPNOTSUPP; |
| 73 | } |
| 74 | #endif |
Michael Ellerman | 577830b | 2007-02-08 18:33:51 +1100 | [diff] [blame] | 75 | |
Kleber Sacilotto de Souza | d82fb31 | 2013-05-03 12:43:12 +0000 | [diff] [blame] | 76 | /* PCI root bridge prepare function override for pseries */ |
| 77 | struct pci_host_bridge; |
| 78 | int pseries_root_bridge_prepare(struct pci_host_bridge *bridge); |
| 79 | |
Daniel Axtens | 38ae9ec | 2015-03-31 16:00:50 +1100 | [diff] [blame] | 80 | extern struct pci_controller_ops pseries_pci_controller_ops; |
| 81 | |
Anton Blanchard | a5d8625 | 2014-06-04 17:50:47 +1000 | [diff] [blame] | 82 | unsigned long pseries_memory_block_size(void); |
| 83 | |
Michael Ellerman | 577830b | 2007-02-08 18:33:51 +1100 | [diff] [blame] | 84 | #endif /* _PSERIES_PSERIES_H */ |