blob: edeaec74b656ef8bc7e2612948ac4c90d1cfe4ea [file] [log] [blame]
Michael Ellerman577830b2007-02-08 18:33:51 +11001/*
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 Nelson32c96f72010-05-18 22:51:00 +000013#include <linux/interrupt.h>
Nathan Fontenot999e2da2015-02-10 13:47:02 -060014#include <asm/rtas.h>
Mark Nelson32c96f72010-05-18 22:51:00 +000015
16struct device_node;
17
18extern void request_event_sources_irqs(struct device_node *np,
19 irq_handler_t handler, const char *name);
20
Nathan Fontenot20648972010-09-10 09:40:32 +000021#include <linux/of.h>
22
Nathan Fontenotf0ff7eb2013-04-24 05:57:18 +000023extern 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);
Michael Ellerman577830b2007-02-08 18:33:51 +110027
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
Michael Ellerman8feaeca2007-02-08 18:33:55 +110033#ifdef CONFIG_SMP
Rashmica Gupta86425be2016-05-30 16:18:12 +100034extern void smp_init_pseries(void);
Michael Ellerman8feaeca2007-02-08 18:33:55 +110035#else
Rashmica Gupta86425be2016-05-30 16:18:12 +100036static inline void smp_init_pseries(void) { };
Michael Ellerman8feaeca2007-02-08 18:33:55 +110037#endif
38
Michael Ellermandce623e2007-02-08 18:33:55 +110039#ifdef CONFIG_KEXEC
40extern void setup_kexec_cpu_down_xics(void);
41extern void setup_kexec_cpu_down_mpic(void);
42#else
Michael Ellerman8c0238b2007-02-14 16:08:05 +110043static inline void setup_kexec_cpu_down_xics(void) { }
44static inline void setup_kexec_cpu_down_mpic(void) { }
Michael Ellermandce623e2007-02-08 18:33:55 +110045#endif
46
Benjamin Herrenschmidt3d5134e2007-06-04 15:15:36 +100047extern void pSeries_final_fixup(void);
48
Manish Ahuja5d30bf32007-02-08 16:01:17 -060049/* Poweron flag used for enabling auto ups restart */
50extern unsigned long rtas_poweron_auto;
51
Benjamin Herrenschmidt4d2bb3f2011-05-12 13:46:38 +100052/* Provided by HVC VIO */
53extern void hvc_vio_init_early(void);
Michael Ellerman21cf9132008-04-16 13:51:48 +100054
Nathan Fontenot20648972010-09-10 09:40:32 +000055/* Dynamic logical Partitioning/Mobility */
56extern void dlpar_free_cc_nodes(struct device_node *);
57extern void dlpar_free_cc_property(struct property *);
Bharata B Raod6f1e7a2014-09-16 15:15:45 -050058extern struct device_node *dlpar_configure_connector(__be32,
59 struct device_node *);
Nathan Fontenot20648972010-09-10 09:40:32 +000060extern int dlpar_attach_node(struct device_node *);
61extern int dlpar_detach_node(struct device_node *);
Nathan Fontenot5e51d3c2015-02-10 13:45:01 -060062extern int dlpar_acquire_drc(u32 drc_index);
63extern int dlpar_release_drc(u32 drc_index);
Nathan Fontenot20648972010-09-10 09:40:32 +000064
Nathan Fontenot999e2da2015-02-10 13:47:02 -060065#ifdef CONFIG_MEMORY_HOTPLUG
66int dlpar_memory(struct pseries_hp_errorlog *hp_elog);
67#else
68static inline int dlpar_memory(struct pseries_hp_errorlog *hp_elog)
69{
70 return -EOPNOTSUPP;
71}
72#endif
Michael Ellerman577830b2007-02-08 18:33:51 +110073
Nathan Fontenotac713802015-12-16 14:54:05 -060074#ifdef CONFIG_HOTPLUG_CPU
75int dlpar_cpu(struct pseries_hp_errorlog *hp_elog);
76#else
77static inline int dlpar_cpu(struct pseries_hp_errorlog *hp_elog)
78{
79 return -EOPNOTSUPP;
80}
81#endif
82
Kleber Sacilotto de Souzad82fb312013-05-03 12:43:12 +000083/* PCI root bridge prepare function override for pseries */
84struct pci_host_bridge;
85int pseries_root_bridge_prepare(struct pci_host_bridge *bridge);
86
Daniel Axtens38ae9ec2015-03-31 16:00:50 +110087extern struct pci_controller_ops pseries_pci_controller_ops;
88
Anton Blancharda5d86252014-06-04 17:50:47 +100089unsigned long pseries_memory_block_size(void);
90
Michael Ellerman577830b2007-02-08 18:33:51 +110091#endif /* _PSERIES_PSERIES_H */