diff options
author | Tomas Winkler <tomas.winkler@intel.com> | 2013-07-30 07:11:51 -0400 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2013-08-12 18:46:06 -0400 |
commit | ff96066e3171acdea356b331163495957cb833d0 (patch) | |
tree | 1fcab6ddb535679d1e178ea4fbe921bf7df87821 /drivers/misc | |
parent | 3d04dd2f960aa01a09593576f4df56a052ef32a7 (diff) |
mei: me: fix hardware reset flow
Both H_IS and H_IE needs to be set to receive H_RDY
interrupt
1. Assert H_IS to clear the interrupts during hw reset
and use mei_me_reg_write instead of mei_hcsr_set as the later
strips down the H_IS
2. fix interrupt disablement embarrassing typo
hcsr |= ~H_IE -> hcsr &= ~H_IE;
this will remove the unwanted interrupt on power down
3. remove useless debug print outs
Cc: Shuah Khan <shuah.kh@samsung.com>
Cc: Konstantin Khlebnikov <khlebnikov@openvz.org>
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.c | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/drivers/misc/mei/hw-me.c b/drivers/misc/mei/hw-me.c index b22c7e247225..3412adcdaeb0 100644 --- a/drivers/misc/mei/hw-me.c +++ b/drivers/misc/mei/hw-me.c | |||
@@ -176,21 +176,18 @@ static int mei_me_hw_reset(struct mei_device *dev, bool intr_enable) | |||
176 | struct mei_me_hw *hw = to_me_hw(dev); | 176 | struct mei_me_hw *hw = to_me_hw(dev); |
177 | u32 hcsr = mei_hcsr_read(hw); | 177 | u32 hcsr = mei_hcsr_read(hw); |
178 | 178 | ||
179 | dev_dbg(&dev->pdev->dev, "before reset HCSR = 0x%08x.\n", hcsr); | 179 | hcsr |= H_RST | H_IG | H_IS; |
180 | |||
181 | hcsr |= (H_RST | H_IG); | ||
182 | 180 | ||
183 | if (intr_enable) | 181 | if (intr_enable) |
184 | hcsr |= H_IE; | 182 | hcsr |= H_IE; |
185 | else | 183 | else |
186 | hcsr |= ~H_IE; | 184 | hcsr &= ~H_IE; |
187 | 185 | ||
188 | mei_hcsr_set(hw, hcsr); | 186 | mei_me_reg_write(hw, H_CSR, hcsr); |
189 | 187 | ||
190 | if (dev->dev_state == MEI_DEV_POWER_DOWN) | 188 | if (dev->dev_state == MEI_DEV_POWER_DOWN) |
191 | mei_me_hw_reset_release(dev); | 189 | mei_me_hw_reset_release(dev); |
192 | 190 | ||
193 | dev_dbg(&dev->pdev->dev, "current HCSR = 0x%08x.\n", mei_hcsr_read(hw)); | ||
194 | return 0; | 191 | return 0; |
195 | } | 192 | } |
196 | 193 | ||