mirror of
git://nv-tegra.nvidia.com/linux-nvgpu.git
synced 2025-12-22 17:36:20 +03:00
Move ACR WPR init region cmd from ISR to LSFM as part of LSF bootstrap request to execute the ACR commands sequentially as well as a blocking call by polling is_wpr_init_done status till set to true. Needed to add dealy after each ACR command for ga10b LSPMU due to nvriscv priv lockdown for ACR commands asynchronously from the nvgpu as detailed below, LSPMU engages priv lockdown whenever ACR commands needs to be processed, and nvgpu polls for interrupt status by polling pwr_falcon_irqstat_r registers once command is sent to PMU to process the ACK message from LSPMU if priv lockdown is not engaged. During NVRISCV priv lockdown couple of register are not accessible including irqstat register, priv lockdown is done by LSPMU upon ACR command receive and its asynchronous to nvgpu which cause nvgpu irqstat read data to be 0xbadf* during polling at corner cases even though priv lockdown check is present and interpreting wrongly the irq stat register. Add delay of 5ms after ACR command sent to LSPMU(LSPMU takes ~3.5msec to complete the command process) and before polling the irqstat register in nvgpu to engage priv lockdown in LSPMU. This additional delay will help to skip reading the irqstat at corner case during the priv lockdown process. Bug 3464141 Bug 3482947 Change-Id: I494493a92f6ede5dcb876aeb0d76d54969f0f59e Signed-off-by: mkumbar <mkumbar@nvidia.com> Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvgpu/+/2673246 Reviewed-by: svc-mobile-coverity <svc-mobile-coverity@nvidia.com> Reviewed-by: svc-mobile-cert <svc-mobile-cert@nvidia.com> Reviewed-by: Vijayakumar Subbu <vsubbu@nvidia.com> GVS: Gerrit_Virtual_Submit