]> git.proxmox.com Git - mirror_ubuntu-zesty-kernel.git/blob - arch/powerpc/platforms/pseries/pseries.h
bba32853c468bc956dabe3e9a8c06b019cfbed06
[mirror_ubuntu-zesty-kernel.git] / arch / powerpc / platforms / pseries / pseries.h
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
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
21 #include <linux/of.h>
22
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);
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
33 #ifdef CONFIG_SMP
34 extern void smp_init_pseries(void);
35 #else
36 static inline void smp_init_pseries(void) { };
37 #endif
38
39 extern void pseries_kexec_cpu_down(int crash_shutdown, int secondary);
40
41 extern void pSeries_final_fixup(void);
42
43 /* Poweron flag used for enabling auto ups restart */
44 extern unsigned long rtas_poweron_auto;
45
46 /* Provided by HVC VIO */
47 extern void hvc_vio_init_early(void);
48
49 /* Dynamic logical Partitioning/Mobility */
50 extern void dlpar_free_cc_nodes(struct device_node *);
51 extern void dlpar_free_cc_property(struct property *);
52 extern struct device_node *dlpar_configure_connector(__be32,
53 struct device_node *);
54 extern int dlpar_attach_node(struct device_node *);
55 extern int dlpar_detach_node(struct device_node *);
56 extern int dlpar_acquire_drc(u32 drc_index);
57 extern int dlpar_release_drc(u32 drc_index);
58
59 void queue_hotplug_event(struct pseries_hp_errorlog *hp_errlog,
60 struct completion *hotplug_done, int *rc);
61 #ifdef CONFIG_MEMORY_HOTPLUG
62 int dlpar_memory(struct pseries_hp_errorlog *hp_elog);
63 #else
64 static inline int dlpar_memory(struct pseries_hp_errorlog *hp_elog)
65 {
66 return -EOPNOTSUPP;
67 }
68 #endif
69
70 #ifdef CONFIG_HOTPLUG_CPU
71 int dlpar_cpu(struct pseries_hp_errorlog *hp_elog);
72 #else
73 static inline int dlpar_cpu(struct pseries_hp_errorlog *hp_elog)
74 {
75 return -EOPNOTSUPP;
76 }
77 #endif
78
79 /* PCI root bridge prepare function override for pseries */
80 struct pci_host_bridge;
81 int pseries_root_bridge_prepare(struct pci_host_bridge *bridge);
82
83 extern struct pci_controller_ops pseries_pci_controller_ops;
84
85 unsigned long pseries_memory_block_size(void);
86
87 #endif /* _PSERIES_PSERIES_H */