summaryrefslogtreecommitdiff
path: root/drivers/misc/mei/hw-txe.c
diff options
context:
space:
mode:
authorAlexander Usyskin <alexander.usyskin@intel.com>2014-05-13 02:30:53 +0400
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2014-05-28 01:16:38 +0400
commit8d929d4862fdfc4a524fd4c799b8dfa3b187fe8c (patch)
tree566696826999ee88f5901825803c6740d2c3180a /drivers/misc/mei/hw-txe.c
parentc40765d919d25d2d44d99c4ce39e48808f137e1e (diff)
downloadlinux-8d929d4862fdfc4a524fd4c799b8dfa3b187fe8c.tar.xz
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/mei/hw-txe.c')
-rw-r--r--drivers/misc/mei/hw-txe.c17
1 files changed, 15 insertions, 2 deletions
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 = {
};
+#define MEI_CFG_TXE_FW_STS \
+ .fw_status.count = 2, \
+ .fw_status.status[0] = PCI_CFG_TXE_FW_STS0, \
+ .fw_status.status[1] = PCI_CFG_TXE_FW_STS1
+
+const struct mei_cfg mei_txe_cfg = {
+ MEI_CFG_TXE_FW_STS,
+};
+
+
/**
* mei_txe_dev_init - allocates and initializes txe hardware specific structure
*
* @pdev - pci device
+ * @cfg - per device generation config
+ *
* returns struct mei_device * on success or NULL;
*
*/
-struct mei_device *mei_txe_dev_init(struct pci_dev *pdev)
+struct mei_device *mei_txe_dev_init(struct pci_dev *pdev,
+ const struct mei_cfg *cfg)
{
struct mei_device *dev;
struct mei_txe_hw *hw;
@@ -1121,7 +1134,7 @@ struct mei_device *mei_txe_dev_init(struct pci_dev *pdev)
if (!dev)
return NULL;
- mei_device_init(dev);
+ mei_device_init(dev, cfg);
hw = to_txe_hw(dev);