xref: /openbmc/linux/arch/powerpc/sysdev/mpic.h (revision 66953ebe)
1a7de7c74SMichael Ellerman #ifndef _POWERPC_SYSDEV_MPIC_H
2a7de7c74SMichael Ellerman #define _POWERPC_SYSDEV_MPIC_H
3a7de7c74SMichael Ellerman 
4a7de7c74SMichael Ellerman /*
5a7de7c74SMichael Ellerman  * Copyright 2006-2007, Michael Ellerman, IBM Corporation.
6a7de7c74SMichael Ellerman  *
7a7de7c74SMichael Ellerman  * This program is free software; you can redistribute it and/or
8a7de7c74SMichael Ellerman  * modify it under the terms of the GNU General Public License
9a7de7c74SMichael Ellerman  * as published by the Free Software Foundation; version 2 of the
10a7de7c74SMichael Ellerman  * License.
11a7de7c74SMichael Ellerman  *
12a7de7c74SMichael Ellerman  */
13a7de7c74SMichael Ellerman 
14a7de7c74SMichael Ellerman #ifdef CONFIG_PCI_MSI
15a7de7c74SMichael Ellerman extern void mpic_msi_reserve_hwirq(struct mpic *mpic, irq_hw_number_t hwirq);
16a7de7c74SMichael Ellerman extern int mpic_msi_init_allocator(struct mpic *mpic);
1705af7bd2SMichael Ellerman extern int mpic_u3msi_init(struct mpic *mpic);
1838958dd9SOlof Johansson extern int mpic_pasemi_msi_init(struct mpic *mpic);
19a7de7c74SMichael Ellerman #else
20a7de7c74SMichael Ellerman static inline void mpic_msi_reserve_hwirq(struct mpic *mpic,
21a7de7c74SMichael Ellerman 					  irq_hw_number_t hwirq)
22a7de7c74SMichael Ellerman {
23a7de7c74SMichael Ellerman 	return;
24a7de7c74SMichael Ellerman }
2505af7bd2SMichael Ellerman 
2605af7bd2SMichael Ellerman static inline int mpic_u3msi_init(struct mpic *mpic)
2705af7bd2SMichael Ellerman {
2805af7bd2SMichael Ellerman 	return -1;
2905af7bd2SMichael Ellerman }
3038958dd9SOlof Johansson 
3138958dd9SOlof Johansson static inline int mpic_pasemi_msi_init(struct mpic *mpic)
3238958dd9SOlof Johansson {
3338958dd9SOlof Johansson 	return -1;
3438958dd9SOlof Johansson }
35a7de7c74SMichael Ellerman #endif
36a7de7c74SMichael Ellerman 
3705af7bd2SMichael Ellerman extern int mpic_set_irq_type(unsigned int virq, unsigned int flow_type);
3838958dd9SOlof Johansson extern void mpic_set_vector(unsigned int virq, unsigned int vector);
39b2e5d858SIngo Molnar extern int mpic_set_affinity(unsigned int irq, const struct cpumask *cpumask);
4066953ebeSMatthew McClintock extern void mpic_reset_core(int cpu);
4105af7bd2SMichael Ellerman 
42a7de7c74SMichael Ellerman #endif /* _POWERPC_SYSDEV_MPIC_H */
43