blob: ddb9aa51aad6f49bbb67ea1afc85dba074863548 [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
Rashmica Guptad739d2c2016-05-30 16:18:13 +100039extern void pseries_kexec_cpu_down(int crash_shutdown, int secondary);
Michael Ellermandce623e2007-02-08 18:33:55 +110040
Benjamin Herrenschmidt3d5134e2007-06-04 15:15:36 +100041extern void pSeries_final_fixup(void);
42
Manish Ahuja5d30bf32007-02-08 16:01:17 -060043/* Poweron flag used for enabling auto ups restart */
44extern unsigned long rtas_poweron_auto;
45
Benjamin Herrenschmidt4d2bb3f2011-05-12 13:46:38 +100046/* Provided by HVC VIO */
47extern void hvc_vio_init_early(void);
Michael Ellerman21cf9132008-04-16 13:51:48 +100048
Nathan Fontenot20648972010-09-10 09:40:32 +000049/* Dynamic logical Partitioning/Mobility */
50extern void dlpar_free_cc_nodes(struct device_node *);
51extern void dlpar_free_cc_property(struct property *);
Bharata B Raod6f1e7a2014-09-16 15:15:45 -050052extern struct device_node *dlpar_configure_connector(__be32,
53 struct device_node *);
Nathan Fontenot20648972010-09-10 09:40:32 +000054extern int dlpar_attach_node(struct device_node *);
55extern int dlpar_detach_node(struct device_node *);
Nathan Fontenot5e51d3c2015-02-10 13:45:01 -060056extern int dlpar_acquire_drc(u32 drc_index);
57extern int dlpar_release_drc(u32 drc_index);
Nathan Fontenot20648972010-09-10 09:40:32 +000058
Nathan Fontenot999e2da2015-02-10 13:47:02 -060059#ifdef CONFIG_MEMORY_HOTPLUG
60int dlpar_memory(struct pseries_hp_errorlog *hp_elog);
61#else
62static inline int dlpar_memory(struct pseries_hp_errorlog *hp_elog)
63{
64 return -EOPNOTSUPP;
65}
66#endif
Michael Ellerman577830b2007-02-08 18:33:51 +110067
Nathan Fontenotac713802015-12-16 14:54:05 -060068#ifdef CONFIG_HOTPLUG_CPU
69int dlpar_cpu(struct pseries_hp_errorlog *hp_elog);
70#else
71static inline int dlpar_cpu(struct pseries_hp_errorlog *hp_elog)
72{
73 return -EOPNOTSUPP;
74}
75#endif
76
Kleber Sacilotto de Souzad82fb312013-05-03 12:43:12 +000077/* PCI root bridge prepare function override for pseries */
78struct pci_host_bridge;
79int pseries_root_bridge_prepare(struct pci_host_bridge *bridge);
80
Daniel Axtens38ae9ec2015-03-31 16:00:50 +110081extern struct pci_controller_ops pseries_pci_controller_ops;
82
Anton Blancharda5d86252014-06-04 17:50:47 +100083unsigned long pseries_memory_block_size(void);
84
Michael Ellerman577830b2007-02-08 18:33:51 +110085#endif /* _PSERIES_PSERIES_H */