diff options
author | Ben Skeggs <bskeggs@redhat.com> | 2015-08-20 07:54:19 +0300 |
---|---|---|
committer | Ben Skeggs <bskeggs@redhat.com> | 2015-08-28 05:40:41 +0300 |
commit | c79a191b2799fb36a7b64c0f9ddc20383ed0dcdb (patch) | |
tree | 83b99c76b4d87f4bc557c9160aef7d26ce21aac3 /drivers/gpu/drm/nouveau/nvkm/engine/bsp | |
parent | 9d498e0f7a5ece8f61c8a174b40668a2621a82e3 (diff) | |
download | linux-c79a191b2799fb36a7b64c0f9ddc20383ed0dcdb.tar.xz |
drm/nouveau/xtensa: convert user classes to new-style nvkm_object
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
Diffstat (limited to 'drivers/gpu/drm/nouveau/nvkm/engine/bsp')
-rw-r--r-- | drivers/gpu/drm/nouveau/nvkm/engine/bsp/g84.c | 41 |
1 files changed, 8 insertions, 33 deletions
diff --git a/drivers/gpu/drm/nouveau/nvkm/engine/bsp/g84.c b/drivers/gpu/drm/nouveau/nvkm/engine/bsp/g84.c index 0f140bcd8e75..176495d9e708 100644 --- a/drivers/gpu/drm/nouveau/nvkm/engine/bsp/g84.c +++ b/drivers/gpu/drm/nouveau/nvkm/engine/bsp/g84.c @@ -22,41 +22,17 @@ * Authors: Ben Skeggs, Ilia Mirkin */ #include <engine/bsp.h> -#include <engine/xtensa.h> -#include <core/engctx.h> +#include <nvif/class.h> -/******************************************************************************* - * BSP object classes - ******************************************************************************/ - -static struct nvkm_oclass -g84_bsp_sclass[] = { - { 0x74b0, &nvkm_object_ofuncs }, - {}, +static const struct nvkm_xtensa_func +g84_bsp_func = { + .sclass = { + { -1, -1, NV74_BSP }, + {} + } }; -/******************************************************************************* - * BSP context - ******************************************************************************/ - -static struct nvkm_oclass -g84_bsp_cclass = { - .handle = NV_ENGCTX(BSP, 0x84), - .ofuncs = &(struct nvkm_ofuncs) { - .ctor = _nvkm_xtensa_engctx_ctor, - .dtor = _nvkm_engctx_dtor, - .init = _nvkm_engctx_init, - .fini = _nvkm_engctx_fini, - .rd32 = _nvkm_engctx_rd32, - .wr32 = _nvkm_engctx_wr32, - }, -}; - -/******************************************************************************* - * BSP engine/subdev functions - ******************************************************************************/ - static int g84_bsp_ctor(struct nvkm_object *parent, struct nvkm_object *engine, struct nvkm_oclass *oclass, void *data, u32 size, @@ -71,9 +47,8 @@ g84_bsp_ctor(struct nvkm_object *parent, struct nvkm_object *engine, if (ret) return ret; + bsp->func = &g84_bsp_func; nv_subdev(bsp)->unit = 0x04008000; - nv_engine(bsp)->cclass = &g84_bsp_cclass; - nv_engine(bsp)->sclass = g84_bsp_sclass; bsp->fifo_val = 0x1111; bsp->unkd28 = 0x90044; return 0; |