blob: 52f6152d1fcbf628f6f4bee39d3a5a4b36e8b0c6 [file] [log] [blame]
Corey Minyard243ac212018-02-20 07:30:22 -06001/* SPDX-License-Identifier: GPL-2.0+ */
Corey Minyard1e89a492017-09-12 13:52:13 -05002/*
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
Corey Minyard4f3e8192017-09-12 15:10:22 -05009#include <linux/interrupt.h>
Corey Minyard1e89a492017-09-12 13:52:13 -050010#include "ipmi_si_sm.h"
11
12#define IPMI_IO_ADDR_SPACE 0
13#define IPMI_MEM_ADDR_SPACE 1
14
15#define DEFAULT_REGSPACING 1
16#define DEFAULT_REGSIZE 1
17
Corey Minyard9d700292017-09-12 22:55:57 -050018#define DEVICE_NAME "ipmi_si"
19
Corey Minyardbb398a42017-09-12 21:37:02 -050020int ipmi_si_add_smi(struct si_sm_io *io);
Corey Minyard4f3e8192017-09-12 15:10:22 -050021irqreturn_t ipmi_si_irq_handler(int irq, void *data);
22void ipmi_irq_start_cleanup(struct si_sm_io *io);
23int ipmi_std_irq_setup(struct si_sm_io *io);
24void ipmi_irq_finish_setup(struct si_sm_io *io);
Corey Minyardbb398a42017-09-12 21:37:02 -050025int ipmi_si_remove_by_dev(struct device *dev);
Corey Minyard44814ec2017-09-12 22:28:49 -050026void ipmi_si_remove_by_data(int addr_space, enum si_type si_type,
27 unsigned long addr);
Corey Minyard7a453302017-09-12 22:46:29 -050028int ipmi_si_hardcode_find_bmc(void);
Corey Minyard9d700292017-09-12 22:55:57 -050029void ipmi_si_platform_init(void);
30void ipmi_si_platform_shutdown(void);
31
32extern struct platform_driver ipmi_platform_driver;
Corey Minyard13d0b352017-09-12 23:04:35 -050033
34#ifdef CONFIG_PCI
35void ipmi_si_pci_init(void);
36void ipmi_si_pci_shutdown(void);
37#else
38static inline void ipmi_si_pci_init(void) { }
39static inline void ipmi_si_pci_shutdown(void) { }
40#endif
Corey Minyardc6f85a72017-09-12 23:10:18 -050041#ifdef CONFIG_PARISC
42void ipmi_si_parisc_init(void);
43void ipmi_si_parisc_shutdown(void);
44#else
45static inline void ipmi_si_parisc_init(void) { }
46static inline void ipmi_si_parisc_shutdown(void) { }
47#endif
Corey Minyard58e27632017-09-12 23:24:30 -050048
49int ipmi_si_port_setup(struct si_sm_io *io);
50int ipmi_si_mem_setup(struct si_sm_io *io);