summaryrefslogtreecommitdiffstats
path: root/drivers/misc/mei/hw-me.c
diff options
context:
space:
mode:
authorAlexander Usyskin <alexander.usyskin@intel.com>2015-08-02 22:20:51 +0300
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2015-08-03 17:33:54 -0700
commitbb9f4d26dda7d2a875cadc0f7eedee3d65d3d1f5 (patch)
treeae3cec0e9b0011eeb724bd87bc289ffc09d8f3ea /drivers/misc/mei/hw-me.c
parent11830486c5717c713bb363b14944cda39e3034f9 (diff)
downloadblackbird-op-linux-bb9f4d26dda7d2a875cadc0f7eedee3d65d3d1f5.tar.gz
blackbird-op-linux-bb9f4d26dda7d2a875cadc0f7eedee3d65d3d1f5.zip
mei: me: d0i3: add flag to indicate D0i3 support
Detect d0i3 low power state during hw configuration, the value is set in HFS_1 pci config reigister. 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-me.c')
-rw-r--r--drivers/misc/mei/hw-me.c10
1 files changed, 9 insertions, 1 deletions
diff --git a/drivers/misc/mei/hw-me.c b/drivers/misc/mei/hw-me.c
index 43d7101ff993..17d6894b0fd2 100644
--- a/drivers/misc/mei/hw-me.c
+++ b/drivers/misc/mei/hw-me.c
@@ -176,12 +176,20 @@ static int mei_me_fw_status(struct mei_device *dev,
*/
static void mei_me_hw_config(struct mei_device *dev)
{
+ struct pci_dev *pdev = to_pci_dev(dev->dev);
struct mei_me_hw *hw = to_me_hw(dev);
- u32 hcsr = mei_hcsr_read(dev);
+ u32 hcsr, reg;
+
/* Doesn't change in runtime */
+ hcsr = mei_hcsr_read(dev);
dev->hbuf_depth = (hcsr & H_CBD) >> 24;
hw->pg_state = MEI_PG_OFF;
+
+ reg = 0;
+ pci_read_config_dword(pdev, PCI_CFG_HFS_1, &reg);
+ hw->d0i3_supported =
+ ((reg & PCI_CFG_HFS_1_D0I3_MSK) == PCI_CFG_HFS_1_D0I3_MSK);
}
/**
OpenPOWER on IntegriCloud