mirror of
https://github.com/torvalds/linux.git
synced 2024-11-05 19:41:54 +00:00
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>
This commit is contained in:
parent
ad4d355b4b
commit
b16c35716b
@ -430,6 +430,35 @@ static int mei_me_read_slots(struct mei_device *dev, unsigned char *buffer,
|
||||
return 0;
|
||||
}
|
||||
|
||||
/**
|
||||
* mei_me_pg_enter - write pg enter register to mei device.
|
||||
*
|
||||
* @dev: the device structure
|
||||
*/
|
||||
static void mei_me_pg_enter(struct mei_device *dev)
|
||||
{
|
||||
struct mei_me_hw *hw = to_me_hw(dev);
|
||||
u32 reg = mei_me_reg_read(hw, H_HPG_CSR);
|
||||
reg |= H_HPG_CSR_PGI;
|
||||
mei_me_reg_write(hw, H_HPG_CSR, reg);
|
||||
}
|
||||
|
||||
/**
|
||||
* mei_me_pg_enter - write pg enter register to mei device.
|
||||
*
|
||||
* @dev: the device structure
|
||||
*/
|
||||
static void mei_me_pg_exit(struct mei_device *dev)
|
||||
{
|
||||
struct mei_me_hw *hw = to_me_hw(dev);
|
||||
u32 reg = mei_me_reg_read(hw, H_HPG_CSR);
|
||||
|
||||
WARN(!(reg & H_HPG_CSR_PGI), "PGI is not set\n");
|
||||
|
||||
reg |= H_HPG_CSR_PGIHEXR;
|
||||
mei_me_reg_write(hw, H_HPG_CSR, reg);
|
||||
}
|
||||
|
||||
/**
|
||||
* mei_me_irq_quick_handler - The ISR of the MEI device
|
||||
*
|
||||
|
Loading…
Reference in New Issue
Block a user