Skip to content

Commit 7026a5f

Browse files
ausyskingregkh
authored andcommitted
mei: define dma ring buffer sizes for PCH12 HW and newer
Define dma ring buffer sizes for PCH12 (CLN HW and newer) Signed-off-by: Alexander Usyskin <[email protected]> Signed-off-by: Tomas Winkler <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
1 parent c2bd9fc commit 7026a5f

File tree

2 files changed

+17
-0
lines changed

2 files changed

+17
-0
lines changed

drivers/misc/mei/hw-me.c

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@
1919
#include <linux/kthread.h>
2020
#include <linux/interrupt.h>
2121
#include <linux/pm_runtime.h>
22+
#include <linux/sizes.h>
2223

2324
#include "mei_dev.h"
2425
#include "hbm.h"
@@ -1389,6 +1390,11 @@ static bool mei_me_fw_type_sps(struct pci_dev *pdev)
13891390
.fw_status.status[4] = PCI_CFG_HFS_5, \
13901391
.fw_status.status[5] = PCI_CFG_HFS_6
13911392

1393+
#define MEI_CFG_DMA_128 \
1394+
.dma_size[DMA_DSCR_HOST] = SZ_128K, \
1395+
.dma_size[DMA_DSCR_DEVICE] = SZ_128K, \
1396+
.dma_size[DMA_DSCR_CTRL] = PAGE_SIZE
1397+
13921398
/* ICH Legacy devices */
13931399
static const struct mei_cfg mei_me_ich_cfg = {
13941400
MEI_CFG_ICH_HFS,
@@ -1421,6 +1427,12 @@ static const struct mei_cfg mei_me_pch8_sps_cfg = {
14211427
MEI_CFG_FW_SPS,
14221428
};
14231429

1430+
/* Cannon Lake and newer devices */
1431+
static const struct mei_cfg mei_me_pch12_cfg = {
1432+
MEI_CFG_PCH8_HFS,
1433+
MEI_CFG_DMA_128,
1434+
};
1435+
14241436
/*
14251437
* mei_cfg_list - A list of platform platform specific configurations.
14261438
* Note: has to be synchronized with enum mei_cfg_idx.
@@ -1433,6 +1445,7 @@ static const struct mei_cfg *const mei_cfg_list[] = {
14331445
[MEI_ME_PCH_CPT_PBG_CFG] = &mei_me_pch_cpt_pbg_cfg,
14341446
[MEI_ME_PCH8_CFG] = &mei_me_pch8_cfg,
14351447
[MEI_ME_PCH8_SPS_CFG] = &mei_me_pch8_sps_cfg,
1448+
[MEI_ME_PCH12_CFG] = &mei_me_pch12_cfg,
14361449
};
14371450

14381451
const struct mei_cfg *mei_me_get_cfg(kernel_ulong_t idx)

drivers/misc/mei/hw-me.h

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,10 +31,12 @@
3131
*
3232
* @fw_status: FW status
3333
* @quirk_probe: device exclusion quirk
34+
* @dma_size: device DMA buffers size
3435
*/
3536
struct mei_cfg {
3637
const struct mei_fw_status fw_status;
3738
bool (*quirk_probe)(struct pci_dev *pdev);
39+
size_t dma_size[DMA_DSCR_NUM];
3840
};
3941

4042

@@ -80,6 +82,7 @@ struct mei_me_hw {
8082
* @MEI_ME_PCH8_SPS_CFG: Platform Controller Hub Gen8 and newer
8183
* servers platforms with quirk for
8284
* SPS firmware exclusion.
85+
* @MEI_ME_PCH12_CFG: Platform Controller Hub Gen12 and newer
8386
* @MEI_ME_NUM_CFG: Upper Sentinel.
8487
*/
8588
enum mei_cfg_idx {
@@ -90,6 +93,7 @@ enum mei_cfg_idx {
9093
MEI_ME_PCH_CPT_PBG_CFG,
9194
MEI_ME_PCH8_CFG,
9295
MEI_ME_PCH8_SPS_CFG,
96+
MEI_ME_PCH12_CFG,
9397
MEI_ME_NUM_CFG,
9498
};
9599

0 commit comments

Comments
 (0)