xref: /linux/drivers/gpu/drm/nouveau/nvkm/subdev/pci/nv4c.c (revision d0034a7a4ac7fae708146ac0059b9c47a1543f0d)
10a34fb31SBen Skeggs /*
20a34fb31SBen Skeggs  * Copyright 2015 Red Hat Inc.
30a34fb31SBen Skeggs  *
40a34fb31SBen Skeggs  * Permission is hereby granted, free of charge, to any person obtaining a
50a34fb31SBen Skeggs  * copy of this software and associated documentation files (the "Software"),
60a34fb31SBen Skeggs  * to deal in the Software without restriction, including without limitation
70a34fb31SBen Skeggs  * the rights to use, copy, modify, merge, publish, distribute, sublicense,
80a34fb31SBen Skeggs  * and/or sell copies of the Software, and to permit persons to whom the
90a34fb31SBen Skeggs  * Software is furnished to do so, subject to the following conditions:
100a34fb31SBen Skeggs  *
110a34fb31SBen Skeggs  * The above copyright notice and this permission notice shall be included in
120a34fb31SBen Skeggs  * all copies or substantial portions of the Software.
130a34fb31SBen Skeggs  *
140a34fb31SBen Skeggs  * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
150a34fb31SBen Skeggs  * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
160a34fb31SBen Skeggs  * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL
170a34fb31SBen Skeggs  * THE COPYRIGHT HOLDER(S) OR AUTHOR(S) BE LIABLE FOR ANY CLAIM, DAMAGES OR
180a34fb31SBen Skeggs  * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
190a34fb31SBen Skeggs  * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
200a34fb31SBen Skeggs  * OTHER DEALINGS IN THE SOFTWARE.
210a34fb31SBen Skeggs  *
220a34fb31SBen Skeggs  * Authors: Ben Skeggs <bskeggs@redhat.com>
230a34fb31SBen Skeggs  */
240a34fb31SBen Skeggs #include "priv.h"
250a34fb31SBen Skeggs 
260a34fb31SBen Skeggs static const struct nvkm_pci_func
270a34fb31SBen Skeggs nv4c_pci_func = {
280a34fb31SBen Skeggs 	.rd32 = nv40_pci_rd32,
290a34fb31SBen Skeggs 	.wr08 = nv40_pci_wr08,
300a34fb31SBen Skeggs 	.wr32 = nv40_pci_wr32,
310a34fb31SBen Skeggs };
320a34fb31SBen Skeggs 
330a34fb31SBen Skeggs int
nv4c_pci_new(struct nvkm_device * device,enum nvkm_subdev_type type,int inst,struct nvkm_pci ** ppci)34*9b70cd54SBen Skeggs nv4c_pci_new(struct nvkm_device *device, enum nvkm_subdev_type type, int inst,
35*9b70cd54SBen Skeggs 	     struct nvkm_pci **ppci)
360a34fb31SBen Skeggs {
37*9b70cd54SBen Skeggs 	return nvkm_pci_new_(&nv4c_pci_func, device, type, inst, ppci);
380a34fb31SBen Skeggs }
39