[Nouveau] [PATCH] clk/gm20b: fix build on non-tegra platforms

Alexandre Courbot acourbot at nvidia.com
Tue Jun 7 08:39:59 UTC 2016


tegra_fuse_readl() is only defined on Tegra platforms and will break x86
builds.

Signed-off-by: Alexandre Courbot <acourbot at nvidia.com>
---
This should probably be squashed into the GM20B DFS patch to avoid
breaking bisecting. Sorry about this.

 drm/nouveau/nvkm/subdev/clk/gm20b.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/drm/nouveau/nvkm/subdev/clk/gm20b.c b/drm/nouveau/nvkm/subdev/clk/gm20b.c
index 3089e4bc5e54..4ea89f71cd4f 100644
--- a/drm/nouveau/nvkm/subdev/clk/gm20b.c
+++ b/drm/nouveau/nvkm/subdev/clk/gm20b.c
@@ -946,11 +946,13 @@ gm20b_clk_init_fused_params(struct gm20b_clk *clk)
 {
 	struct nvkm_subdev *subdev = &clk->base.base.subdev;
 	u32 val;
-	u32 rev;
+	u32 rev = 0;
 
+#if IS_ENABLED(CONFIG_ARCH_TEGRA)
 	tegra_fuse_readl(FUSE_RESERVED_CALIB0, &val);
 	rev = (val >> FUSE_RESERVED_CALIB0_FUSE_REV_SHIFT) &
 	      MASK(FUSE_RESERVED_CALIB0_FUSE_REV_WIDTH);
+#endif
 
 	/* No fused parameters, we will calibrate later */
 	if (rev == 0)
-- 
2.8.3



More information about the Nouveau mailing list