forked from ~ljy/RK356X_SDK_RELEASE

hc
2024-05-16 8d2a02b24d66aa359e83eebc1ed3c0f85367a1cb
kernel/drivers/misc/mei/hw-me.h
....@@ -1,20 +1,8 @@
1
+/* SPDX-License-Identifier: GPL-2.0 */
12 /*
2
- *
3
+ * Copyright (c) 2012-2020, Intel Corporation. All rights reserved.
34 * 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
- *
155 */
16
-
17
-
186
197 #ifndef _MEI_INTERFACE_H_
208 #define _MEI_INTERFACE_H_
....@@ -31,14 +19,18 @@
3119 *
3220 * @fw_status: FW status
3321 * @quirk_probe: device exclusion quirk
22
+ * @kind: MEI head kind
3423 * @dma_size: device DMA buffers size
3524 * @fw_ver_supported: is fw version retrievable from FW
25
+ * @hw_trc_supported: does the hw support trc register
3626 */
3727 struct mei_cfg {
3828 const struct mei_fw_status fw_status;
39
- bool (*quirk_probe)(struct pci_dev *pdev);
29
+ bool (*quirk_probe)(const struct pci_dev *pdev);
30
+ const char *kind;
4031 size_t dma_size[DMA_DSCR_NUM];
4132 u32 fw_ver_supported:1;
33
+ u32 hw_trc_supported:1;
4234 };
4335
4436
....@@ -54,16 +46,20 @@
5446 *
5547 * @cfg: per device generation config and ops
5648 * @mem_addr: io memory address
49
+ * @irq: irq number
5750 * @pg_state: power gating state
5851 * @d0i3_supported: di03 support
5952 * @hbuf_depth: depth of hardware host/write buffer in slots
53
+ * @read_fws: read FW status register handler
6054 */
6155 struct mei_me_hw {
6256 const struct mei_cfg *cfg;
6357 void __iomem *mem_addr;
58
+ int irq;
6459 enum mei_pg_state pg_state;
6560 bool d0i3_supported;
6661 u8 hbuf_depth;
62
+ int (*read_fws)(const struct mei_device *dev, int where, u32 *val);
6763 };
6864
6965 #define to_me_hw(dev) (struct mei_me_hw *)((dev)->hw)
....@@ -82,10 +78,22 @@
8278 * with quirk for Node Manager exclusion.
8379 * @MEI_ME_PCH8_CFG: Platform Controller Hub Gen8 and newer
8480 * client platforms.
85
- * @MEI_ME_PCH8_SPS_CFG: Platform Controller Hub Gen8 and newer
81
+ * @MEI_ME_PCH8_ITOUCH_CFG:Platform Controller Hub Gen8 and newer
82
+ * client platforms (iTouch).
83
+ * @MEI_ME_PCH8_SPS_4_CFG: Platform Controller Hub Gen8 and newer
8684 * servers platforms with quirk for
8785 * SPS firmware exclusion.
8886 * @MEI_ME_PCH12_CFG: Platform Controller Hub Gen12 and newer
87
+ * @MEI_ME_PCH12_SPS_4_CFG:Platform Controller Hub Gen12 up to 4.0
88
+ * servers platforms with quirk for
89
+ * SPS firmware exclusion.
90
+ * @MEI_ME_PCH12_SPS_CFG: Platform Controller Hub Gen12 5.0 and newer
91
+ * servers platforms with quirk for
92
+ * SPS firmware exclusion.
93
+ * @MEI_ME_PCH15_CFG: Platform Controller Hub Gen15 and newer
94
+ * @MEI_ME_PCH15_SPS_CFG: Platform Controller Hub Gen15 and newer
95
+ * servers platforms with quirk for
96
+ * SPS firmware exclusion.
8997 * @MEI_ME_NUM_CFG: Upper Sentinel.
9098 */
9199 enum mei_cfg_idx {
....@@ -96,14 +104,20 @@
96104 MEI_ME_PCH7_CFG,
97105 MEI_ME_PCH_CPT_PBG_CFG,
98106 MEI_ME_PCH8_CFG,
99
- MEI_ME_PCH8_SPS_CFG,
107
+ MEI_ME_PCH8_ITOUCH_CFG,
108
+ MEI_ME_PCH8_SPS_4_CFG,
100109 MEI_ME_PCH12_CFG,
110
+ MEI_ME_PCH12_SPS_4_CFG,
111
+ MEI_ME_PCH12_SPS_CFG,
112
+ MEI_ME_PCH12_SPS_ITOUCH_CFG,
113
+ MEI_ME_PCH15_CFG,
114
+ MEI_ME_PCH15_SPS_CFG,
101115 MEI_ME_NUM_CFG,
102116 };
103117
104118 const struct mei_cfg *mei_me_get_cfg(kernel_ulong_t idx);
105119
106
-struct mei_device *mei_me_dev_init(struct pci_dev *pdev,
120
+struct mei_device *mei_me_dev_init(struct device *parent,
107121 const struct mei_cfg *cfg);
108122
109123 int mei_me_pg_enter_sync(struct mei_device *dev);