.. | .. |
---|
14 | 14 | * Copyright 2002 MontaVista Software Inc. |
---|
15 | 15 | */ |
---|
16 | 16 | |
---|
17 | | -#include <linux/ipmi.h> |
---|
| 17 | +#ifndef __IPMI_SI_SM_H__ |
---|
| 18 | +#define __IPMI_SI_SM_H__ |
---|
| 19 | + |
---|
| 20 | +#include "ipmi_si.h" |
---|
18 | 21 | |
---|
19 | 22 | /* |
---|
20 | 23 | * This is defined by the state machines themselves, it is an opaque |
---|
21 | 24 | * data type for them to use. |
---|
22 | 25 | */ |
---|
23 | 26 | 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 | | -}; |
---|
68 | 27 | |
---|
69 | 28 | /* Results of SMI events. */ |
---|
70 | 29 | enum si_sm_result { |
---|
.. | .. |
---|
142 | 101 | extern const struct si_sm_handlers smic_smi_handlers; |
---|
143 | 102 | extern const struct si_sm_handlers bt_smi_handlers; |
---|
144 | 103 | |
---|
| 104 | +#endif /* __IPMI_SI_SM_H__ */ |
---|