Merge tag 'block-5.11-2021-01-10' of git://git.kernel.dk/linux-block
[linux/fpc-iii.git] / drivers / misc / mei / hbm.h
blob4d95e38e4ddf96d07cddb5e27ccb23b84c82c97f
1 /* SPDX-License-Identifier: GPL-2.0 */
2 /*
3 * Copyright (c) 2003-2018, Intel Corporation. All rights reserved.
4 * Intel Management Engine Interface (Intel MEI) Linux driver
5 */
7 #ifndef _MEI_HBM_H_
8 #define _MEI_HBM_H_
10 struct mei_device;
11 struct mei_msg_hdr;
12 struct mei_cl;
14 /**
15 * enum mei_hbm_state - host bus message protocol state
17 * @MEI_HBM_IDLE : protocol not started
18 * @MEI_HBM_STARTING : start request message was sent
19 * @MEI_HBM_CAP_SETUP : capabilities request message was sent
20 * @MEI_HBM_DR_SETUP : dma ring setup request message was sent
21 * @MEI_HBM_ENUM_CLIENTS : enumeration request was sent
22 * @MEI_HBM_CLIENT_PROPERTIES : acquiring clients properties
23 * @MEI_HBM_STARTED : enumeration was completed
24 * @MEI_HBM_STOPPED : stopping exchange
26 enum mei_hbm_state {
27 MEI_HBM_IDLE = 0,
28 MEI_HBM_STARTING,
29 MEI_HBM_CAP_SETUP,
30 MEI_HBM_DR_SETUP,
31 MEI_HBM_ENUM_CLIENTS,
32 MEI_HBM_CLIENT_PROPERTIES,
33 MEI_HBM_STARTED,
34 MEI_HBM_STOPPED,
37 const char *mei_hbm_state_str(enum mei_hbm_state state);
39 int mei_hbm_dispatch(struct mei_device *dev, struct mei_msg_hdr *hdr);
41 void mei_hbm_idle(struct mei_device *dev);
42 void mei_hbm_reset(struct mei_device *dev);
43 int mei_hbm_start_req(struct mei_device *dev);
44 int mei_hbm_start_wait(struct mei_device *dev);
45 int mei_hbm_cl_flow_control_req(struct mei_device *dev, struct mei_cl *cl);
46 int mei_hbm_cl_disconnect_req(struct mei_device *dev, struct mei_cl *cl);
47 int mei_hbm_cl_disconnect_rsp(struct mei_device *dev, struct mei_cl *cl);
48 int mei_hbm_cl_connect_req(struct mei_device *dev, struct mei_cl *cl);
49 bool mei_hbm_version_is_supported(struct mei_device *dev);
50 int mei_hbm_pg(struct mei_device *dev, u8 pg_cmd);
51 void mei_hbm_pg_resume(struct mei_device *dev);
52 int mei_hbm_cl_notify_req(struct mei_device *dev,
53 struct mei_cl *cl, u8 request);
55 #endif /* _MEI_HBM_H_ */