Skip to contentSkip to conversation

clk/gm20b: fix build on non-tegra platforms

PATCH New Alexandre Courbot 1 participant 1 message Jun 7, 2016

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 clk/gm20b: fix build on non-tegra platforms

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

---
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(-)
drm/nouveau/nvkm/subdev/clk/gm20b.c +3 -1
index 3089e4bc5e54..4ea89f71cd4f 100644
@@ -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)
Signature · 6 lines
2.8.3

_______________________________________________
Nouveau mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/nouveau