145SN/A/* $NetBSD: nouveau_nvkm_subdev_pmu_gm107.c,v 1.3 2021/12/18 23:45:41 riastradh Exp $ */ 21876SN/A 345SN/A/* 445SN/A * Copyright 2013 Red Hat Inc. 545SN/A * 645SN/A * Permission is hereby granted, free of charge, to any person obtaining a 7553SN/A * copy of this software and associated documentation files (the "Software"), 845SN/A * to deal in the Software without restriction, including without limitation 9553SN/A * the rights to use, copy, modify, merge, publish, distribute, sublicense, 1045SN/A * and/or sell copies of the Software, and to permit persons to whom the 1145SN/A * Software is furnished to do so, subject to the following conditions: 1245SN/A * 1345SN/A * The above copyright notice and this permission notice shall be included in 1445SN/A * all copies or substantial portions of the Software. 1545SN/A * 1645SN/A * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 1745SN/A * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 1845SN/A * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL 1945SN/A * THE COPYRIGHT HOLDER(S) OR AUTHOR(S) BE LIABLE FOR ANY CLAIM, DAMAGES OR 2045SN/A * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, 21553SN/A * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR 22553SN/A * OTHER DEALINGS IN THE SOFTWARE. 23553SN/A * 2445SN/A * Authors: Ben Skeggs 2545SN/A */ 2645SN/A#include <sys/cdefs.h> 2745SN/A__KERNEL_RCSID(0, "$NetBSD: nouveau_nvkm_subdev_pmu_gm107.c,v 1.3 2021/12/18 23:45:41 riastradh Exp $"); 2845SN/A 2945SN/A#include "priv.h" 3045SN/A#define gk208_pmu_code gm107_pmu_code 311876SN/A#define gk208_pmu_data gm107_pmu_data 3245SN/A#include "fuc/gk208.fuc5.h" 3345SN/A 34971SN/Astatic const struct nvkm_pmu_func 3545SN/Agm107_pmu = { 36580SN/A .flcn = >215_pmu_flcn, 37580SN/A .code.data = gm107_pmu_code, 3845SN/A .code.size = sizeof(gm107_pmu_code), 3945SN/A .data.data = gm107_pmu_data, 4045SN/A .data.size = sizeof(gm107_pmu_data), 4145SN/A .enabled = gf100_pmu_enabled, 421876SN/A .reset = gf100_pmu_reset, 431876SN/A .init = gt215_pmu_init, 4445SN/A .fini = gt215_pmu_fini, 4545SN/A .intr = gt215_pmu_intr, 4645SN/A .send = gt215_pmu_send, 4745SN/A .recv = gt215_pmu_recv, 4845SN/A}; 4945SN/A 5045SN/Astatic const struct nvkm_pmu_fwif 5145SN/Agm107_pmu_fwif[] = { 5245SN/A { -1, gf100_pmu_nofw, &gm107_pmu }, 5345SN/A {} 5445SN/A}; 5545SN/A 5645SN/Aint 5745SN/Agm107_pmu_new(struct nvkm_device *device, int index, struct nvkm_pmu **ppmu) 5845SN/A{ 5945SN/A return nvkm_pmu_new_(gm107_pmu_fwif, device, index, ppmu); 6045SN/A} 611876SN/A