summaryrefslogtreecommitdiffstats
path: root/include/linux
diff options
context:
space:
mode:
authorabhijit <abhijit@nvidia.com>2017-08-09 01:32:41 -0400
committermobile promotions <svcmobile_promotions@nvidia.com>2017-08-11 02:04:20 -0400
commit2d7dbdcbe0b595fccc3c6d09e92db4e8010d2ad0 (patch)
tree94a421a5fbb77495b7175d29df0f741021e9e16c /include/linux
parentdeb6c38501f09d84595ffec8c157c9c8e7d3dbea (diff)
platform: tegra: safety: Add multiple ivc channel support
Current safety ivc driver has support for single ivc channel which is used by command/response safety module. This patch extends the driver functionality to support multiple ivc channels, each exposed as char device to userspace safety module. HeartBeat safety module will use one of the ivc channel to communicate with layer 2 (SCE) via this driver. Bug 200267609 Change-Id: Ic9f83db90e2c6a4c9bf8d96d49753087817b7ad2 Reviewed-on: http://git-master/r/1310979 Signed-off-by: Abhijit <abhijit@nvidia.com> Reviewed-on: https://git-master.nvidia.com/r/1535492 Reviewed-by: svccoveritychecker <svccoveritychecker@nvidia.com> GVS: Gerrit_Virtual_Submit Reviewed-by: Sumeet Gupta <sumeetg@nvidia.com>
Diffstat (limited to 'include/linux')
-rw-r--r--include/linux/tegra-safety-ivc.h8
1 files changed, 5 insertions, 3 deletions
diff --git a/include/linux/tegra-safety-ivc.h b/include/linux/tegra-safety-ivc.h
index 0549e8101..e508168e2 100644
--- a/include/linux/tegra-safety-ivc.h
+++ b/include/linux/tegra-safety-ivc.h
@@ -23,6 +23,8 @@ enum {
23 SAFETY_CONF_IVC_READY = 1, 23 SAFETY_CONF_IVC_READY = 1,
24}; 24};
25 25
26#define MAX_SAFETY_CHANNELS 5
27
26struct safety_ast_region { 28struct safety_ast_region {
27 u8 ast_id; 29 u8 ast_id;
28 u32 slave_base; 30 u32 slave_base;
@@ -42,7 +44,7 @@ struct tegra_safety_ivc {
42 atomic_t response; 44 atomic_t response;
43 atomic_t emptied; 45 atomic_t emptied;
44 } cmd; 46 } cmd;
45 struct tegra_safety_ivc_chan *ivc_chan; 47 struct tegra_safety_ivc_chan *ivc_chan[MAX_SAFETY_CHANNELS];
46}; 48};
47 49
48struct tegra_safety_ivc_chan { 50struct tegra_safety_ivc_chan {
@@ -51,8 +53,8 @@ struct tegra_safety_ivc_chan {
51 struct tegra_safety_ivc *safety_ivc; 53 struct tegra_safety_ivc *safety_ivc;
52}; 54};
53 55
54int tegra_safety_dev_init(struct device *dev); 56int tegra_safety_dev_init(struct device *dev, int index);
55void tegra_safety_dev_exit(struct device *dev); 57void tegra_safety_dev_exit(struct device *dev, int index);
56void tegra_safety_dev_notify(void); 58void tegra_safety_dev_notify(void);
57 59
58#endif 60#endif