From f6c92780ffe3b79cb84fb6d4321dcc13d2a07f73 Mon Sep 17 00:00:00 2001 From: Terje Bergstrom Date: Fri, 14 Apr 2017 15:25:57 -0700 Subject: gpu: nvgpu: Move ptimer_src_freq to gk20a Copy ptimer_src_freq to struct gk20a at probe time, and access it from gk20a instead of platform_gk20a. JIRA NVGPU-16 Change-Id: I92c1b83d6e2305a19eb2cd267b7dd8d97c1fdc44 Signed-off-by: Terje Bergstrom Reviewed-on: http://git-master/r/1463544 Reviewed-by: mobile promotions Tested-by: mobile promotions --- drivers/gpu/nvgpu/gk20a/fifo_gk20a.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'drivers/gpu/nvgpu/gk20a/fifo_gk20a.c') diff --git a/drivers/gpu/nvgpu/gk20a/fifo_gk20a.c b/drivers/gpu/nvgpu/gk20a/fifo_gk20a.c index e89e9f68..b96adc5a 100644 --- a/drivers/gpu/nvgpu/gk20a/fifo_gk20a.c +++ b/drivers/gpu/nvgpu/gk20a/fifo_gk20a.c @@ -760,7 +760,6 @@ int gk20a_init_fifo_reset_enable_hw(struct gk20a *g) u32 mask; u32 timeout; unsigned int i; - struct gk20a_platform *platform = dev_get_drvdata(g->dev); u32 host_num_pbdma = nvgpu_get_litter_value(g, GPU_LIT_HOST_NUM_PBDMA); gk20a_dbg_fn(""); @@ -803,7 +802,7 @@ int gk20a_init_fifo_reset_enable_hw(struct gk20a *g) timeout = GRFIFO_TIMEOUT_CHECK_PERIOD_US; timeout = scale_ptimer(timeout, - ptimer_scalingfactor10x(platform->ptimer_src_freq)); + ptimer_scalingfactor10x(g->ptimer_src_freq)); timeout |= fifo_eng_timeout_detection_enabled_f(); gk20a_writel(g, fifo_eng_timeout_r(), timeout); -- cgit v1.2.2