2019-03-12 06:10:41 +08:00
|
|
|
/* SPDX-License-Identifier: GPL-2.0 */
|
2013-01-09 05:07:12 +08:00
|
|
|
/*
|
2019-03-12 06:10:44 +08:00
|
|
|
* Copyright (c) 2003-2018, Intel Corporation. All rights reserved.
|
2013-01-09 05:07:12 +08:00
|
|
|
* Intel Management Engine Interface (Intel MEI) Linux driver
|
|
|
|
*/
|
|
|
|
|
|
|
|
#ifndef _MEI_HBM_H_
|
|
|
|
#define _MEI_HBM_H_
|
|
|
|
|
2013-04-19 04:03:48 +08:00
|
|
|
struct mei_device;
|
|
|
|
struct mei_msg_hdr;
|
|
|
|
struct mei_cl;
|
2021-02-06 22:43:24 +08:00
|
|
|
struct mei_dma_data;
|
2013-04-19 04:03:48 +08:00
|
|
|
|
|
|
|
/**
|
|
|
|
* enum mei_hbm_state - host bus message protocol state
|
|
|
|
*
|
|
|
|
* @MEI_HBM_IDLE : protocol not started
|
2014-08-21 19:29:19 +08:00
|
|
|
* @MEI_HBM_STARTING : start request message was sent
|
2020-08-18 19:51:35 +08:00
|
|
|
* @MEI_HBM_CAP_SETUP : capabilities request message was sent
|
2018-11-22 19:11:37 +08:00
|
|
|
* @MEI_HBM_DR_SETUP : dma ring setup request message was sent
|
2013-04-19 04:03:48 +08:00
|
|
|
* @MEI_HBM_ENUM_CLIENTS : enumeration request was sent
|
|
|
|
* @MEI_HBM_CLIENT_PROPERTIES : acquiring clients properties
|
2014-11-05 17:44:48 +08:00
|
|
|
* @MEI_HBM_STARTED : enumeration was completed
|
2014-08-21 19:29:19 +08:00
|
|
|
* @MEI_HBM_STOPPED : stopping exchange
|
2013-04-19 04:03:48 +08:00
|
|
|
*/
|
|
|
|
enum mei_hbm_state {
|
|
|
|
MEI_HBM_IDLE = 0,
|
2014-08-21 19:29:19 +08:00
|
|
|
MEI_HBM_STARTING,
|
2020-08-18 19:51:35 +08:00
|
|
|
MEI_HBM_CAP_SETUP,
|
2018-11-22 19:11:37 +08:00
|
|
|
MEI_HBM_DR_SETUP,
|
2013-04-19 04:03:48 +08:00
|
|
|
MEI_HBM_ENUM_CLIENTS,
|
|
|
|
MEI_HBM_CLIENT_PROPERTIES,
|
2014-11-05 17:44:48 +08:00
|
|
|
MEI_HBM_STARTED,
|
2014-01-09 02:19:21 +08:00
|
|
|
MEI_HBM_STOPPED,
|
2013-04-19 04:03:48 +08:00
|
|
|
};
|
|
|
|
|
2014-09-29 21:31:33 +08:00
|
|
|
const char *mei_hbm_state_str(enum mei_hbm_state state);
|
|
|
|
|
2014-01-09 02:19:21 +08:00
|
|
|
int mei_hbm_dispatch(struct mei_device *dev, struct mei_msg_hdr *hdr);
|
2013-01-09 05:07:12 +08:00
|
|
|
|
2014-01-09 02:19:22 +08:00
|
|
|
void mei_hbm_idle(struct mei_device *dev);
|
2014-05-07 21:51:28 +08:00
|
|
|
void mei_hbm_reset(struct mei_device *dev);
|
2013-04-19 04:03:48 +08:00
|
|
|
int mei_hbm_start_req(struct mei_device *dev);
|
|
|
|
int mei_hbm_start_wait(struct mei_device *dev);
|
2013-01-09 05:07:12 +08:00
|
|
|
int mei_hbm_cl_flow_control_req(struct mei_device *dev, struct mei_cl *cl);
|
|
|
|
int mei_hbm_cl_disconnect_req(struct mei_device *dev, struct mei_cl *cl);
|
2014-02-13 03:41:52 +08:00
|
|
|
int mei_hbm_cl_disconnect_rsp(struct mei_device *dev, struct mei_cl *cl);
|
2013-01-09 05:07:12 +08:00
|
|
|
int mei_hbm_cl_connect_req(struct mei_device *dev, struct mei_cl *cl);
|
2013-06-16 14:16:31 +08:00
|
|
|
bool mei_hbm_version_is_supported(struct mei_device *dev);
|
2014-03-19 04:51:55 +08:00
|
|
|
int mei_hbm_pg(struct mei_device *dev, u8 pg_cmd);
|
2015-08-03 03:20:54 +08:00
|
|
|
void mei_hbm_pg_resume(struct mei_device *dev);
|
2015-07-26 14:54:16 +08:00
|
|
|
int mei_hbm_cl_notify_req(struct mei_device *dev,
|
|
|
|
struct mei_cl *cl, u8 request);
|
2021-02-06 22:43:24 +08:00
|
|
|
int mei_hbm_cl_dma_map_req(struct mei_device *dev, struct mei_cl *cl);
|
|
|
|
int mei_hbm_cl_dma_unmap_req(struct mei_device *dev, struct mei_cl *cl);
|
2013-01-09 05:07:12 +08:00
|
|
|
#endif /* _MEI_HBM_H_ */
|
|
|
|
|