summaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorMantravadi Karthik <mkarthik@nvidia.com>2021-05-20 13:19:26 -0400
committermobile promotions <svcmobile_promotions@nvidia.com>2021-06-02 16:39:07 -0400
commitd9ca6d86e9a96e966a111ff1edd421c095b14ffa (patch)
treece033b0f26695edec95520be0c65589f9ee32052 /include
parent28114d7d9fc9192a827c0daed4199f6f0a724b3c (diff)
tegra: safety-ivc: Add support for HB CMD
Why? L2SS expects a heartbeat ping every 40ms. CCPLEX is expected to write the Boot status in the IVC channel for the first time and the consective pings will be just to send Alive check. How? Create a new callback API for the HB command which fills the bit fields for the HB data and sends it over the cmd-resp IVC channel. * Added mutex lock support for l1ss_cmd_resp_send_frame for syncronizing the ivc writes. * Waiting for empty interrupts hogs the system. Time critical features such as HB fail while waiting for empty interrupts. Hence, removing the HSP SM empty isr support. Bug 200700400 Change-Id: I7f124c9f7336df9d387536aa3f2dda80d9234db8 Signed-off-by: Mantravadi Karthik <mkarthik@nvidia.com> Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvidia/+/2519655 Tested-by: mobile promotions <svcmobile_promotions@nvidia.com> Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
Diffstat (limited to 'include')
-rw-r--r--include/linux/tegra-safety-ivc.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/include/linux/tegra-safety-ivc.h b/include/linux/tegra-safety-ivc.h
index 9c43f271b..fce08c62c 100644
--- a/include/linux/tegra-safety-ivc.h
+++ b/include/linux/tegra-safety-ivc.h
@@ -22,6 +22,8 @@
22#define SAFETY_CONF(id, value) ((SAFETY_CONF_ ## id << 24) | (value)) 22#define SAFETY_CONF(id, value) ((SAFETY_CONF_ ## id << 24) | (value))
23#define SAFETY_CONF_GET_ID(value) (((value) >> 24) & 0x7f) 23#define SAFETY_CONF_GET_ID(value) (((value) >> 24) & 0x7f)
24#define SAFETY_CONF_GET_VALUE(value) ((value) & 0xffffff) 24#define SAFETY_CONF_GET_VALUE(value) ((value) & 0xffffff)
25#define TEGRA_SAFETY_SM_CMDRESP_CH 0
26#define TEGRA_SAFETY_IVC_READ_TIMEOUT (2 * HZ)
25 27
26enum { 28enum {
27 SAFETY_CONF_IVC_READY = 1, 29 SAFETY_CONF_IVC_READY = 1,
@@ -49,6 +51,10 @@ struct tegra_safety_ivc {
49 } cmd; 51 } cmd;
50 struct tegra_safety_ivc_chan *ivc_chan[MAX_SAFETY_CHANNELS]; 52 struct tegra_safety_ivc_chan *ivc_chan[MAX_SAFETY_CHANNELS];
51 atomic_t ivc_ready; 53 atomic_t ivc_ready;
54 struct work_struct work;
55 struct workqueue_struct *wq;
56 struct mutex rlock;
57 struct mutex wlock;
52 struct l1ss_data *ldata; 58 struct l1ss_data *ldata;
53}; 59};
54 60