summaryrefslogtreecommitdiff
path: root/drivers/misc/mei/interface.h
diff options
context:
space:
mode:
authorTomas Winkler <tomas.winkler@intel.com>2012-06-25 20:46:27 (GMT)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2012-06-26 22:59:44 (GMT)
commit24aadc809f270857743e62d0882865fb3ba195d9 (patch)
tree5df3ea0a48d63ccee9ad702deb35b7c1aaa52ba4 /drivers/misc/mei/interface.h
parent21c66d1be7c586b56c2902ada4ba030a12b00063 (diff)
downloadlinux-fsl-qoriq-24aadc809f270857743e62d0882865fb3ba195d9.tar.xz
mei: don't query HCSR for host buffer depth
1. We record host (write) buffer depth during reset so we don't need to query HCSR register later on. The host buffer depth doesn't change after the reset 2. Use mei_hbuf_max_data function to compute payload size in bytes Signed-off-by: Tomas Winkler <tomas.winkler@intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/misc/mei/interface.h')
-rw-r--r--drivers/misc/mei/interface.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/drivers/misc/mei/interface.h b/drivers/misc/mei/interface.h
index ddff5d1..8723d88 100644
--- a/drivers/misc/mei/interface.h
+++ b/drivers/misc/mei/interface.h
@@ -49,6 +49,12 @@ int mei_count_empty_write_slots(struct mei_device *dev);
int mei_flow_ctrl_creds(struct mei_device *dev, struct mei_cl *cl);
+static inline size_t mei_hbuf_max_data(const struct mei_device *dev)
+{
+ return dev->hbuf_depth * sizeof(u32) - sizeof(struct mei_msg_hdr);
+}
+
+
int mei_wd_send(struct mei_device *dev);
int mei_wd_stop(struct mei_device *dev, bool preserve);
int mei_wd_host_init(struct mei_device *dev);