hc
2023-12-09 b22da3d8526a935aa31e086e63f60ff3246cb61c
kernel/drivers/char/ipmi/ipmi_si_sm.h
....@@ -14,57 +14,16 @@
1414 * Copyright 2002 MontaVista Software Inc.
1515 */
1616
17
-#include <linux/ipmi.h>
17
+#ifndef __IPMI_SI_SM_H__
18
+#define __IPMI_SI_SM_H__
19
+
20
+#include "ipmi_si.h"
1821
1922 /*
2023 * This is defined by the state machines themselves, it is an opaque
2124 * data type for them to use.
2225 */
2326 struct si_sm_data;
24
-
25
-enum si_type {
26
- SI_TYPE_INVALID, SI_KCS, SI_SMIC, SI_BT
27
-};
28
-
29
-/*
30
- * The structure for doing I/O in the state machine. The state
31
- * machine doesn't have the actual I/O routines, they are done through
32
- * this interface.
33
- */
34
-struct si_sm_io {
35
- unsigned char (*inputb)(const struct si_sm_io *io, unsigned int offset);
36
- void (*outputb)(const struct si_sm_io *io,
37
- unsigned int offset,
38
- unsigned char b);
39
-
40
- /*
41
- * Generic info used by the actual handling routines, the
42
- * state machine shouldn't touch these.
43
- */
44
- void __iomem *addr;
45
- int regspacing;
46
- int regsize;
47
- int regshift;
48
- int addr_type;
49
- long addr_data;
50
- enum ipmi_addr_src addr_source; /* ACPI, PCI, SMBIOS, hardcode, etc. */
51
- void (*addr_source_cleanup)(struct si_sm_io *io);
52
- void *addr_source_data;
53
- union ipmi_smi_info_union addr_info;
54
-
55
- int (*io_setup)(struct si_sm_io *info);
56
- void (*io_cleanup)(struct si_sm_io *info);
57
- unsigned int io_size;
58
-
59
- int irq;
60
- int (*irq_setup)(struct si_sm_io *io);
61
- void *irq_handler_data;
62
- void (*irq_cleanup)(struct si_sm_io *io);
63
-
64
- u8 slave_addr;
65
- enum si_type si_type;
66
- struct device *dev;
67
-};
6827
6928 /* Results of SMI events. */
7029 enum si_sm_result {
....@@ -142,3 +101,4 @@
142101 extern const struct si_sm_handlers smic_smi_handlers;
143102 extern const struct si_sm_handlers bt_smi_handlers;
144103
104
+#endif /* __IPMI_SI_SM_H__ */