From 5142af78a4131f9a29afb18cefeaec3c0f60b008 Mon Sep 17 00:00:00 2001 From: Mantravadi Karthik Date: Fri, 16 Apr 2021 13:47:14 +0530 Subject: tegra: safety-ivc: Fix the SCE-L1SS sync SCE-L1SS sync expects the ast-mapped address to be sent from CCPLEX to SCE. Fixing this logic helped SCE sync with CCPLEX. CCPLEX logs: ubuntu@tegra-ubuntu:~$ dmesg | grep tegra186-safety-ivc [ 4.505639] tegra186-safety-ivc b040000.sce: probing sce safety driver [ 4.505882] tegra186-safety-ivc b040000.sce: dma address = 0xffef0000 [ 4.505897] tegra186-safety-ivc b040000.sce: cmdresp: RX: 0x0-0x1080 TX: 0x8000-0x9080 [ 4.505902] tegra186-safety-ivc b040000.sce: hb: RX: 0x1400-0x14c0 TX: 0x9400-0x94c0 [ 4.505906] tegra186-safety-ivc b040000.sce: mods: RX: 0x1500-0x1980 TX: 0x9500-0x9980 [ 8.542842] tegra186-safety-ivc b040000.sce: safety: character device 0 registered [ 8.543059] tegra186-safety-ivc b040000.sce: safety: character device 1 registered [ 8.543226] tegra186-safety-ivc b040000.sce: safety: character device 2 registered [ 8.543365] tegra186-safety-ivc b040000.sce: successfully probed safety ivc driver SCE uart Logs with debug prints: [772801] : [ LOG ] : Sce Booted : 1.4.0 [33746167] : [ LOG ] : SceIvc_Init_Callback: Line 445: [34246815] : [ LOG ] : SceHsp_SM_Produced [34662648] : [ LOG ] : SceHsp_SM_Consume: Invoked [34670879] : [ LOG ] : SceHsp_SM_Consume: MB addr - 0c b168000, value - 0x81ffef00 [34678666] : [ LOG ] : SceIvcHandshakePerformedCallback: Handshake done [34688074] : [ LOG ] : SceIvc_ChannelNotified: invoked [34691072] : [ LOG ] : SceIvc_ChannelNotified: invoked [34698090] : [ LOG ] : SceHsp_SM_Produce: 169: Invoked [34702170] : [ LOG ] : SceHsp_SM_Produce: 169: Invoked [33745454] : [ ISR ] : SceHsp_Irq: invoked [34711495] : [ ERROR ] : Fatal, SCE BL data invalid [34719113] : [ ERROR ] : DRAM Init Failed [34727446] : [ INFO ] : SCE-FW & L1SS in sync [34823406] : [ LOG ] : Monitoring Failue Bug 200700400 Change-Id: I40bbea06b42892d25408a2da317c831e12acfc9d Signed-off-by: Mantravadi Karthik Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvidia/+/2515929 Reviewed-by: Preetham Chandru Reviewed-by: Bibek Basu Reviewed-by: mobile promotions Tested-by: mobile promotions GVS: Gerrit_Virtual_Submit --- include/linux/tegra-safety-ivc.h | 2 ++ 1 file changed, 2 insertions(+) (limited to 'include/linux') diff --git a/include/linux/tegra-safety-ivc.h b/include/linux/tegra-safety-ivc.h index eeb50a3fc..e5587aed3 100644 --- a/include/linux/tegra-safety-ivc.h +++ b/include/linux/tegra-safety-ivc.h @@ -15,6 +15,7 @@ #ifndef _LINUX_TEGRA_SAFETY_IVC_H_ #define _LINUX_TEGRA_SAFETY_IVC_H_ +#define SAFETY_CONF_IVC_L2SS_READY (SAFETY_CONF_IVC_READY << 24) #define SAFETY_CONF(id, value) ((SAFETY_CONF_ ## id << 24) | (value)) #define SAFETY_CONF_GET_ID(value) (((value) >> 24) & 0x7f) #define SAFETY_CONF_GET_VALUE(value) ((value) & 0xffffff) @@ -44,6 +45,7 @@ struct tegra_safety_ivc { atomic_t emptied; } cmd; struct tegra_safety_ivc_chan *ivc_chan[MAX_SAFETY_CHANNELS]; + atomic_t ivc_ready; }; struct tegra_safety_ivc_chan { -- cgit v1.2.2