blob: 2544db7d1649b75b4a313e0c498e1727c416c494 [file] [log] [blame]
Tomas Winkler0edb23f2013-01-08 23:07:12 +02001/*
2 *
3 * Intel Management Engine Interface (Intel MEI) Linux driver
4 * Copyright (c) 2003-2012, Intel Corporation.
5 *
6 * This program is free software; you can redistribute it and/or modify it
7 * under the terms and conditions of the GNU General Public License,
8 * version 2, as published by the Free Software Foundation.
9 *
10 * This program is distributed in the hope it will be useful, but WITHOUT
11 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
12 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
13 * more details.
14 *
15 */
16
17#ifndef _MEI_HBM_H_
18#define _MEI_HBM_H_
19
Tomas Winkler9b0d5ef2013-04-18 23:03:48 +030020struct mei_device;
21struct mei_msg_hdr;
22struct mei_cl;
23
24/**
25 * enum mei_hbm_state - host bus message protocol state
26 *
27 * @MEI_HBM_IDLE : protocol not started
Alexander Usyskincb02efc2014-08-21 14:29:19 +030028 * @MEI_HBM_STARTING : start request message was sent
Tomas Winkler9b0d5ef2013-04-18 23:03:48 +030029 * @MEI_HBM_ENUM_CLIENTS : enumeration request was sent
30 * @MEI_HBM_CLIENT_PROPERTIES : acquiring clients properties
Tomas Winkler5ebdc362014-11-05 11:44:48 +020031 * @MEI_HBM_STARTED : enumeration was completed
Alexander Usyskincb02efc2014-08-21 14:29:19 +030032 * @MEI_HBM_STOPPED : stopping exchange
Tomas Winkler9b0d5ef2013-04-18 23:03:48 +030033 */
34enum mei_hbm_state {
35 MEI_HBM_IDLE = 0,
Alexander Usyskincb02efc2014-08-21 14:29:19 +030036 MEI_HBM_STARTING,
Tomas Winkler9b0d5ef2013-04-18 23:03:48 +030037 MEI_HBM_ENUM_CLIENTS,
38 MEI_HBM_CLIENT_PROPERTIES,
Tomas Winkler5ebdc362014-11-05 11:44:48 +020039 MEI_HBM_STARTED,
Tomas Winkler544f9462014-01-08 20:19:21 +020040 MEI_HBM_STOPPED,
Tomas Winkler9b0d5ef2013-04-18 23:03:48 +030041};
42
Alexander Usyskin1beeb4b2014-09-29 16:31:33 +030043const char *mei_hbm_state_str(enum mei_hbm_state state);
44
Tomas Winkler544f9462014-01-08 20:19:21 +020045int mei_hbm_dispatch(struct mei_device *dev, struct mei_msg_hdr *hdr);
Tomas Winkler0edb23f2013-01-08 23:07:12 +020046
Tomas Winkler66ae4602014-01-08 20:19:22 +020047void mei_hbm_idle(struct mei_device *dev);
Tomas Winkler84b32942014-05-07 16:51:28 +030048void mei_hbm_reset(struct mei_device *dev);
Tomas Winkler9b0d5ef2013-04-18 23:03:48 +030049int mei_hbm_start_req(struct mei_device *dev);
50int mei_hbm_start_wait(struct mei_device *dev);
Tomas Winkler0edb23f2013-01-08 23:07:12 +020051int mei_hbm_cl_flow_control_req(struct mei_device *dev, struct mei_cl *cl);
52int mei_hbm_cl_disconnect_req(struct mei_device *dev, struct mei_cl *cl);
Tomas Winkler6bb948c2014-02-12 21:41:52 +020053int mei_hbm_cl_disconnect_rsp(struct mei_device *dev, struct mei_cl *cl);
Tomas Winkler0edb23f2013-01-08 23:07:12 +020054int mei_hbm_cl_connect_req(struct mei_device *dev, struct mei_cl *cl);
Tomas Winkler2c9b48a2013-06-16 09:16:31 +030055bool mei_hbm_version_is_supported(struct mei_device *dev);
Tomas Winkler4fcbc992014-03-18 22:51:55 +020056int mei_hbm_pg(struct mei_device *dev, u8 pg_cmd);
Tomas Winkler0edb23f2013-01-08 23:07:12 +020057
58#endif /* _MEI_HBM_H_ */
59