| .. | .. |
|---|
| 95 | 95 | gk20a_pmu_dvfs_get_dev_status(struct gk20a_pmu *pmu, |
|---|
| 96 | 96 | struct gk20a_pmu_dvfs_dev_status *status) |
|---|
| 97 | 97 | { |
|---|
| 98 | | - struct nvkm_falcon *falcon = pmu->base.falcon; |
|---|
| 98 | + struct nvkm_falcon *falcon = &pmu->base.falcon; |
|---|
| 99 | 99 | |
|---|
| 100 | 100 | status->busy = nvkm_falcon_rd32(falcon, 0x508 + (BUSY_SLOT * 0x10)); |
|---|
| 101 | 101 | status->total= nvkm_falcon_rd32(falcon, 0x508 + (CLK_SLOT * 0x10)); |
|---|
| .. | .. |
|---|
| 104 | 104 | static void |
|---|
| 105 | 105 | gk20a_pmu_dvfs_reset_dev_status(struct gk20a_pmu *pmu) |
|---|
| 106 | 106 | { |
|---|
| 107 | | - struct nvkm_falcon *falcon = pmu->base.falcon; |
|---|
| 107 | + struct nvkm_falcon *falcon = &pmu->base.falcon; |
|---|
| 108 | 108 | |
|---|
| 109 | 109 | nvkm_falcon_wr32(falcon, 0x508 + (BUSY_SLOT * 0x10), 0x80000000); |
|---|
| 110 | 110 | nvkm_falcon_wr32(falcon, 0x508 + (CLK_SLOT * 0x10), 0x80000000); |
|---|
| .. | .. |
|---|
| 160 | 160 | struct gk20a_pmu *gpmu = gk20a_pmu(pmu); |
|---|
| 161 | 161 | nvkm_timer_alarm(pmu->subdev.device->timer, 0, &gpmu->alarm); |
|---|
| 162 | 162 | |
|---|
| 163 | | - nvkm_falcon_put(pmu->falcon, &pmu->subdev); |
|---|
| 163 | + nvkm_falcon_put(&pmu->falcon, &pmu->subdev); |
|---|
| 164 | 164 | } |
|---|
| 165 | 165 | |
|---|
| 166 | 166 | static int |
|---|
| .. | .. |
|---|
| 169 | 169 | struct gk20a_pmu *gpmu = gk20a_pmu(pmu); |
|---|
| 170 | 170 | struct nvkm_subdev *subdev = &pmu->subdev; |
|---|
| 171 | 171 | struct nvkm_device *device = pmu->subdev.device; |
|---|
| 172 | | - struct nvkm_falcon *falcon = pmu->falcon; |
|---|
| 172 | + struct nvkm_falcon *falcon = &pmu->falcon; |
|---|
| 173 | 173 | int ret; |
|---|
| 174 | 174 | |
|---|
| 175 | 175 | ret = nvkm_falcon_get(falcon, subdev); |
|---|
| .. | .. |
|---|
| 196 | 196 | |
|---|
| 197 | 197 | static const struct nvkm_pmu_func |
|---|
| 198 | 198 | gk20a_pmu = { |
|---|
| 199 | + .flcn = >215_pmu_flcn, |
|---|
| 199 | 200 | .enabled = gf100_pmu_enabled, |
|---|
| 200 | 201 | .init = gk20a_pmu_init, |
|---|
| 201 | 202 | .fini = gk20a_pmu_fini, |
|---|
| 202 | 203 | .reset = gf100_pmu_reset, |
|---|
| 203 | 204 | }; |
|---|
| 204 | 205 | |
|---|
| 206 | +static const struct nvkm_pmu_fwif |
|---|
| 207 | +gk20a_pmu_fwif[] = { |
|---|
| 208 | + { -1, gf100_pmu_nofw, &gk20a_pmu }, |
|---|
| 209 | + {} |
|---|
| 210 | +}; |
|---|
| 211 | + |
|---|
| 205 | 212 | int |
|---|
| 206 | 213 | gk20a_pmu_new(struct nvkm_device *device, int index, struct nvkm_pmu **ppmu) |
|---|
| 207 | 214 | { |
|---|
| 208 | 215 | struct gk20a_pmu *pmu; |
|---|
| 216 | + int ret; |
|---|
| 209 | 217 | |
|---|
| 210 | 218 | if (!(pmu = kzalloc(sizeof(*pmu), GFP_KERNEL))) |
|---|
| 211 | 219 | return -ENOMEM; |
|---|
| 212 | 220 | *ppmu = &pmu->base; |
|---|
| 213 | 221 | |
|---|
| 214 | | - nvkm_pmu_ctor(&gk20a_pmu, device, index, &pmu->base); |
|---|
| 222 | + ret = nvkm_pmu_ctor(gk20a_pmu_fwif, device, index, &pmu->base); |
|---|
| 223 | + if (ret) |
|---|
| 224 | + return ret; |
|---|
| 215 | 225 | |
|---|
| 216 | 226 | pmu->data = &gk20a_dvfs_data; |
|---|
| 217 | 227 | nvkm_alarm_init(&pmu->alarm, gk20a_pmu_dvfs_work); |
|---|
| 218 | | - |
|---|
| 219 | 228 | return 0; |
|---|
| 220 | 229 | } |
|---|