121b13791SBen Skeggs /*
221b13791SBen Skeggs  * Copyright 2013 Red Hat Inc.
321b13791SBen Skeggs  *
421b13791SBen Skeggs  * Permission is hereby granted, free of charge, to any person obtaining a
521b13791SBen Skeggs  * copy of this software and associated documentation files (the "Software"),
621b13791SBen Skeggs  * to deal in the Software without restriction, including without limitation
721b13791SBen Skeggs  * the rights to use, copy, modify, merge, publish, distribute, sublicense,
821b13791SBen Skeggs  * and/or sell copies of the Software, and to permit persons to whom the
921b13791SBen Skeggs  * Software is furnished to do so, subject to the following conditions:
1021b13791SBen Skeggs  *
1121b13791SBen Skeggs  * The above copyright notice and this permission notice shall be included in
1221b13791SBen Skeggs  * all copies or substantial portions of the Software.
1321b13791SBen Skeggs  *
1421b13791SBen Skeggs  * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
1521b13791SBen Skeggs  * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
1621b13791SBen Skeggs  * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL
1721b13791SBen Skeggs  * THE COPYRIGHT HOLDER(S) OR AUTHOR(S) BE LIABLE FOR ANY CLAIM, DAMAGES OR
1821b13791SBen Skeggs  * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
1921b13791SBen Skeggs  * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
2021b13791SBen Skeggs  * OTHER DEALINGS IN THE SOFTWARE.
2121b13791SBen Skeggs  *
2221b13791SBen Skeggs  * Authors: Ben Skeggs
2321b13791SBen Skeggs  */
2421b13791SBen Skeggs #include "priv.h"
2521b13791SBen Skeggs #include "fuc/gk208.fuc5.h"
2621b13791SBen Skeggs 
27e2ca4e7dSBen Skeggs static const struct nvkm_pmu_func
28e2ca4e7dSBen Skeggs gk208_pmu = {
292952a2b4SBen Skeggs 	.flcn = &gt215_pmu_flcn,
3021b13791SBen Skeggs 	.code.data = gk208_pmu_code,
3121b13791SBen Skeggs 	.code.size = sizeof(gk208_pmu_code),
3221b13791SBen Skeggs 	.data.data = gk208_pmu_data,
3321b13791SBen Skeggs 	.data.size = sizeof(gk208_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,
41f02a0e84SBen Skeggs 	.pgob = gk110_pmu_pgob,
42e2ca4e7dSBen Skeggs };
43e2ca4e7dSBen Skeggs 
44989863d7SBen Skeggs static const struct nvkm_pmu_fwif
45989863d7SBen Skeggs gk208_pmu_fwif[] = {
46989863d7SBen Skeggs 	{ -1, gf100_pmu_nofw, &gk208_pmu },
47989863d7SBen Skeggs 	{}
48989863d7SBen Skeggs };
49989863d7SBen Skeggs 
50e2ca4e7dSBen Skeggs int
gk208_pmu_new(struct nvkm_device * device,enum nvkm_subdev_type type,int inst,struct nvkm_pmu ** ppmu)51*e4b15b4cSBen Skeggs gk208_pmu_new(struct nvkm_device *device, enum nvkm_subdev_type type, int inst,
52*e4b15b4cSBen Skeggs 	      struct nvkm_pmu **ppmu)
53e2ca4e7dSBen Skeggs {
54*e4b15b4cSBen Skeggs 	return nvkm_pmu_new_(gk208_pmu_fwif, device, type, inst, ppmu);
55e2ca4e7dSBen Skeggs }
56