1*4882a593Smuzhiyun /* SPDX-License-Identifier: GPL-2.0 */ 2*4882a593Smuzhiyun /* 3*4882a593Smuzhiyun * Copyright (c) 2003-2018, Intel Corporation. All rights reserved. 4*4882a593Smuzhiyun * Intel Management Engine Interface (Intel MEI) Linux driver 5*4882a593Smuzhiyun */ 6*4882a593Smuzhiyun 7*4882a593Smuzhiyun #ifndef _MEI_HBM_H_ 8*4882a593Smuzhiyun #define _MEI_HBM_H_ 9*4882a593Smuzhiyun 10*4882a593Smuzhiyun struct mei_device; 11*4882a593Smuzhiyun struct mei_msg_hdr; 12*4882a593Smuzhiyun struct mei_cl; 13*4882a593Smuzhiyun 14*4882a593Smuzhiyun /** 15*4882a593Smuzhiyun * enum mei_hbm_state - host bus message protocol state 16*4882a593Smuzhiyun * 17*4882a593Smuzhiyun * @MEI_HBM_IDLE : protocol not started 18*4882a593Smuzhiyun * @MEI_HBM_STARTING : start request message was sent 19*4882a593Smuzhiyun * @MEI_HBM_CAP_SETUP : capabilities request message was sent 20*4882a593Smuzhiyun * @MEI_HBM_DR_SETUP : dma ring setup request message was sent 21*4882a593Smuzhiyun * @MEI_HBM_ENUM_CLIENTS : enumeration request was sent 22*4882a593Smuzhiyun * @MEI_HBM_CLIENT_PROPERTIES : acquiring clients properties 23*4882a593Smuzhiyun * @MEI_HBM_STARTED : enumeration was completed 24*4882a593Smuzhiyun * @MEI_HBM_STOPPED : stopping exchange 25*4882a593Smuzhiyun */ 26*4882a593Smuzhiyun enum mei_hbm_state { 27*4882a593Smuzhiyun MEI_HBM_IDLE = 0, 28*4882a593Smuzhiyun MEI_HBM_STARTING, 29*4882a593Smuzhiyun MEI_HBM_CAP_SETUP, 30*4882a593Smuzhiyun MEI_HBM_DR_SETUP, 31*4882a593Smuzhiyun MEI_HBM_ENUM_CLIENTS, 32*4882a593Smuzhiyun MEI_HBM_CLIENT_PROPERTIES, 33*4882a593Smuzhiyun MEI_HBM_STARTED, 34*4882a593Smuzhiyun MEI_HBM_STOPPED, 35*4882a593Smuzhiyun }; 36*4882a593Smuzhiyun 37*4882a593Smuzhiyun const char *mei_hbm_state_str(enum mei_hbm_state state); 38*4882a593Smuzhiyun 39*4882a593Smuzhiyun int mei_hbm_dispatch(struct mei_device *dev, struct mei_msg_hdr *hdr); 40*4882a593Smuzhiyun 41*4882a593Smuzhiyun void mei_hbm_idle(struct mei_device *dev); 42*4882a593Smuzhiyun void mei_hbm_reset(struct mei_device *dev); 43*4882a593Smuzhiyun int mei_hbm_start_req(struct mei_device *dev); 44*4882a593Smuzhiyun int mei_hbm_start_wait(struct mei_device *dev); 45*4882a593Smuzhiyun int mei_hbm_cl_flow_control_req(struct mei_device *dev, struct mei_cl *cl); 46*4882a593Smuzhiyun int mei_hbm_cl_disconnect_req(struct mei_device *dev, struct mei_cl *cl); 47*4882a593Smuzhiyun int mei_hbm_cl_disconnect_rsp(struct mei_device *dev, struct mei_cl *cl); 48*4882a593Smuzhiyun int mei_hbm_cl_connect_req(struct mei_device *dev, struct mei_cl *cl); 49*4882a593Smuzhiyun bool mei_hbm_version_is_supported(struct mei_device *dev); 50*4882a593Smuzhiyun int mei_hbm_pg(struct mei_device *dev, u8 pg_cmd); 51*4882a593Smuzhiyun void mei_hbm_pg_resume(struct mei_device *dev); 52*4882a593Smuzhiyun int mei_hbm_cl_notify_req(struct mei_device *dev, 53*4882a593Smuzhiyun struct mei_cl *cl, u8 request); 54*4882a593Smuzhiyun 55*4882a593Smuzhiyun #endif /* _MEI_HBM_H_ */ 56*4882a593Smuzhiyun 57