19fff0425STomas Winkler /* SPDX-License-Identifier: GPL-2.0 */ 20edb23fcSTomas Winkler /* 31e55b609STomas Winkler * Copyright (c) 2003-2018, Intel Corporation. All rights reserved. 40edb23fcSTomas Winkler * Intel Management Engine Interface (Intel MEI) Linux driver 50edb23fcSTomas Winkler */ 60edb23fcSTomas Winkler 70edb23fcSTomas Winkler #ifndef _MEI_HBM_H_ 80edb23fcSTomas Winkler #define _MEI_HBM_H_ 90edb23fcSTomas Winkler 109b0d5efcSTomas Winkler struct mei_device; 119b0d5efcSTomas Winkler struct mei_msg_hdr; 129b0d5efcSTomas Winkler struct mei_cl; 13*369aea84SAlexander Usyskin struct mei_dma_data; 149b0d5efcSTomas Winkler 159b0d5efcSTomas Winkler /** 169b0d5efcSTomas Winkler * enum mei_hbm_state - host bus message protocol state 179b0d5efcSTomas Winkler * 189b0d5efcSTomas Winkler * @MEI_HBM_IDLE : protocol not started 19cb02efc3SAlexander Usyskin * @MEI_HBM_STARTING : start request message was sent 20e5cab1f9SAlexander Usyskin * @MEI_HBM_CAP_SETUP : capabilities request message was sent 21c55bf542STomas Winkler * @MEI_HBM_DR_SETUP : dma ring setup request message was sent 229b0d5efcSTomas Winkler * @MEI_HBM_ENUM_CLIENTS : enumeration request was sent 239b0d5efcSTomas Winkler * @MEI_HBM_CLIENT_PROPERTIES : acquiring clients properties 245ebdc364STomas Winkler * @MEI_HBM_STARTED : enumeration was completed 25cb02efc3SAlexander Usyskin * @MEI_HBM_STOPPED : stopping exchange 269b0d5efcSTomas Winkler */ 279b0d5efcSTomas Winkler enum mei_hbm_state { 289b0d5efcSTomas Winkler MEI_HBM_IDLE = 0, 29cb02efc3SAlexander Usyskin MEI_HBM_STARTING, 30e5cab1f9SAlexander Usyskin MEI_HBM_CAP_SETUP, 31c55bf542STomas Winkler MEI_HBM_DR_SETUP, 329b0d5efcSTomas Winkler MEI_HBM_ENUM_CLIENTS, 339b0d5efcSTomas Winkler MEI_HBM_CLIENT_PROPERTIES, 345ebdc364STomas Winkler MEI_HBM_STARTED, 35544f9460STomas Winkler MEI_HBM_STOPPED, 369b0d5efcSTomas Winkler }; 379b0d5efcSTomas Winkler 381beeb4b9SAlexander Usyskin const char *mei_hbm_state_str(enum mei_hbm_state state); 391beeb4b9SAlexander Usyskin 40544f9460STomas Winkler int mei_hbm_dispatch(struct mei_device *dev, struct mei_msg_hdr *hdr); 410edb23fcSTomas Winkler 4266ae460bSTomas Winkler void mei_hbm_idle(struct mei_device *dev); 4384b3294aSTomas Winkler void mei_hbm_reset(struct mei_device *dev); 449b0d5efcSTomas Winkler int mei_hbm_start_req(struct mei_device *dev); 459b0d5efcSTomas Winkler int mei_hbm_start_wait(struct mei_device *dev); 460edb23fcSTomas Winkler int mei_hbm_cl_flow_control_req(struct mei_device *dev, struct mei_cl *cl); 470edb23fcSTomas Winkler int mei_hbm_cl_disconnect_req(struct mei_device *dev, struct mei_cl *cl); 486bb948c9STomas Winkler int mei_hbm_cl_disconnect_rsp(struct mei_device *dev, struct mei_cl *cl); 490edb23fcSTomas Winkler int mei_hbm_cl_connect_req(struct mei_device *dev, struct mei_cl *cl); 502c9b48acSTomas Winkler bool mei_hbm_version_is_supported(struct mei_device *dev); 514fcbc99bSTomas Winkler int mei_hbm_pg(struct mei_device *dev, u8 pg_cmd); 52859ef2ffSAlexander Usyskin void mei_hbm_pg_resume(struct mei_device *dev); 53965ae37aSTomas Winkler int mei_hbm_cl_notify_req(struct mei_device *dev, 54965ae37aSTomas Winkler struct mei_cl *cl, u8 request); 55*369aea84SAlexander Usyskin int mei_hbm_cl_dma_map_req(struct mei_device *dev, struct mei_cl *cl); 56*369aea84SAlexander Usyskin int mei_hbm_cl_dma_unmap_req(struct mei_device *dev, struct mei_cl *cl); 570edb23fcSTomas Winkler #endif /* _MEI_HBM_H_ */ 580edb23fcSTomas Winkler 59