mirror of
git://nv-tegra.nvidia.com/linux-nvgpu.git
synced 2025-12-24 02:22:34 +03:00
gpu: nvgpu: move mss nvlink credit init to os specific code
The code uses ioremap, readl_relaxed/writel_relaxed, which only exists on linux. So move them to linux folder. Also fix build errors on qnx. Jira VQRM-2344 Change-Id: Ide1176d0bf954a804187aa842a6bbfdecbdb0286 Signed-off-by: Richard Zhao <rizhao@nvidia.com> Reviewed-on: https://git-master.nvidia.com/r/1698973 Reviewed-by: svc-mobile-coverity <svc-mobile-coverity@nvidia.com> GVS: Gerrit_Virtual_Submit Reviewed-by: Terje Bergstrom <tbergstrom@nvidia.com> Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com> Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
This commit is contained in:
committed by
mobile promotions
parent
687b1059f0
commit
98dce7eaac
@@ -539,3 +539,37 @@ free_ndev:
|
||||
#endif
|
||||
}
|
||||
|
||||
void nvgpu_mss_nvlink_init_credits(struct gk20a *g)
|
||||
{
|
||||
/* MSS_NVLINK_1_BASE */
|
||||
void __iomem *soc1 = ioremap(0x01f20010, 4096);
|
||||
/* MSS_NVLINK_2_BASE */
|
||||
void __iomem *soc2 = ioremap(0x01f40010, 4096);
|
||||
/* MSS_NVLINK_3_BASE */
|
||||
void __iomem *soc3 = ioremap(0x01f60010, 4096);
|
||||
/* MSS_NVLINK_4_BASE */
|
||||
void __iomem *soc4 = ioremap(0x01f80010, 4096);
|
||||
u32 val;
|
||||
|
||||
nvgpu_log(g, gpu_dbg_info, "init nvlink soc credits");
|
||||
|
||||
val = readl_relaxed(soc1);
|
||||
writel_relaxed(val, soc1);
|
||||
val = readl_relaxed(soc1 + 4);
|
||||
writel_relaxed(val, soc1 + 4);
|
||||
|
||||
val = readl_relaxed(soc2);
|
||||
writel_relaxed(val, soc2);
|
||||
val = readl_relaxed(soc2 + 4);
|
||||
writel_relaxed(val, soc2 + 4);
|
||||
|
||||
val = readl_relaxed(soc3);
|
||||
writel_relaxed(val, soc3);
|
||||
val = readl_relaxed(soc3 + 4);
|
||||
writel_relaxed(val, soc3 + 4);
|
||||
|
||||
val = readl_relaxed(soc4);
|
||||
writel_relaxed(val, soc4);
|
||||
val = readl_relaxed(soc4 + 4);
|
||||
writel_relaxed(val, soc4 + 4);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user