summaryrefslogtreecommitdiffstats
path: root/drivers/gpu/nvgpu/gk20a/platform_gk20a_tegra.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/gpu/nvgpu/gk20a/platform_gk20a_tegra.c')
-rw-r--r--drivers/gpu/nvgpu/gk20a/platform_gk20a_tegra.c12
1 files changed, 12 insertions, 0 deletions
diff --git a/drivers/gpu/nvgpu/gk20a/platform_gk20a_tegra.c b/drivers/gpu/nvgpu/gk20a/platform_gk20a_tegra.c
index 40e7cead..35d524f1 100644
--- a/drivers/gpu/nvgpu/gk20a/platform_gk20a_tegra.c
+++ b/drivers/gpu/nvgpu/gk20a/platform_gk20a_tegra.c
@@ -40,6 +40,7 @@
40#include "hal_gk20a.h" 40#include "hal_gk20a.h"
41#include "platform_gk20a.h" 41#include "platform_gk20a.h"
42#include "gk20a_scale.h" 42#include "gk20a_scale.h"
43#include "gm20b/clk_gm20b.h"
43 44
44#define TEGRA_GK20A_BW_PER_FREQ 32 45#define TEGRA_GK20A_BW_PER_FREQ 32
45#define TEGRA_GM20B_BW_PER_FREQ 64 46#define TEGRA_GM20B_BW_PER_FREQ 64
@@ -787,6 +788,7 @@ static int gk20a_tegra_probe(struct device *dev)
787 const __be32 *host1x_ptr; 788 const __be32 *host1x_ptr;
788 struct platform_device *host1x_pdev = NULL; 789 struct platform_device *host1x_pdev = NULL;
789 bool joint_xpu_rail = false; 790 bool joint_xpu_rail = false;
791 int ret;
790 792
791 host1x_ptr = of_get_property(np, "nvidia,host1x", NULL); 793 host1x_ptr = of_get_property(np, "nvidia,host1x", NULL);
792 if (host1x_ptr) { 794 if (host1x_ptr) {
@@ -834,6 +836,12 @@ static int gk20a_tegra_probe(struct device *dev)
834 836
835 gk20a_tegra_get_clocks(dev); 837 gk20a_tegra_get_clocks(dev);
836 838
839 if (platform->clk_register) {
840 ret = platform->clk_register(platform->g);
841 if (ret)
842 return ret;
843 }
844
837#if (LINUX_VERSION_CODE >= KERNEL_VERSION(4, 4, 0)) 845#if (LINUX_VERSION_CODE >= KERNEL_VERSION(4, 4, 0))
838 pmc = ioremap(TEGRA_PMC_BASE, 4096); 846 pmc = ioremap(TEGRA_PMC_BASE, 4096);
839#endif 847#endif
@@ -1019,6 +1027,10 @@ struct gk20a_platform gm20b_tegra_platform = {
1019 .get_clk_freqs = gk20a_clk_get_freqs, 1027 .get_clk_freqs = gk20a_clk_get_freqs,
1020#endif 1028#endif
1021 1029
1030#ifdef CONFIG_COMMON_CLK
1031 .clk_register = gm20b_register_gpcclk,
1032#endif
1033
1022 /* frequency scaling configuration */ 1034 /* frequency scaling configuration */
1023 .prescale = gk20a_tegra_prescale, 1035 .prescale = gk20a_tegra_prescale,
1024 .postscale = gk20a_tegra_postscale, 1036 .postscale = gk20a_tegra_postscale,