summaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
Diffstat (limited to 'drivers')
-rw-r--r--drivers/platform/tegra/mc/mc.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/drivers/platform/tegra/mc/mc.c b/drivers/platform/tegra/mc/mc.c
index 38011ecc4..164ca1e74 100644
--- a/drivers/platform/tegra/mc/mc.c
+++ b/drivers/platform/tegra/mc/mc.c
@@ -2,7 +2,7 @@
2 * arch/arm/mach-tegra/mc.c 2 * arch/arm/mach-tegra/mc.c
3 * 3 *
4 * Copyright (C) 2010 Google, Inc. 4 * Copyright (C) 2010 Google, Inc.
5 * Copyright (C) 2011-2021, NVIDIA Corporation. All rights reserved. 5 * Copyright (C) 2011-2022, NVIDIA Corporation. All rights reserved.
6 * 6 *
7 * Author: 7 * Author:
8 * Erik Gilling <konkers@google.com> 8 * Erik Gilling <konkers@google.com>
@@ -320,6 +320,7 @@ static void enable_mssnvlinks(struct platform_device *pdev)
320 void __iomem *regs; 320 void __iomem *regs;
321 int ret = 0, i; 321 int ret = 0, i;
322 u32 reg_val; 322 u32 reg_val;
323 bool disable_l3_alloc_hint = false;
323 324
324 /* MSSNVLINK support is available in silicon or fpga only */ 325 /* MSSNVLINK support is available in silicon or fpga only */
325 if (!tegra_platform_is_silicon()) 326 if (!tegra_platform_is_silicon())
@@ -346,6 +347,8 @@ static void enable_mssnvlinks(struct platform_device *pdev)
346 goto err_out; 347 goto err_out;
347 } 348 }
348 349
350 disable_l3_alloc_hint = of_property_read_bool(dn, "disable-nvlink-l3-alloc-hint");
351
349 for (i = 0; i < mssnvlink_hubs; i++) { 352 for (i = 0; i < mssnvlink_hubs; i++) {
350 regs = of_iomap(dn, i); 353 regs = of_iomap(dn, i);
351 if (!regs) { 354 if (!regs) {
@@ -355,7 +358,8 @@ static void enable_mssnvlinks(struct platform_device *pdev)
355 } 358 }
356 mssnvlink_regs[i] = regs; 359 mssnvlink_regs[i] = regs;
357 reg_val = __raw_readl(regs + MSSNVLINK_CYA_DESIGN_MODES); 360 reg_val = __raw_readl(regs + MSSNVLINK_CYA_DESIGN_MODES);
358 reg_val |= MSS_NVLINK_L3_ALLOC_HINT; 361 if (!disable_l3_alloc_hint)
362 reg_val |= MSS_NVLINK_L3_ALLOC_HINT;
359 __raw_writel(reg_val, regs + MSSNVLINK_CYA_DESIGN_MODES); 363 __raw_writel(reg_val, regs + MSSNVLINK_CYA_DESIGN_MODES);
360 nvlink_reg_val[i] = reg_val; 364 nvlink_reg_val[i] = reg_val;
361 } 365 }