Back to home page

OSCL-LXR

 
 

    


0001 /* SPDX-License-Identifier: GPL-2.0 */
0002 /*
0003  * Copyright (c) 2003-2018, Intel Corporation. All rights reserved.
0004  * Intel Management Engine Interface (Intel MEI) Linux driver
0005  */
0006 
0007 #ifndef _MEI_HBM_H_
0008 #define _MEI_HBM_H_
0009 
0010 struct mei_device;
0011 struct mei_msg_hdr;
0012 struct mei_cl;
0013 struct mei_dma_data;
0014 
0015 /**
0016  * enum mei_hbm_state - host bus message protocol state
0017  *
0018  * @MEI_HBM_IDLE : protocol not started
0019  * @MEI_HBM_STARTING : start request message was sent
0020  * @MEI_HBM_CAP_SETUP : capabilities request message was sent
0021  * @MEI_HBM_DR_SETUP : dma ring setup request message was sent
0022  * @MEI_HBM_ENUM_CLIENTS : enumeration request was sent
0023  * @MEI_HBM_CLIENT_PROPERTIES : acquiring clients properties
0024  * @MEI_HBM_STARTED : enumeration was completed
0025  * @MEI_HBM_STOPPED : stopping exchange
0026  */
0027 enum mei_hbm_state {
0028     MEI_HBM_IDLE = 0,
0029     MEI_HBM_STARTING,
0030     MEI_HBM_CAP_SETUP,
0031     MEI_HBM_DR_SETUP,
0032     MEI_HBM_ENUM_CLIENTS,
0033     MEI_HBM_CLIENT_PROPERTIES,
0034     MEI_HBM_STARTED,
0035     MEI_HBM_STOPPED,
0036 };
0037 
0038 const char *mei_hbm_state_str(enum mei_hbm_state state);
0039 
0040 int mei_hbm_dispatch(struct mei_device *dev, struct mei_msg_hdr *hdr);
0041 
0042 void mei_hbm_idle(struct mei_device *dev);
0043 void mei_hbm_reset(struct mei_device *dev);
0044 int mei_hbm_start_req(struct mei_device *dev);
0045 int mei_hbm_start_wait(struct mei_device *dev);
0046 int mei_hbm_cl_flow_control_req(struct mei_device *dev, struct mei_cl *cl);
0047 int mei_hbm_cl_disconnect_req(struct mei_device *dev, struct mei_cl *cl);
0048 int mei_hbm_cl_disconnect_rsp(struct mei_device *dev, struct mei_cl *cl);
0049 int mei_hbm_cl_connect_req(struct mei_device *dev, struct mei_cl *cl);
0050 bool mei_hbm_version_is_supported(struct mei_device *dev);
0051 int mei_hbm_pg(struct mei_device *dev, u8 pg_cmd);
0052 void mei_hbm_pg_resume(struct mei_device *dev);
0053 int mei_hbm_cl_notify_req(struct mei_device *dev,
0054               struct mei_cl *cl, u8 request);
0055 int mei_hbm_cl_dma_map_req(struct mei_device *dev, struct mei_cl *cl);
0056 int mei_hbm_cl_dma_unmap_req(struct mei_device *dev, struct mei_cl *cl);
0057 #endif /* _MEI_HBM_H_ */
0058