Tomas Winkler | 0edb23f | 2013-01-08 23:07:12 +0200 | [diff] [blame] | 1 | /* |
| 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 Winkler | 9b0d5ef | 2013-04-18 23:03:48 +0300 | [diff] [blame] | 20 | struct mei_device; |
| 21 | struct mei_msg_hdr; |
| 22 | struct mei_cl; |
| 23 | |
| 24 | /** |
| 25 | * enum mei_hbm_state - host bus message protocol state |
| 26 | * |
| 27 | * @MEI_HBM_IDLE : protocol not started |
| 28 | * @MEI_HBM_START : start request message was sent |
| 29 | * @MEI_HBM_ENUM_CLIENTS : enumeration request was sent |
| 30 | * @MEI_HBM_CLIENT_PROPERTIES : acquiring clients properties |
| 31 | */ |
| 32 | enum mei_hbm_state { |
| 33 | MEI_HBM_IDLE = 0, |
| 34 | MEI_HBM_START, |
Tomas Winkler | 544f946 | 2014-01-08 20:19:21 +0200 | [diff] [blame] | 35 | MEI_HBM_STARTED, |
Tomas Winkler | 9b0d5ef | 2013-04-18 23:03:48 +0300 | [diff] [blame] | 36 | MEI_HBM_ENUM_CLIENTS, |
| 37 | MEI_HBM_CLIENT_PROPERTIES, |
Tomas Winkler | 544f946 | 2014-01-08 20:19:21 +0200 | [diff] [blame] | 38 | MEI_HBM_STOPPED, |
Tomas Winkler | 9b0d5ef | 2013-04-18 23:03:48 +0300 | [diff] [blame] | 39 | }; |
| 40 | |
Tomas Winkler | 544f946 | 2014-01-08 20:19:21 +0200 | [diff] [blame] | 41 | int mei_hbm_dispatch(struct mei_device *dev, struct mei_msg_hdr *hdr); |
Tomas Winkler | 0edb23f | 2013-01-08 23:07:12 +0200 | [diff] [blame] | 42 | |
| 43 | static inline void mei_hbm_hdr(struct mei_msg_hdr *hdr, size_t length) |
| 44 | { |
| 45 | hdr->host_addr = 0; |
| 46 | hdr->me_addr = 0; |
| 47 | hdr->length = length; |
| 48 | hdr->msg_complete = 1; |
| 49 | hdr->reserved = 0; |
| 50 | } |
| 51 | |
Tomas Winkler | 66ae460 | 2014-01-08 20:19:22 +0200 | [diff] [blame] | 52 | void mei_hbm_idle(struct mei_device *dev); |
Tomas Winkler | 9b0d5ef | 2013-04-18 23:03:48 +0300 | [diff] [blame] | 53 | int mei_hbm_start_req(struct mei_device *dev); |
| 54 | int mei_hbm_start_wait(struct mei_device *dev); |
Tomas Winkler | 0edb23f | 2013-01-08 23:07:12 +0200 | [diff] [blame] | 55 | int mei_hbm_cl_flow_control_req(struct mei_device *dev, struct mei_cl *cl); |
| 56 | int mei_hbm_cl_disconnect_req(struct mei_device *dev, struct mei_cl *cl); |
Tomas Winkler | 6bb948c | 2014-02-12 21:41:52 +0200 | [diff] [blame] | 57 | int mei_hbm_cl_disconnect_rsp(struct mei_device *dev, struct mei_cl *cl); |
Tomas Winkler | 0edb23f | 2013-01-08 23:07:12 +0200 | [diff] [blame] | 58 | int mei_hbm_cl_connect_req(struct mei_device *dev, struct mei_cl *cl); |
Tomas Winkler | 2c9b48a | 2013-06-16 09:16:31 +0300 | [diff] [blame] | 59 | bool mei_hbm_version_is_supported(struct mei_device *dev); |
Tomas Winkler | 0edb23f | 2013-01-08 23:07:12 +0200 | [diff] [blame] | 60 | |
| 61 | #endif /* _MEI_HBM_H_ */ |
| 62 | |