Corey Minyard | 1e89a49 | 2017-09-12 13:52:13 -0500 | [diff] [blame] | 1 | /* |
| 2 | * ipmi_si.h |
| 3 | * |
| 4 | * Interface from the device-specific interfaces (OF, DMI, ACPI, PCI, |
| 5 | * etc) to the base ipmi system interface code. |
| 6 | */ |
| 7 | |
Corey Minyard | 4f3e819 | 2017-09-12 15:10:22 -0500 | [diff] [blame] | 8 | #include <linux/interrupt.h> |
Corey Minyard | 1e89a49 | 2017-09-12 13:52:13 -0500 | [diff] [blame] | 9 | #include "ipmi_si_sm.h" |
| 10 | |
| 11 | #define IPMI_IO_ADDR_SPACE 0 |
| 12 | #define IPMI_MEM_ADDR_SPACE 1 |
| 13 | |
| 14 | #define DEFAULT_REGSPACING 1 |
| 15 | #define DEFAULT_REGSIZE 1 |
| 16 | |
Corey Minyard | 9d70029 | 2017-09-12 22:55:57 -0500 | [diff] [blame] | 17 | #define DEVICE_NAME "ipmi_si" |
| 18 | |
Corey Minyard | bb398a4 | 2017-09-12 21:37:02 -0500 | [diff] [blame] | 19 | int ipmi_si_add_smi(struct si_sm_io *io); |
Corey Minyard | 4f3e819 | 2017-09-12 15:10:22 -0500 | [diff] [blame] | 20 | irqreturn_t ipmi_si_irq_handler(int irq, void *data); |
| 21 | void ipmi_irq_start_cleanup(struct si_sm_io *io); |
| 22 | int ipmi_std_irq_setup(struct si_sm_io *io); |
| 23 | void ipmi_irq_finish_setup(struct si_sm_io *io); |
Corey Minyard | bb398a4 | 2017-09-12 21:37:02 -0500 | [diff] [blame] | 24 | int ipmi_si_remove_by_dev(struct device *dev); |
Corey Minyard | 44814ec | 2017-09-12 22:28:49 -0500 | [diff] [blame] | 25 | void ipmi_si_remove_by_data(int addr_space, enum si_type si_type, |
| 26 | unsigned long addr); |
Corey Minyard | 7a45330 | 2017-09-12 22:46:29 -0500 | [diff] [blame] | 27 | int ipmi_si_hardcode_find_bmc(void); |
Corey Minyard | 9d70029 | 2017-09-12 22:55:57 -0500 | [diff] [blame] | 28 | void ipmi_si_platform_init(void); |
| 29 | void ipmi_si_platform_shutdown(void); |
| 30 | |
| 31 | extern struct platform_driver ipmi_platform_driver; |
Corey Minyard | 13d0b35 | 2017-09-12 23:04:35 -0500 | [diff] [blame] | 32 | |
| 33 | #ifdef CONFIG_PCI |
| 34 | void ipmi_si_pci_init(void); |
| 35 | void ipmi_si_pci_shutdown(void); |
| 36 | #else |
| 37 | static inline void ipmi_si_pci_init(void) { } |
| 38 | static inline void ipmi_si_pci_shutdown(void) { } |
| 39 | #endif |
Corey Minyard | c6f85a7 | 2017-09-12 23:10:18 -0500 | [diff] [blame] | 40 | #ifdef CONFIG_PARISC |
| 41 | void ipmi_si_parisc_init(void); |
| 42 | void ipmi_si_parisc_shutdown(void); |
| 43 | #else |
| 44 | static inline void ipmi_si_parisc_init(void) { } |
| 45 | static inline void ipmi_si_parisc_shutdown(void) { } |
| 46 | #endif |
Corey Minyard | 58e2763 | 2017-09-12 23:24:30 -0500 | [diff] [blame^] | 47 | |
| 48 | int ipmi_si_port_setup(struct si_sm_io *io); |
| 49 | int ipmi_si_mem_setup(struct si_sm_io *io); |