diff options
author | Tomas Winkler <tomas.winkler@intel.com> | 2014-03-18 16:51:57 -0400 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2014-05-03 19:20:23 -0400 |
commit | b16c35716b843acdbe562bc0068580c50db203ff (patch) | |
tree | 8a0cef597fb7a63b0803305f1690988793310634 /drivers/misc | |
parent | ad4d355b4b9764373baaf9e8de6613919e1342fa (diff) |
mei: me: add power gating isolation register write wrappers
Add entry and exit power gating isolation register
write handler.
Signed-off-by: Tomas Winkler <tomas.winkler@intel.com>
Signed-off-by: Alexander Usyskin <alexander.usyskin@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 | 29 |
1 files changed, 29 insertions, 0 deletions
diff --git a/drivers/misc/mei/hw-me.c b/drivers/misc/mei/hw-me.c index 8dbdaaef1af5..fc5d001983b3 100644 --- a/drivers/misc/mei/hw-me.c +++ b/drivers/misc/mei/hw-me.c | |||
@@ -431,6 +431,35 @@ static int mei_me_read_slots(struct mei_device *dev, unsigned char *buffer, | |||
431 | } | 431 | } |
432 | 432 | ||
433 | /** | 433 | /** |
434 | * mei_me_pg_enter - write pg enter register to mei device. | ||
435 | * | ||
436 | * @dev: the device structure | ||
437 | */ | ||
438 | static void mei_me_pg_enter(struct mei_device *dev) | ||
439 | { | ||
440 | struct mei_me_hw *hw = to_me_hw(dev); | ||
441 | u32 reg = mei_me_reg_read(hw, H_HPG_CSR); | ||
442 | reg |= H_HPG_CSR_PGI; | ||
443 | mei_me_reg_write(hw, H_HPG_CSR, reg); | ||
444 | } | ||
445 | |||
446 | /** | ||
447 | * mei_me_pg_enter - write pg enter register to mei device. | ||
448 | * | ||
449 | * @dev: the device structure | ||
450 | */ | ||
451 | static void mei_me_pg_exit(struct mei_device *dev) | ||
452 | { | ||
453 | struct mei_me_hw *hw = to_me_hw(dev); | ||
454 | u32 reg = mei_me_reg_read(hw, H_HPG_CSR); | ||
455 | |||
456 | WARN(!(reg & H_HPG_CSR_PGI), "PGI is not set\n"); | ||
457 | |||
458 | reg |= H_HPG_CSR_PGIHEXR; | ||
459 | mei_me_reg_write(hw, H_HPG_CSR, reg); | ||
460 | } | ||
461 | |||
462 | /** | ||
434 | * mei_me_irq_quick_handler - The ISR of the MEI device | 463 | * mei_me_irq_quick_handler - The ISR of the MEI device |
435 | * | 464 | * |
436 | * @irq: The irq number | 465 | * @irq: The irq number |