1e2ca4e7dSBen Skeggs /*
2e2ca4e7dSBen Skeggs * Copyright 2013 Red Hat Inc.
3e2ca4e7dSBen Skeggs *
4e2ca4e7dSBen Skeggs * Permission is hereby granted, free of charge, to any person obtaining a
5e2ca4e7dSBen Skeggs * copy of this software and associated documentation files (the "Software"),
6e2ca4e7dSBen Skeggs * to deal in the Software without restriction, including without limitation
7e2ca4e7dSBen Skeggs * the rights to use, copy, modify, merge, publish, distribute, sublicense,
8e2ca4e7dSBen Skeggs * and/or sell copies of the Software, and to permit persons to whom the
9e2ca4e7dSBen Skeggs * Software is furnished to do so, subject to the following conditions:
10e2ca4e7dSBen Skeggs *
11e2ca4e7dSBen Skeggs * The above copyright notice and this permission notice shall be included in
12e2ca4e7dSBen Skeggs * all copies or substantial portions of the Software.
13e2ca4e7dSBen Skeggs *
14e2ca4e7dSBen Skeggs * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15e2ca4e7dSBen Skeggs * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
16e2ca4e7dSBen Skeggs * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
17e2ca4e7dSBen Skeggs * THE COPYRIGHT HOLDER(S) OR AUTHOR(S) BE LIABLE FOR ANY CLAIM, DAMAGES OR
18e2ca4e7dSBen Skeggs * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
19e2ca4e7dSBen Skeggs * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
20e2ca4e7dSBen Skeggs * OTHER DEALINGS IN THE SOFTWARE.
21e2ca4e7dSBen Skeggs *
22e2ca4e7dSBen Skeggs * Authors: Ben Skeggs
23e2ca4e7dSBen Skeggs */
24e2ca4e7dSBen Skeggs #include "priv.h"
25e2ca4e7dSBen Skeggs #include "fuc/gf119.fuc4.h"
26e2ca4e7dSBen Skeggs
27e2ca4e7dSBen Skeggs static const struct nvkm_pmu_func
28e2ca4e7dSBen Skeggs gf119_pmu = {
292952a2b4SBen Skeggs .flcn = >215_pmu_flcn,
30e2ca4e7dSBen Skeggs .code.data = gf119_pmu_code,
31e2ca4e7dSBen Skeggs .code.size = sizeof(gf119_pmu_code),
32e2ca4e7dSBen Skeggs .data.data = gf119_pmu_data,
33e2ca4e7dSBen Skeggs .data.size = sizeof(gf119_pmu_data),
346b1277c8SBen Skeggs .enabled = gf100_pmu_enabled,
35715e7d26SBen Skeggs .reset = gf100_pmu_reset,
36da7d2062SBen Skeggs .init = gt215_pmu_init,
37da7d2062SBen Skeggs .fini = gt215_pmu_fini,
38da7d2062SBen Skeggs .intr = gt215_pmu_intr,
39da7d2062SBen Skeggs .send = gt215_pmu_send,
40da7d2062SBen Skeggs .recv = gt215_pmu_recv,
41e2ca4e7dSBen Skeggs };
42e2ca4e7dSBen Skeggs
43989863d7SBen Skeggs static const struct nvkm_pmu_fwif
44989863d7SBen Skeggs gf119_pmu_fwif[] = {
45989863d7SBen Skeggs { -1, gf100_pmu_nofw, &gf119_pmu },
46989863d7SBen Skeggs {}
47989863d7SBen Skeggs };
48989863d7SBen Skeggs
49e2ca4e7dSBen Skeggs int
gf119_pmu_new(struct nvkm_device * device,enum nvkm_subdev_type type,int inst,struct nvkm_pmu ** ppmu)50*e4b15b4cSBen Skeggs gf119_pmu_new(struct nvkm_device *device, enum nvkm_subdev_type type, int inst,
51*e4b15b4cSBen Skeggs struct nvkm_pmu **ppmu)
52e2ca4e7dSBen Skeggs {
53*e4b15b4cSBen Skeggs return nvkm_pmu_new_(gf119_pmu_fwif, device, type, inst, ppmu);
54e2ca4e7dSBen Skeggs }
55