diff options
Diffstat (limited to 'drivers/gpu/nvgpu/common')
-rw-r--r-- | drivers/gpu/nvgpu/common/linux/nvlink.c | 34 |
1 files changed, 34 insertions, 0 deletions
diff --git a/drivers/gpu/nvgpu/common/linux/nvlink.c b/drivers/gpu/nvgpu/common/linux/nvlink.c index f2faa682..5a2f4ded 100644 --- a/drivers/gpu/nvgpu/common/linux/nvlink.c +++ b/drivers/gpu/nvgpu/common/linux/nvlink.c | |||
@@ -539,3 +539,37 @@ free_ndev: | |||
539 | #endif | 539 | #endif |
540 | } | 540 | } |
541 | 541 | ||
542 | void nvgpu_mss_nvlink_init_credits(struct gk20a *g) | ||
543 | { | ||
544 | /* MSS_NVLINK_1_BASE */ | ||
545 | void __iomem *soc1 = ioremap(0x01f20010, 4096); | ||
546 | /* MSS_NVLINK_2_BASE */ | ||
547 | void __iomem *soc2 = ioremap(0x01f40010, 4096); | ||
548 | /* MSS_NVLINK_3_BASE */ | ||
549 | void __iomem *soc3 = ioremap(0x01f60010, 4096); | ||
550 | /* MSS_NVLINK_4_BASE */ | ||
551 | void __iomem *soc4 = ioremap(0x01f80010, 4096); | ||
552 | u32 val; | ||
553 | |||
554 | nvgpu_log(g, gpu_dbg_info, "init nvlink soc credits"); | ||
555 | |||
556 | val = readl_relaxed(soc1); | ||
557 | writel_relaxed(val, soc1); | ||
558 | val = readl_relaxed(soc1 + 4); | ||
559 | writel_relaxed(val, soc1 + 4); | ||
560 | |||
561 | val = readl_relaxed(soc2); | ||
562 | writel_relaxed(val, soc2); | ||
563 | val = readl_relaxed(soc2 + 4); | ||
564 | writel_relaxed(val, soc2 + 4); | ||
565 | |||
566 | val = readl_relaxed(soc3); | ||
567 | writel_relaxed(val, soc3); | ||
568 | val = readl_relaxed(soc3 + 4); | ||
569 | writel_relaxed(val, soc3 + 4); | ||
570 | |||
571 | val = readl_relaxed(soc4); | ||
572 | writel_relaxed(val, soc4); | ||
573 | val = readl_relaxed(soc4 + 4); | ||
574 | writel_relaxed(val, soc4 + 4); | ||
575 | } | ||