diff options
author | Mahantesh Kumbar <mkumbar@nvidia.com> | 2017-06-15 12:40:43 -0400 |
---|---|---|
committer | mobile promotions <svcmobile_promotions@nvidia.com> | 2017-06-23 04:14:23 -0400 |
commit | 94cb4b635fba4c01b58f36a6d3384db729e4c9f6 (patch) | |
tree | faa4d026519d04005204c172f1b708e5c1188ab2 /drivers/gpu/nvgpu/gp106/pmu_gp106.c | |
parent | be04b9b1b56d6dd478fe521277c079367c03f39d (diff) |
gpu: nvgpu: use nvgpu_flcn_* interfaces
- set nvgpu_flcn_reset() to point to gk20a_pmu_reset()
- set PMU interrupt using nvgpu_flcn_enable_irq()
- replace pmu_idle with nvgpu_flcn_wait_idle()
JIRA NVGPU-57
Change-Id: I50d0310ae78ad266da3c1e662f1598d61ff7abb6
Signed-off-by: Mahantesh Kumbar <mkumbar@nvidia.com>
Reviewed-on: http://git-master/r/1469478
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
Diffstat (limited to 'drivers/gpu/nvgpu/gp106/pmu_gp106.c')
-rw-r--r-- | drivers/gpu/nvgpu/gp106/pmu_gp106.c | 10 |
1 files changed, 3 insertions, 7 deletions
diff --git a/drivers/gpu/nvgpu/gp106/pmu_gp106.c b/drivers/gpu/nvgpu/gp106/pmu_gp106.c index 57ccd269..7662f4eb 100644 --- a/drivers/gpu/nvgpu/gp106/pmu_gp106.c +++ b/drivers/gpu/nvgpu/gp106/pmu_gp106.c | |||
@@ -64,11 +64,7 @@ static int gp106_pmu_enable_hw(struct nvgpu_pmu *pmu, bool enable) | |||
64 | 64 | ||
65 | /* wait for Scrubbing to complete */ | 65 | /* wait for Scrubbing to complete */ |
66 | do { | 66 | do { |
67 | u32 w = gk20a_readl(g, pwr_falcon_dmactl_r()) & | 67 | if (nvgpu_flcn_get_mem_scrubbing_status(pmu->flcn)) { |
68 | (pwr_falcon_dmactl_dmem_scrubbing_m() | | ||
69 | pwr_falcon_dmactl_imem_scrubbing_m()); | ||
70 | |||
71 | if (!w) { | ||
72 | gk20a_dbg_fn("done"); | 68 | gk20a_dbg_fn("done"); |
73 | return 0; | 69 | return 0; |
74 | } | 70 | } |
@@ -112,7 +108,7 @@ static int pmu_enable(struct nvgpu_pmu *pmu, bool enable) | |||
112 | /* TBD: post reset */ | 108 | /* TBD: post reset */ |
113 | 109 | ||
114 | /*idle the PMU and enable interrupts on the Falcon*/ | 110 | /*idle the PMU and enable interrupts on the Falcon*/ |
115 | err = pmu_idle(pmu); | 111 | err = nvgpu_flcn_wait_idle(pmu->flcn); |
116 | if (err) | 112 | if (err) |
117 | return err; | 113 | return err; |
118 | nvgpu_udelay(5); | 114 | nvgpu_udelay(5); |
@@ -130,7 +126,7 @@ int gp106_pmu_reset(struct gk20a *g) | |||
130 | 126 | ||
131 | gk20a_dbg_fn(""); | 127 | gk20a_dbg_fn(""); |
132 | 128 | ||
133 | err = pmu_idle(pmu); | 129 | err = nvgpu_flcn_wait_idle(pmu->flcn); |
134 | if (err) | 130 | if (err) |
135 | return err; | 131 | return err; |
136 | 132 | ||