| .. | .. |
|---|
| 1 | +/* SPDX-License-Identifier: GPL-2.0-only */ |
|---|
| 1 | 2 | /* |
|---|
| 2 | 3 | * Most ISHTP provider device and ISHTP logic declarations |
|---|
| 3 | 4 | * |
|---|
| 4 | 5 | * Copyright (c) 2003-2016, 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 | 6 | */ |
|---|
| 15 | 7 | |
|---|
| 16 | 8 | #ifndef _ISHTP_DEV_H_ |
|---|
| .. | .. |
|---|
| 77 | 69 | struct ishtp_fw_client { |
|---|
| 78 | 70 | struct ishtp_client_properties props; |
|---|
| 79 | 71 | uint8_t client_id; |
|---|
| 80 | | -}; |
|---|
| 81 | | - |
|---|
| 82 | | -/** |
|---|
| 83 | | - * struct ishtp_msg_data - ISHTP message data struct |
|---|
| 84 | | - * @size: Size of data in the *data |
|---|
| 85 | | - * @data: Pointer to data |
|---|
| 86 | | - */ |
|---|
| 87 | | -struct ishtp_msg_data { |
|---|
| 88 | | - uint32_t size; |
|---|
| 89 | | - unsigned char *data; |
|---|
| 90 | | -}; |
|---|
| 91 | | - |
|---|
| 92 | | -/* |
|---|
| 93 | | - * struct ishtp_cl_rb - request block structure |
|---|
| 94 | | - * @list: Link to list members |
|---|
| 95 | | - * @cl: ISHTP client instance |
|---|
| 96 | | - * @buffer: message header |
|---|
| 97 | | - * @buf_idx: Index into buffer |
|---|
| 98 | | - * @read_time: unused at this time |
|---|
| 99 | | - */ |
|---|
| 100 | | -struct ishtp_cl_rb { |
|---|
| 101 | | - struct list_head list; |
|---|
| 102 | | - struct ishtp_cl *cl; |
|---|
| 103 | | - struct ishtp_msg_data buffer; |
|---|
| 104 | | - unsigned long buf_idx; |
|---|
| 105 | | - unsigned long read_time; |
|---|
| 106 | 72 | }; |
|---|
| 107 | 73 | |
|---|
| 108 | 74 | /* |
|---|
| .. | .. |
|---|
| 207 | 173 | struct work_struct bh_hbm_work; |
|---|
| 208 | 174 | |
|---|
| 209 | 175 | /* IPC write queue */ |
|---|
| 210 | | - struct wr_msg_ctl_info wr_processing_list_head, wr_free_list_head; |
|---|
| 176 | + struct list_head wr_processing_list, wr_free_list; |
|---|
| 211 | 177 | /* For both processing list and free list */ |
|---|
| 212 | 178 | spinlock_t wr_processing_spinlock; |
|---|
| 213 | | - |
|---|
| 214 | | - spinlock_t out_ipc_spinlock; |
|---|
| 215 | 179 | |
|---|
| 216 | 180 | struct ishtp_fw_client *fw_clients; /*Note:memory has to be allocated*/ |
|---|
| 217 | 181 | DECLARE_BITMAP(fw_clients_map, ISHTP_CLIENTS_MAX); |
|---|
| .. | .. |
|---|
| 250 | 214 | const struct ishtp_hw_ops *ops; |
|---|
| 251 | 215 | size_t mtu; |
|---|
| 252 | 216 | uint32_t ishtp_msg_hdr; |
|---|
| 253 | | - char hw[0] __aligned(sizeof(void *)); |
|---|
| 217 | + char hw[] __aligned(sizeof(void *)); |
|---|
| 254 | 218 | }; |
|---|
| 255 | 219 | |
|---|
| 256 | 220 | static inline unsigned long ishtp_secs_to_jiffies(unsigned long sec) |
|---|
| .. | .. |
|---|
| 264 | 228 | static inline int ish_ipc_reset(struct ishtp_device *dev) |
|---|
| 265 | 229 | { |
|---|
| 266 | 230 | return dev->ops->ipc_reset(dev); |
|---|
| 267 | | -} |
|---|
| 268 | | - |
|---|
| 269 | | -static inline int ish_hw_reset(struct ishtp_device *dev) |
|---|
| 270 | | -{ |
|---|
| 271 | | - return dev->ops->hw_reset(dev); |
|---|
| 272 | 231 | } |
|---|
| 273 | 232 | |
|---|
| 274 | 233 | /* Exported function */ |
|---|