1 /* SPDX-License-Identifier: GPL-2.0 */ 2 /* 3 * Copyright (c) 2015-2018, Intel Corporation. 4 */ 5 6 #ifndef __KCS_BMC_H__ 7 #define __KCS_BMC_H__ 8 9 #include <linux/list.h> 10 11 #define KCS_BMC_STR_OBF BIT(0) 12 #define KCS_BMC_STR_IBF BIT(1) 13 #define KCS_BMC_STR_CMD_DAT BIT(3) 14 15 /* IPMI 2.0 - 9.5, KCS Interface Registers 16 * @idr: Input Data Register 17 * @odr: Output Data Register 18 * @str: Status Register 19 */ 20 struct kcs_ioreg { 21 u32 idr; 22 u32 odr; 23 u32 str; 24 }; 25 26 struct kcs_bmc_device_ops; 27 struct kcs_bmc_client; 28 29 struct kcs_bmc_device { 30 struct list_head entry; 31 32 struct device *dev; 33 u32 channel; 34 35 struct kcs_ioreg ioreg; 36 37 const struct kcs_bmc_device_ops *ops; 38 39 spinlock_t lock; 40 struct kcs_bmc_client *client; 41 }; 42 43 #endif /* __KCS_BMC_H__ */ 44