xref: /openbmc/linux/drivers/char/ipmi/ipmi_si.h (revision d003d772)
1 /* SPDX-License-Identifier: GPL-2.0+ */
2 /*
3  * ipmi_si.h
4  *
5  * Interface from the device-specific interfaces (OF, DMI, ACPI, PCI,
6  * etc) to the base ipmi system interface code.
7  */
8 
9 #include <linux/interrupt.h>
10 #include <linux/platform_device.h>
11 #include "ipmi_si_sm.h"
12 
13 #define DEFAULT_REGSPACING	1
14 #define DEFAULT_REGSIZE		1
15 
16 #define DEVICE_NAME "ipmi_si"
17 
18 int ipmi_si_add_smi(struct si_sm_io *io);
19 irqreturn_t ipmi_si_irq_handler(int irq, void *data);
20 void ipmi_irq_start_cleanup(struct si_sm_io *io);
21 int ipmi_std_irq_setup(struct si_sm_io *io);
22 void ipmi_irq_finish_setup(struct si_sm_io *io);
23 int ipmi_si_remove_by_dev(struct device *dev);
24 struct device *ipmi_si_remove_by_data(int addr_space, enum si_type si_type,
25 				      unsigned long addr);
26 void ipmi_hardcode_init(void);
27 void ipmi_si_hardcode_exit(void);
28 void ipmi_si_hotmod_exit(void);
29 int ipmi_si_hardcode_match(int addr_space, unsigned long addr);
30 void ipmi_si_platform_init(void);
31 void ipmi_si_platform_shutdown(void);
32 void ipmi_remove_platform_device_by_name(char *name);
33 
34 extern struct platform_driver ipmi_platform_driver;
35 
36 #ifdef CONFIG_PCI
37 void ipmi_si_pci_init(void);
38 void ipmi_si_pci_shutdown(void);
39 #else
40 static inline void ipmi_si_pci_init(void) { }
41 static inline void ipmi_si_pci_shutdown(void) { }
42 #endif
43 #ifdef CONFIG_PARISC
44 void ipmi_si_parisc_init(void);
45 void ipmi_si_parisc_shutdown(void);
46 #else
47 static inline void ipmi_si_parisc_init(void) { }
48 static inline void ipmi_si_parisc_shutdown(void) { }
49 #endif
50 
51 int ipmi_si_port_setup(struct si_sm_io *io);
52 int ipmi_si_mem_setup(struct si_sm_io *io);
53