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 |
Rashmica Gupta | 86425be | 2016-05-30 16:18:12 +1000 | [diff] [blame] | 34 | extern void smp_init_pseries(void); |
Michael Ellerman | 8feaeca | 2007-02-08 18:33:55 +1100 | [diff] [blame] | 35 | #else |
Rashmica Gupta | 86425be | 2016-05-30 16:18:12 +1000 | [diff] [blame] | 36 | static inline void smp_init_pseries(void) { }; |
Michael Ellerman | 8feaeca | 2007-02-08 18:33:55 +1100 | [diff] [blame] | 37 | #endif |
| 38 | |
Rashmica Gupta | d739d2c | 2016-05-30 16:18:13 +1000 | [diff] [blame^] | 39 | extern void pseries_kexec_cpu_down(int crash_shutdown, int secondary); |
Michael Ellerman | dce623e | 2007-02-08 18:33:55 +1100 | [diff] [blame] | 40 | |
Benjamin Herrenschmidt | 3d5134e | 2007-06-04 15:15:36 +1000 | [diff] [blame] | 41 | extern void pSeries_final_fixup(void); |
| 42 | |
Manish Ahuja | 5d30bf3 | 2007-02-08 16:01:17 -0600 | [diff] [blame] | 43 | /* Poweron flag used for enabling auto ups restart */ |
| 44 | extern unsigned long rtas_poweron_auto; |
| 45 | |
Benjamin Herrenschmidt | 4d2bb3f | 2011-05-12 13:46:38 +1000 | [diff] [blame] | 46 | /* Provided by HVC VIO */ |
| 47 | extern void hvc_vio_init_early(void); |
Michael Ellerman | 21cf913 | 2008-04-16 13:51:48 +1000 | [diff] [blame] | 48 | |
Nathan Fontenot | 2064897 | 2010-09-10 09:40:32 +0000 | [diff] [blame] | 49 | /* Dynamic logical Partitioning/Mobility */ |
| 50 | extern void dlpar_free_cc_nodes(struct device_node *); |
| 51 | extern void dlpar_free_cc_property(struct property *); |
Bharata B Rao | d6f1e7a | 2014-09-16 15:15:45 -0500 | [diff] [blame] | 52 | extern struct device_node *dlpar_configure_connector(__be32, |
| 53 | struct device_node *); |
Nathan Fontenot | 2064897 | 2010-09-10 09:40:32 +0000 | [diff] [blame] | 54 | extern int dlpar_attach_node(struct device_node *); |
| 55 | extern int dlpar_detach_node(struct device_node *); |
Nathan Fontenot | 5e51d3c | 2015-02-10 13:45:01 -0600 | [diff] [blame] | 56 | extern int dlpar_acquire_drc(u32 drc_index); |
| 57 | extern int dlpar_release_drc(u32 drc_index); |
Nathan Fontenot | 2064897 | 2010-09-10 09:40:32 +0000 | [diff] [blame] | 58 | |
Nathan Fontenot | 999e2da | 2015-02-10 13:47:02 -0600 | [diff] [blame] | 59 | #ifdef CONFIG_MEMORY_HOTPLUG |
| 60 | int dlpar_memory(struct pseries_hp_errorlog *hp_elog); |
| 61 | #else |
| 62 | static inline int dlpar_memory(struct pseries_hp_errorlog *hp_elog) |
| 63 | { |
| 64 | return -EOPNOTSUPP; |
| 65 | } |
| 66 | #endif |
Michael Ellerman | 577830b | 2007-02-08 18:33:51 +1100 | [diff] [blame] | 67 | |
Nathan Fontenot | ac71380 | 2015-12-16 14:54:05 -0600 | [diff] [blame] | 68 | #ifdef CONFIG_HOTPLUG_CPU |
| 69 | int dlpar_cpu(struct pseries_hp_errorlog *hp_elog); |
| 70 | #else |
| 71 | static inline int dlpar_cpu(struct pseries_hp_errorlog *hp_elog) |
| 72 | { |
| 73 | return -EOPNOTSUPP; |
| 74 | } |
| 75 | #endif |
| 76 | |
Kleber Sacilotto de Souza | d82fb31 | 2013-05-03 12:43:12 +0000 | [diff] [blame] | 77 | /* PCI root bridge prepare function override for pseries */ |
| 78 | struct pci_host_bridge; |
| 79 | int pseries_root_bridge_prepare(struct pci_host_bridge *bridge); |
| 80 | |
Daniel Axtens | 38ae9ec | 2015-03-31 16:00:50 +1100 | [diff] [blame] | 81 | extern struct pci_controller_ops pseries_pci_controller_ops; |
| 82 | |
Anton Blanchard | a5d8625 | 2014-06-04 17:50:47 +1000 | [diff] [blame] | 83 | unsigned long pseries_memory_block_size(void); |
| 84 | |
Michael Ellerman | 577830b | 2007-02-08 18:33:51 +1100 | [diff] [blame] | 85 | #endif /* _PSERIES_PSERIES_H */ |