xref: /linux/drivers/gpu/drm/nouveau/nvkm/engine/msppp/g98.c (revision d0034a7a4ac7fae708146ac0059b9c47a1543f0d)
187a87657SBen Skeggs /*
287a87657SBen Skeggs  * Copyright 2012 Red Hat Inc.
387a87657SBen Skeggs  *
487a87657SBen Skeggs  * Permission is hereby granted, free of charge, to any person obtaining a
587a87657SBen Skeggs  * copy of this software and associated documentation files (the "Software"),
687a87657SBen Skeggs  * to deal in the Software without restriction, including without limitation
787a87657SBen Skeggs  * the rights to use, copy, modify, merge, publish, distribute, sublicense,
887a87657SBen Skeggs  * and/or sell copies of the Software, and to permit persons to whom the
987a87657SBen Skeggs  * Software is furnished to do so, subject to the following conditions:
1087a87657SBen Skeggs  *
1187a87657SBen Skeggs  * The above copyright notice and this permission notice shall be included in
1287a87657SBen Skeggs  * all copies or substantial portions of the Software.
1387a87657SBen Skeggs  *
1487a87657SBen Skeggs  * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
1587a87657SBen Skeggs  * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
1687a87657SBen Skeggs  * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL
1787a87657SBen Skeggs  * THE COPYRIGHT HOLDER(S) OR AUTHOR(S) BE LIABLE FOR ANY CLAIM, DAMAGES OR
1887a87657SBen Skeggs  * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
1987a87657SBen Skeggs  * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
2087a87657SBen Skeggs  * OTHER DEALINGS IN THE SOFTWARE.
2187a87657SBen Skeggs  *
2287a87657SBen Skeggs  * Authors: Ben Skeggs, Maarten Lankhorst, Ilia Mirkin
2387a87657SBen Skeggs  */
2453e60da4SBen Skeggs #include "priv.h"
2587a87657SBen Skeggs 
269d498e0fSBen Skeggs #include <nvif/class.h>
2787a87657SBen Skeggs 
2853e60da4SBen Skeggs void
g98_msppp_init(struct nvkm_falcon * msppp)2953e60da4SBen Skeggs g98_msppp_init(struct nvkm_falcon *msppp)
3087a87657SBen Skeggs {
31320ca251SBen Skeggs 	struct nvkm_device *device = msppp->engine.subdev.device;
32320ca251SBen Skeggs 	nvkm_wr32(device, 0x086010, 0x0000ffd2);
33320ca251SBen Skeggs 	nvkm_wr32(device, 0x08601c, 0x0000fff2);
3487a87657SBen Skeggs }
3587a87657SBen Skeggs 
36a83d8872SBen Skeggs static const struct nvkm_falcon_func
3753e60da4SBen Skeggs g98_msppp = {
3853e60da4SBen Skeggs 	.init = g98_msppp_init,
399d498e0fSBen Skeggs 	.sclass = {
409d498e0fSBen Skeggs 		{ -1, -1, G98_MSPPP },
419d498e0fSBen Skeggs 		{}
429d498e0fSBen Skeggs 	}
43a83d8872SBen Skeggs };
44a83d8872SBen Skeggs 
4553e60da4SBen Skeggs int
g98_msppp_new(struct nvkm_device * device,enum nvkm_subdev_type type,int inst,struct nvkm_engine ** pengine)46*07a356bbSBen Skeggs g98_msppp_new(struct nvkm_device *device, enum nvkm_subdev_type type, int inst,
4753e60da4SBen Skeggs 	      struct nvkm_engine **pengine)
4887a87657SBen Skeggs {
49*07a356bbSBen Skeggs 	return nvkm_msppp_new_(&g98_msppp, device, type, inst, pengine);
5087a87657SBen Skeggs }
51