summaryrefslogtreecommitdiffstats
path: root/drivers/gpu/nvgpu/gp106/clk_gp106.c
diff options
context:
space:
mode:
authorTerje Bergstrom <tbergstrom@nvidia.com>2017-04-10 17:01:15 -0400
committermobile promotions <svcmobile_promotions@nvidia.com>2017-04-13 16:44:41 -0400
commit69297c0932f858bcbdc4a304823f22a4c8cf3292 (patch)
treeda49b2fb3ae2ec77c2089466e57eb8fdf3f05cae /drivers/gpu/nvgpu/gp106/clk_gp106.c
parenta32ec94eb49a5ee9b6fa7479da3ed1e39ea7406d (diff)
gpu: nvgpu: gp106: Use new delay APIs
Use platform agnostic delay functions instead of Linux kernel APIs. This allows removing dependency to Linux header linux/delay.h. At the same time remove #include lines for other unused Linux headers. JIRA NVGPU-16 Change-Id: I54db15d9abf578ec334b100635baec214fe22af5 Signed-off-by: Terje Bergstrom <tbergstrom@nvidia.com> Reviewed-on: http://git-master/r/1460116 Reviewed-by: svccoveritychecker <svccoveritychecker@nvidia.com> GVS: Gerrit_Virtual_Submit Reviewed-by: Alex Waterman <alexw@nvidia.com>
Diffstat (limited to 'drivers/gpu/nvgpu/gp106/clk_gp106.c')
-rw-r--r--drivers/gpu/nvgpu/gp106/clk_gp106.c7
1 files changed, 2 insertions, 5 deletions
diff --git a/drivers/gpu/nvgpu/gp106/clk_gp106.c b/drivers/gpu/nvgpu/gp106/clk_gp106.c
index 262fd63c..fb9406e5 100644
--- a/drivers/gpu/nvgpu/gp106/clk_gp106.c
+++ b/drivers/gpu/nvgpu/gp106/clk_gp106.c
@@ -16,11 +16,8 @@
16 * along with this program. If not, see <http://www.gnu.org/licenses/>. 16 * along with this program. If not, see <http://www.gnu.org/licenses/>.
17 */ 17 */
18 18
19#include <linux/delay.h> /* for mdelay */
20#include <linux/module.h>
21#include <linux/debugfs.h> 19#include <linux/debugfs.h>
22#include <linux/uaccess.h> 20#include <linux/uaccess.h>
23#include <soc/tegra/fuse.h>
24 21
25#include <nvgpu/kmem.h> 22#include <nvgpu/kmem.h>
26 23
@@ -188,7 +185,7 @@ static u32 gp106_get_rate_cntr(struct gk20a *g, struct namemap_cfg *c) {
188 /* Wait for reset to happen */ 185 /* Wait for reset to happen */
189 retries = CLK_DEFAULT_CNTRL_SETTLE_RETRIES; 186 retries = CLK_DEFAULT_CNTRL_SETTLE_RETRIES;
190 do { 187 do {
191 udelay(CLK_DEFAULT_CNTRL_SETTLE_USECS); 188 nvgpu_udelay(CLK_DEFAULT_CNTRL_SETTLE_USECS);
192 } while ((--retries) && (cntr = gk20a_readl(g, c->cntr.reg_cntr_addr))); 189 } while ((--retries) && (cntr = gk20a_readl(g, c->cntr.reg_cntr_addr)));
193 190
194 if (!retries) { 191 if (!retries) {
@@ -206,7 +203,7 @@ static u32 gp106_get_rate_cntr(struct gk20a *g, struct namemap_cfg *c) {
206 c->cntr.reg_ctrl_idx); 203 c->cntr.reg_ctrl_idx);
207 gk20a_readl(g, c->cntr.reg_ctrl_addr); 204 gk20a_readl(g, c->cntr.reg_ctrl_addr);
208 205
209 udelay(XTAL_CNTR_DELAY); 206 nvgpu_udelay(XTAL_CNTR_DELAY);
210 207
211 cntr = XTAL_SCALE_TO_KHZ * gk20a_readl(g, c->cntr.reg_cntr_addr); 208 cntr = XTAL_SCALE_TO_KHZ * gk20a_readl(g, c->cntr.reg_cntr_addr);
212 209