diff options
author | Tomas Winkler <tomas.winkler@intel.com> | 2014-03-19 00:51:58 +0400 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2014-05-04 03:20:23 +0400 |
commit | ee7e5afd2c369b64ffcf419d38ce7ad1c709a53e (patch) | |
tree | b61d3eea96f2fee5ab8209c44a41dced1e023a60 /drivers/misc/mei/mei_dev.h | |
parent | b16c35716b843acdbe562bc0068580c50db203ff (diff) | |
download | linux-ee7e5afd2c369b64ffcf419d38ce7ad1c709a53e.tar.xz |
mei: condition PGI support on HW and HBM version
Enable power gating isolation only if hw and fw support it.
This is indicated by ME_PGIC_HRA bit in ME_CSR_HA register
and on HBM protocol version.
The information is exported to MEI layer through
new pg_is_enabled hw op.
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/mei/mei_dev.h')
-rw-r--r-- | drivers/misc/mei/mei_dev.h | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/drivers/misc/mei/mei_dev.h b/drivers/misc/mei/mei_dev.h index 4d4c041a7e4f..ca7581ce0722 100644 --- a/drivers/misc/mei/mei_dev.h +++ b/drivers/misc/mei/mei_dev.h @@ -220,6 +220,8 @@ struct mei_cl { * @hw_start - start hw after reset * @hw_config - configure hw + * @pg_is_enabled - is power gating enabled + * @intr_clear - clear pending interrupts * @intr_enable - enable interrupts * @intr_disable - disable interrupts @@ -244,6 +246,8 @@ struct mei_hw_ops { int (*hw_start)(struct mei_device *dev); void (*hw_config)(struct mei_device *dev); + bool (*pg_is_enabled)(struct mei_device *dev); + void (*intr_clear)(struct mei_device *dev); void (*intr_enable)(struct mei_device *dev); void (*intr_disable)(struct mei_device *dev); @@ -558,6 +562,12 @@ static inline void mei_hw_config(struct mei_device *dev) { dev->ops->hw_config(dev); } + +static inline bool mei_pg_is_enabled(struct mei_device *dev) +{ + return dev->ops->pg_is_enabled(dev); +} + static inline int mei_hw_reset(struct mei_device *dev, bool enable) { return dev->ops->hw_reset(dev, enable); |