aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/misc
diff options
context:
space:
mode:
authorAlexander Usyskin <alexander.usyskin@intel.com>2014-05-12 18:30:53 -0400
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2014-05-27 17:16:38 -0400
commit8d929d4862fdfc4a524fd4c799b8dfa3b187fe8c (patch)
tree566696826999ee88f5901825803c6740d2c3180a /drivers/misc
parentc40765d919d25d2d44d99c4ce39e48808f137e1e (diff)
mei: add per device configuration
Add mei_cfg structure that holds per device configuration data and hooks, as the first step we add firmware status register offsets Signed-off-by: Alexander Usyskin <alexander.usyskin@intel.com> Signed-off-by: Tomas Winkler <tomas.winkler@intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/misc')
-rw-r--r--drivers/misc/mei/hw-me.c34
-rw-r--r--drivers/misc/mei/hw-me.h7
-rw-r--r--drivers/misc/mei/hw-txe.c17
-rw-r--r--drivers/misc/mei/hw-txe.h5
-rw-r--r--drivers/misc/mei/init.c24
-rw-r--r--drivers/misc/mei/mei_dev.h27
-rw-r--r--drivers/misc/mei/pci-me.c77
-rw-r--r--drivers/misc/mei/pci-txe.c5
8 files changed, 144 insertions, 52 deletions
diff --git a/drivers/misc/mei/hw-me.c b/drivers/misc/mei/hw-me.c
index 016ad88a2887..ed081182f973 100644
--- a/drivers/misc/mei/hw-me.c
+++ b/drivers/misc/mei/hw-me.c
@@ -792,14 +792,44 @@ static const struct mei_hw_ops mei_me_hw_ops = {
792 .read = mei_me_read_slots 792 .read = mei_me_read_slots
793}; 793};
794 794
795#define MEI_CFG_LEGACY_HFS \
796 .fw_status.count = 0
797
798#define MEI_CFG_ICH_HFS \
799 .fw_status.count = 1, \
800 .fw_status.status[0] = PCI_CFG_HFS_1
801
802#define MEI_CFG_PCH_HFS \
803 .fw_status.count = 2, \
804 .fw_status.status[0] = PCI_CFG_HFS_1, \
805 .fw_status.status[1] = PCI_CFG_HFS_2
806
807
808/* ICH Legacy devices */
809const struct mei_cfg mei_me_legacy_cfg = {
810 MEI_CFG_LEGACY_HFS,
811};
812
813/* ICH devices */
814const struct mei_cfg mei_me_ich_cfg = {
815 MEI_CFG_ICH_HFS,
816};
817
818/* PCH devices */
819const struct mei_cfg mei_me_pch_cfg = {
820 MEI_CFG_PCH_HFS,
821};
822
795/** 823/**
796 * mei_me_dev_init - allocates and initializes the mei device structure 824 * mei_me_dev_init - allocates and initializes the mei device structure
797 * 825 *
798 * @pdev: The pci device structure 826 * @pdev: The pci device structure
827 * @cfg: per device generation config
799 * 828 *
800 * returns The mei_device_device pointer on success, NULL on failure. 829 * returns The mei_device_device pointer on success, NULL on failure.
801 */ 830 */
802struct mei_device *mei_me_dev_init(struct pci_dev *pdev) 831struct mei_device *mei_me_dev_init(struct pci_dev *pdev,
832 const struct mei_cfg *cfg)
803{ 833{
804 struct mei_device *dev; 834 struct mei_device *dev;
805 835
@@ -808,7 +838,7 @@ struct mei_device *mei_me_dev_init(struct pci_dev *pdev)
808 if (!dev) 838 if (!dev)
809 return NULL; 839 return NULL;
810 840
811 mei_device_init(dev); 841 mei_device_init(dev, cfg);
812 842
813 dev->ops = &mei_me_hw_ops; 843 dev->ops = &mei_me_hw_ops;
814 844
diff --git a/drivers/misc/mei/hw-me.h b/drivers/misc/mei/hw-me.h
index 0a75ab85b3a2..473aafbc4023 100644
--- a/drivers/misc/mei/hw-me.h
+++ b/drivers/misc/mei/hw-me.h
@@ -38,7 +38,12 @@ struct mei_me_hw {
38 38
39#define to_me_hw(dev) (struct mei_me_hw *)((dev)->hw) 39#define to_me_hw(dev) (struct mei_me_hw *)((dev)->hw)
40 40
41struct mei_device *mei_me_dev_init(struct pci_dev *pdev); 41extern const struct mei_cfg mei_me_legacy_cfg;
42extern const struct mei_cfg mei_me_ich_cfg;
43extern const struct mei_cfg mei_me_pch_cfg;
44
45struct mei_device *mei_me_dev_init(struct pci_dev *pdev,
46 const struct mei_cfg *cfg);
42 47
43int mei_me_pg_set_sync(struct mei_device *dev); 48int mei_me_pg_set_sync(struct mei_device *dev);
44int mei_me_pg_unset_sync(struct mei_device *dev); 49int mei_me_pg_unset_sync(struct mei_device *dev);
diff --git a/drivers/misc/mei/hw-txe.c b/drivers/misc/mei/hw-txe.c
index 455a6a56b82b..93273783dec5 100644
--- a/drivers/misc/mei/hw-txe.c
+++ b/drivers/misc/mei/hw-txe.c
@@ -1104,14 +1104,27 @@ static const struct mei_hw_ops mei_txe_hw_ops = {
1104 1104
1105}; 1105};
1106 1106
1107#define MEI_CFG_TXE_FW_STS \
1108 .fw_status.count = 2, \
1109 .fw_status.status[0] = PCI_CFG_TXE_FW_STS0, \
1110 .fw_status.status[1] = PCI_CFG_TXE_FW_STS1
1111
1112const struct mei_cfg mei_txe_cfg = {
1113 MEI_CFG_TXE_FW_STS,
1114};
1115
1116
1107/** 1117/**
1108 * mei_txe_dev_init - allocates and initializes txe hardware specific structure 1118 * mei_txe_dev_init - allocates and initializes txe hardware specific structure
1109 * 1119 *
1110 * @pdev - pci device 1120 * @pdev - pci device
1121 * @cfg - per device generation config
1122 *
1111 * returns struct mei_device * on success or NULL; 1123 * returns struct mei_device * on success or NULL;
1112 * 1124 *
1113 */ 1125 */
1114struct mei_device *mei_txe_dev_init(struct pci_dev *pdev) 1126struct mei_device *mei_txe_dev_init(struct pci_dev *pdev,
1127 const struct mei_cfg *cfg)
1115{ 1128{
1116 struct mei_device *dev; 1129 struct mei_device *dev;
1117 struct mei_txe_hw *hw; 1130 struct mei_txe_hw *hw;
@@ -1121,7 +1134,7 @@ struct mei_device *mei_txe_dev_init(struct pci_dev *pdev)
1121 if (!dev) 1134 if (!dev)
1122 return NULL; 1135 return NULL;
1123 1136
1124 mei_device_init(dev); 1137 mei_device_init(dev, cfg);
1125 1138
1126 hw = to_txe_hw(dev); 1139 hw = to_txe_hw(dev);
1127 1140
diff --git a/drivers/misc/mei/hw-txe.h b/drivers/misc/mei/hw-txe.h
index e8dd2d165c25..e244af79167f 100644
--- a/drivers/misc/mei/hw-txe.h
+++ b/drivers/misc/mei/hw-txe.h
@@ -61,7 +61,10 @@ static inline struct mei_device *hw_txe_to_mei(struct mei_txe_hw *hw)
61 return container_of((void *)hw, struct mei_device, hw); 61 return container_of((void *)hw, struct mei_device, hw);
62} 62}
63 63
64struct mei_device *mei_txe_dev_init(struct pci_dev *pdev); 64extern const struct mei_cfg mei_txe_cfg;
65
66struct mei_device *mei_txe_dev_init(struct pci_dev *pdev,
67 const struct mei_cfg *cfg);
65 68
66irqreturn_t mei_txe_irq_quick_handler(int irq, void *dev_id); 69irqreturn_t mei_txe_irq_quick_handler(int irq, void *dev_id);
67irqreturn_t mei_txe_irq_thread_handler(int irq, void *dev_id); 70irqreturn_t mei_txe_irq_thread_handler(int irq, void *dev_id);
diff --git a/drivers/misc/mei/init.c b/drivers/misc/mei/init.c
index 510f378b1f06..006929222481 100644
--- a/drivers/misc/mei/init.c
+++ b/drivers/misc/mei/init.c
@@ -330,7 +330,28 @@ bool mei_write_is_idle(struct mei_device *dev)
330} 330}
331EXPORT_SYMBOL_GPL(mei_write_is_idle); 331EXPORT_SYMBOL_GPL(mei_write_is_idle);
332 332
333void mei_device_init(struct mei_device *dev) 333int mei_fw_status(struct mei_device *dev, struct mei_fw_status *fw_status)
334{
335 int i;
336 const struct mei_fw_status *fw_src = &dev->cfg->fw_status;
337
338 if (!fw_status)
339 return -EINVAL;
340
341 fw_status->count = fw_src->count;
342 for (i = 0; i < fw_src->count && i < MEI_FW_STATUS_MAX; i++) {
343 int ret;
344 ret = pci_read_config_dword(dev->pdev,
345 fw_src->status[i], &fw_status->status[i]);
346 if (ret)
347 return ret;
348 }
349
350 return 0;
351}
352EXPORT_SYMBOL_GPL(mei_fw_status);
353
354void mei_device_init(struct mei_device *dev, const struct mei_cfg *cfg)
334{ 355{
335 /* setup our list array */ 356 /* setup our list array */
336 INIT_LIST_HEAD(&dev->file_list); 357 INIT_LIST_HEAD(&dev->file_list);
@@ -368,6 +389,7 @@ void mei_device_init(struct mei_device *dev)
368 bitmap_set(dev->host_clients_map, 0, 1); 389 bitmap_set(dev->host_clients_map, 0, 1);
369 390
370 dev->pg_event = MEI_PG_EVENT_IDLE; 391 dev->pg_event = MEI_PG_EVENT_IDLE;
392 dev->cfg = cfg;
371} 393}
372EXPORT_SYMBOL_GPL(mei_device_init); 394EXPORT_SYMBOL_GPL(mei_device_init);
373 395
diff --git a/drivers/misc/mei/mei_dev.h b/drivers/misc/mei/mei_dev.h
index 1aaaf0b6681c..909d13de17e9 100644
--- a/drivers/misc/mei/mei_dev.h
+++ b/drivers/misc/mei/mei_dev.h
@@ -379,6 +379,22 @@ enum mei_pg_state {
379 MEI_PG_ON = 1, 379 MEI_PG_ON = 1,
380}; 380};
381 381
382/*
383 * mei_cfg
384 *
385 * @fw_status - FW status
386 */
387struct mei_cfg {
388 const struct mei_fw_status fw_status;
389};
390
391
392#define MEI_PCI_DEVICE(dev, cfg) \
393 .vendor = PCI_VENDOR_ID_INTEL, .device = (dev), \
394 .subvendor = PCI_ANY_ID, .subdevice = PCI_ANY_ID, \
395 .driver_data = (kernel_ulong_t)&(cfg)
396
397
382/** 398/**
383 * struct mei_device - MEI private device struct 399 * struct mei_device - MEI private device struct
384 400
@@ -390,6 +406,7 @@ enum mei_pg_state {
390 * @hbuf_depth - depth of hardware host/write buffer is slots 406 * @hbuf_depth - depth of hardware host/write buffer is slots
391 * @hbuf_is_ready - query if the host host/write buffer is ready 407 * @hbuf_is_ready - query if the host host/write buffer is ready
392 * @wr_msg - the buffer for hbm control messages 408 * @wr_msg - the buffer for hbm control messages
409 * @cfg - per device generation config and ops
393 */ 410 */
394struct mei_device { 411struct mei_device {
395 struct pci_dev *pdev; /* pointer to pci device struct */ 412 struct pci_dev *pdev; /* pointer to pci device struct */
@@ -500,6 +517,7 @@ struct mei_device {
500 517
501 518
502 const struct mei_hw_ops *ops; 519 const struct mei_hw_ops *ops;
520 const struct mei_cfg *cfg;
503 char hw[0] __aligned(sizeof(void *)); 521 char hw[0] __aligned(sizeof(void *));
504}; 522};
505 523
@@ -532,7 +550,7 @@ static inline u32 mei_slots2data(int slots)
532/* 550/*
533 * mei init function prototypes 551 * mei init function prototypes
534 */ 552 */
535void mei_device_init(struct mei_device *dev); 553void mei_device_init(struct mei_device *dev, const struct mei_cfg *cfg);
536int mei_reset(struct mei_device *dev); 554int mei_reset(struct mei_device *dev);
537int mei_start(struct mei_device *dev); 555int mei_start(struct mei_device *dev);
538int mei_restart(struct mei_device *dev); 556int mei_restart(struct mei_device *dev);
@@ -611,6 +629,7 @@ void mei_watchdog_unregister(struct mei_device *dev);
611 * Register Access Function 629 * Register Access Function
612 */ 630 */
613 631
632
614static inline void mei_hw_config(struct mei_device *dev) 633static inline void mei_hw_config(struct mei_device *dev)
615{ 634{
616 dev->ops->hw_config(dev); 635 dev->ops->hw_config(dev);
@@ -698,11 +717,7 @@ static inline int mei_count_full_read_slots(struct mei_device *dev)
698 return dev->ops->rdbuf_full_slots(dev); 717 return dev->ops->rdbuf_full_slots(dev);
699} 718}
700 719
701static inline int mei_fw_status(struct mei_device *dev, 720int mei_fw_status(struct mei_device *dev, struct mei_fw_status *fw_status);
702 struct mei_fw_status *fw_status)
703{
704 return dev->ops->fw_status(dev, fw_status);
705}
706 721
707#define FW_STS_FMT "%08X %08X" 722#define FW_STS_FMT "%08X %08X"
708#define FW_STS_PRM(fw_status) \ 723#define FW_STS_PRM(fw_status) \
diff --git a/drivers/misc/mei/pci-me.c b/drivers/misc/mei/pci-me.c
index 88516b02c685..6cb9819ac5d5 100644
--- a/drivers/misc/mei/pci-me.c
+++ b/drivers/misc/mei/pci-me.c
@@ -44,42 +44,44 @@
44 44
45/* mei_pci_tbl - PCI Device ID Table */ 45/* mei_pci_tbl - PCI Device ID Table */
46static const struct pci_device_id mei_me_pci_tbl[] = { 46static const struct pci_device_id mei_me_pci_tbl[] = {
47 {PCI_DEVICE(PCI_VENDOR_ID_INTEL, MEI_DEV_ID_82946GZ)}, 47 {MEI_PCI_DEVICE(MEI_DEV_ID_82946GZ, mei_me_legacy_cfg)},
48 {PCI_DEVICE(PCI_VENDOR_ID_INTEL, MEI_DEV_ID_82G35)}, 48 {MEI_PCI_DEVICE(MEI_DEV_ID_82G35, mei_me_legacy_cfg)},
49 {PCI_DEVICE(PCI_VENDOR_ID_INTEL, MEI_DEV_ID_82Q965)}, 49 {MEI_PCI_DEVICE(MEI_DEV_ID_82Q965, mei_me_legacy_cfg)},
50 {PCI_DEVICE(PCI_VENDOR_ID_INTEL, MEI_DEV_ID_82G965)}, 50 {MEI_PCI_DEVICE(MEI_DEV_ID_82G965, mei_me_legacy_cfg)},
51 {PCI_DEVICE(PCI_VENDOR_ID_INTEL, MEI_DEV_ID_82GM965)}, 51 {MEI_PCI_DEVICE(MEI_DEV_ID_82GM965, mei_me_legacy_cfg)},
52 {PCI_DEVICE(PCI_VENDOR_ID_INTEL, MEI_DEV_ID_82GME965)}, 52 {MEI_PCI_DEVICE(MEI_DEV_ID_82GME965, mei_me_legacy_cfg)},
53 {PCI_DEVICE(PCI_VENDOR_ID_INTEL, MEI_DEV_ID_ICH9_82Q35)}, 53 {MEI_PCI_DEVICE(MEI_DEV_ID_ICH9_82Q35, mei_me_legacy_cfg)},
54 {PCI_DEVICE(PCI_VENDOR_ID_INTEL, MEI_DEV_ID_ICH9_82G33)}, 54 {MEI_PCI_DEVICE(MEI_DEV_ID_ICH9_82G33, mei_me_legacy_cfg)},
55 {PCI_DEVICE(PCI_VENDOR_ID_INTEL, MEI_DEV_ID_ICH9_82Q33)}, 55 {MEI_PCI_DEVICE(MEI_DEV_ID_ICH9_82Q33, mei_me_legacy_cfg)},
56 {PCI_DEVICE(PCI_VENDOR_ID_INTEL, MEI_DEV_ID_ICH9_82X38)}, 56 {MEI_PCI_DEVICE(MEI_DEV_ID_ICH9_82X38, mei_me_legacy_cfg)},
57 {PCI_DEVICE(PCI_VENDOR_ID_INTEL, MEI_DEV_ID_ICH9_3200)}, 57 {MEI_PCI_DEVICE(MEI_DEV_ID_ICH9_3200, mei_me_legacy_cfg)},
58 {PCI_DEVICE(PCI_VENDOR_ID_INTEL, MEI_DEV_ID_ICH9_6)}, 58
59 {PCI_DEVICE(PCI_VENDOR_ID_INTEL, MEI_DEV_ID_ICH9_7)}, 59 {MEI_PCI_DEVICE(MEI_DEV_ID_ICH9_6, mei_me_legacy_cfg)},
60 {PCI_DEVICE(PCI_VENDOR_ID_INTEL, MEI_DEV_ID_ICH9_8)}, 60 {MEI_PCI_DEVICE(MEI_DEV_ID_ICH9_7, mei_me_legacy_cfg)},
61 {PCI_DEVICE(PCI_VENDOR_ID_INTEL, MEI_DEV_ID_ICH9_9)}, 61 {MEI_PCI_DEVICE(MEI_DEV_ID_ICH9_8, mei_me_legacy_cfg)},
62 {PCI_DEVICE(PCI_VENDOR_ID_INTEL, MEI_DEV_ID_ICH9_10)}, 62 {MEI_PCI_DEVICE(MEI_DEV_ID_ICH9_9, mei_me_legacy_cfg)},
63 {PCI_DEVICE(PCI_VENDOR_ID_INTEL, MEI_DEV_ID_ICH9M_1)}, 63 {MEI_PCI_DEVICE(MEI_DEV_ID_ICH9_10, mei_me_legacy_cfg)},
64 {PCI_DEVICE(PCI_VENDOR_ID_INTEL, MEI_DEV_ID_ICH9M_2)}, 64 {MEI_PCI_DEVICE(MEI_DEV_ID_ICH9M_1, mei_me_legacy_cfg)},
65 {PCI_DEVICE(PCI_VENDOR_ID_INTEL, MEI_DEV_ID_ICH9M_3)}, 65 {MEI_PCI_DEVICE(MEI_DEV_ID_ICH9M_2, mei_me_legacy_cfg)},
66 {PCI_DEVICE(PCI_VENDOR_ID_INTEL, MEI_DEV_ID_ICH9M_4)}, 66 {MEI_PCI_DEVICE(MEI_DEV_ID_ICH9M_3, mei_me_legacy_cfg)},
67 {PCI_DEVICE(PCI_VENDOR_ID_INTEL, MEI_DEV_ID_ICH10_1)}, 67 {MEI_PCI_DEVICE(MEI_DEV_ID_ICH9M_4, mei_me_legacy_cfg)},
68 {PCI_DEVICE(PCI_VENDOR_ID_INTEL, MEI_DEV_ID_ICH10_2)}, 68 {MEI_PCI_DEVICE(MEI_DEV_ID_ICH10_1, mei_me_ich_cfg)},
69 {PCI_DEVICE(PCI_VENDOR_ID_INTEL, MEI_DEV_ID_ICH10_3)}, 69 {MEI_PCI_DEVICE(MEI_DEV_ID_ICH10_2, mei_me_ich_cfg)},
70 {PCI_DEVICE(PCI_VENDOR_ID_INTEL, MEI_DEV_ID_ICH10_4)}, 70 {MEI_PCI_DEVICE(MEI_DEV_ID_ICH10_3, mei_me_ich_cfg)},
71 {PCI_DEVICE(PCI_VENDOR_ID_INTEL, MEI_DEV_ID_IBXPK_1)}, 71 {MEI_PCI_DEVICE(MEI_DEV_ID_ICH10_4, mei_me_ich_cfg)},
72 {PCI_DEVICE(PCI_VENDOR_ID_INTEL, MEI_DEV_ID_IBXPK_2)}, 72
73 {PCI_DEVICE(PCI_VENDOR_ID_INTEL, MEI_DEV_ID_CPT_1)}, 73 {MEI_PCI_DEVICE(MEI_DEV_ID_IBXPK_1, mei_me_pch_cfg)},
74 {PCI_DEVICE(PCI_VENDOR_ID_INTEL, MEI_DEV_ID_PBG_1)}, 74 {MEI_PCI_DEVICE(MEI_DEV_ID_IBXPK_2, mei_me_pch_cfg)},
75 {PCI_DEVICE(PCI_VENDOR_ID_INTEL, MEI_DEV_ID_PPT_1)}, 75 {MEI_PCI_DEVICE(MEI_DEV_ID_CPT_1, mei_me_pch_cfg)},
76 {PCI_DEVICE(PCI_VENDOR_ID_INTEL, MEI_DEV_ID_PPT_2)}, 76 {MEI_PCI_DEVICE(MEI_DEV_ID_PBG_1, mei_me_pch_cfg)},
77 {PCI_DEVICE(PCI_VENDOR_ID_INTEL, MEI_DEV_ID_PPT_3)}, 77 {MEI_PCI_DEVICE(MEI_DEV_ID_PPT_1, mei_me_pch_cfg)},
78 {PCI_DEVICE(PCI_VENDOR_ID_INTEL, MEI_DEV_ID_LPT_H)}, 78 {MEI_PCI_DEVICE(MEI_DEV_ID_PPT_2, mei_me_pch_cfg)},
79 {PCI_DEVICE(PCI_VENDOR_ID_INTEL, MEI_DEV_ID_LPT_W)}, 79 {MEI_PCI_DEVICE(MEI_DEV_ID_PPT_3, mei_me_pch_cfg)},
80 {PCI_DEVICE(PCI_VENDOR_ID_INTEL, MEI_DEV_ID_LPT_LP)}, 80 {MEI_PCI_DEVICE(MEI_DEV_ID_LPT_H, mei_me_pch_cfg)},
81 {PCI_DEVICE(PCI_VENDOR_ID_INTEL, MEI_DEV_ID_LPT_HR)}, 81 {MEI_PCI_DEVICE(MEI_DEV_ID_LPT_W, mei_me_pch_cfg)},
82 {PCI_DEVICE(PCI_VENDOR_ID_INTEL, MEI_DEV_ID_WPT_LP)}, 82 {MEI_PCI_DEVICE(MEI_DEV_ID_LPT_LP, mei_me_pch_cfg)},
83 {MEI_PCI_DEVICE(MEI_DEV_ID_LPT_HR, mei_me_pch_cfg)},
84 {MEI_PCI_DEVICE(MEI_DEV_ID_WPT_LP, mei_me_pch_cfg)},
83 85
84 /* required last entry */ 86 /* required last entry */
85 {0, } 87 {0, }
@@ -143,6 +145,7 @@ no_mei:
143 */ 145 */
144static int mei_me_probe(struct pci_dev *pdev, const struct pci_device_id *ent) 146static int mei_me_probe(struct pci_dev *pdev, const struct pci_device_id *ent)
145{ 147{
148 const struct mei_cfg *cfg = (struct mei_cfg *)(ent->driver_data);
146 struct mei_device *dev; 149 struct mei_device *dev;
147 struct mei_me_hw *hw; 150 struct mei_me_hw *hw;
148 int err; 151 int err;
@@ -183,7 +186,7 @@ static int mei_me_probe(struct pci_dev *pdev, const struct pci_device_id *ent)
183 186
184 187
185 /* allocates and initializes the mei dev structure */ 188 /* allocates and initializes the mei dev structure */
186 dev = mei_me_dev_init(pdev); 189 dev = mei_me_dev_init(pdev, cfg);
187 if (!dev) { 190 if (!dev) {
188 err = -ENOMEM; 191 err = -ENOMEM;
189 goto release_regions; 192 goto release_regions;
diff --git a/drivers/misc/mei/pci-txe.c b/drivers/misc/mei/pci-txe.c
index 2c3f5625a04e..2343c6236df9 100644
--- a/drivers/misc/mei/pci-txe.c
+++ b/drivers/misc/mei/pci-txe.c
@@ -36,7 +36,7 @@
36#include "hw-txe.h" 36#include "hw-txe.h"
37 37
38static const struct pci_device_id mei_txe_pci_tbl[] = { 38static const struct pci_device_id mei_txe_pci_tbl[] = {
39 {PCI_DEVICE(PCI_VENDOR_ID_INTEL, 0x0F18)}, /* Baytrail */ 39 {MEI_PCI_DEVICE(0x0F18, mei_txe_cfg)}, /* Baytrail */
40 {0, } 40 {0, }
41}; 41};
42MODULE_DEVICE_TABLE(pci, mei_txe_pci_tbl); 42MODULE_DEVICE_TABLE(pci, mei_txe_pci_tbl);
@@ -69,6 +69,7 @@ static void mei_txe_pci_iounmap(struct pci_dev *pdev, struct mei_txe_hw *hw)
69 */ 69 */
70static int mei_txe_probe(struct pci_dev *pdev, const struct pci_device_id *ent) 70static int mei_txe_probe(struct pci_dev *pdev, const struct pci_device_id *ent)
71{ 71{
72 const struct mei_cfg *cfg = (struct mei_cfg *)(ent->driver_data);
72 struct mei_device *dev; 73 struct mei_device *dev;
73 struct mei_txe_hw *hw; 74 struct mei_txe_hw *hw;
74 int err; 75 int err;
@@ -99,7 +100,7 @@ static int mei_txe_probe(struct pci_dev *pdev, const struct pci_device_id *ent)
99 } 100 }
100 101
101 /* allocates and initializes the mei dev structure */ 102 /* allocates and initializes the mei dev structure */
102 dev = mei_txe_dev_init(pdev); 103 dev = mei_txe_dev_init(pdev, cfg);
103 if (!dev) { 104 if (!dev) {
104 err = -ENOMEM; 105 err = -ENOMEM;
105 goto release_regions; 106 goto release_regions;