blob: 8411c27293e447c3e7b60871180319d1c124d0f6 [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
34extern void smp_init_pseries_mpic(void);
35extern void smp_init_pseries_xics(void);
36#else
Stephen Rothwellf7c0d132007-05-16 13:21:09 +100037static inline void smp_init_pseries_mpic(void) { };
38static inline void smp_init_pseries_xics(void) { };
Michael Ellerman8feaeca2007-02-08 18:33:55 +110039#endif
40
Michael Ellermandce623e2007-02-08 18:33:55 +110041#ifdef CONFIG_KEXEC
42extern void setup_kexec_cpu_down_xics(void);
43extern void setup_kexec_cpu_down_mpic(void);
44#else
Michael Ellerman8c0238b2007-02-14 16:08:05 +110045static inline void setup_kexec_cpu_down_xics(void) { }
46static inline void setup_kexec_cpu_down_mpic(void) { }
Michael Ellermandce623e2007-02-08 18:33:55 +110047#endif
48
Benjamin Herrenschmidt3d5134e2007-06-04 15:15:36 +100049extern void pSeries_final_fixup(void);
50
Manish Ahuja5d30bf32007-02-08 16:01:17 -060051/* Poweron flag used for enabling auto ups restart */
52extern unsigned long rtas_poweron_auto;
53
Benjamin Herrenschmidt4d2bb3f2011-05-12 13:46:38 +100054/* Provided by HVC VIO */
55extern void hvc_vio_init_early(void);
Michael Ellerman21cf9132008-04-16 13:51:48 +100056
Nathan Fontenot20648972010-09-10 09:40:32 +000057/* Dynamic logical Partitioning/Mobility */
58extern void dlpar_free_cc_nodes(struct device_node *);
59extern void dlpar_free_cc_property(struct property *);
Bharata B Raod6f1e7a2014-09-16 15:15:45 -050060extern struct device_node *dlpar_configure_connector(__be32,
61 struct device_node *);
Nathan Fontenot20648972010-09-10 09:40:32 +000062extern int dlpar_attach_node(struct device_node *);
63extern int dlpar_detach_node(struct device_node *);
Nathan Fontenot5e51d3c2015-02-10 13:45:01 -060064extern int dlpar_acquire_drc(u32 drc_index);
65extern int dlpar_release_drc(u32 drc_index);
Nathan Fontenot20648972010-09-10 09:40:32 +000066
Nathan Fontenot999e2da2015-02-10 13:47:02 -060067#ifdef CONFIG_MEMORY_HOTPLUG
68int dlpar_memory(struct pseries_hp_errorlog *hp_elog);
69#else
70static inline int dlpar_memory(struct pseries_hp_errorlog *hp_elog)
71{
72 return -EOPNOTSUPP;
73}
74#endif
Michael Ellerman577830b2007-02-08 18:33:51 +110075
Kleber Sacilotto de Souzad82fb312013-05-03 12:43:12 +000076/* PCI root bridge prepare function override for pseries */
77struct pci_host_bridge;
78int pseries_root_bridge_prepare(struct pci_host_bridge *bridge);
79
Daniel Axtens38ae9ec2015-03-31 16:00:50 +110080extern struct pci_controller_ops pseries_pci_controller_ops;
81
Anton Blancharda5d86252014-06-04 17:50:47 +100082unsigned long pseries_memory_block_size(void);
83
Michael Ellerman577830b2007-02-08 18:33:51 +110084#endif /* _PSERIES_PSERIES_H */