drm/nouveau/device: namespace + nvidia gpu names (no binary change)
authorBen Skeggs <bskeggs@redhat.com>
Wed, 14 Jan 2015 05:35:00 +0000 (15:35 +1000)
committerBen Skeggs <bskeggs@redhat.com>
Thu, 22 Jan 2015 02:18:06 +0000 (12:18 +1000)
The namespace of NVKM is being changed to nvkm_ instead of nouveau_,
which will be used for the DRM part of the driver.  This is being
done in order to make it very clear as to what part of the driver a
given symbol belongs to, and as a minor step towards splitting the
DRM driver out to be able to stand on its own (for virt).

Because there's already a large amount of churn here anyway, this is
as good a time as any to also switch to NVIDIA's device and chipset
naming to ease collaboration with them.

A comparison of objdump disassemblies proves no code changes.

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
22 files changed:
drivers/gpu/drm/nouveau/include/nvif/device.h
drivers/gpu/drm/nouveau/include/nvkm/core/device.h
drivers/gpu/drm/nouveau/include/nvkm/core/os.h
drivers/gpu/drm/nouveau/nouveau_drm.c
drivers/gpu/drm/nouveau/nvkm/engine/device/Kbuild
drivers/gpu/drm/nouveau/nvkm/engine/device/acpi.c
drivers/gpu/drm/nouveau/nvkm/engine/device/acpi.h
drivers/gpu/drm/nouveau/nvkm/engine/device/base.c
drivers/gpu/drm/nouveau/nvkm/engine/device/ctrl.c
drivers/gpu/drm/nouveau/nvkm/engine/device/gf100.c [new file with mode: 0644]
drivers/gpu/drm/nouveau/nvkm/engine/device/gk104.c [new file with mode: 0644]
drivers/gpu/drm/nouveau/nvkm/engine/device/gm100.c
drivers/gpu/drm/nouveau/nvkm/engine/device/nv04.c
drivers/gpu/drm/nouveau/nvkm/engine/device/nv10.c
drivers/gpu/drm/nouveau/nvkm/engine/device/nv20.c
drivers/gpu/drm/nouveau/nvkm/engine/device/nv30.c
drivers/gpu/drm/nouveau/nvkm/engine/device/nv40.c
drivers/gpu/drm/nouveau/nvkm/engine/device/nv50.c
drivers/gpu/drm/nouveau/nvkm/engine/device/nvc0.c [deleted file]
drivers/gpu/drm/nouveau/nvkm/engine/device/nve0.c [deleted file]
drivers/gpu/drm/nouveau/nvkm/engine/device/priv.h
drivers/gpu/drm/nouveau/nvkm/engine/gr/nv40.h

index 1d186e21d12398dac79fa63fba1741205c334737..1fafcac299d3dbaca5c8b6d5ba557acb8c63ce40 100644 (file)
@@ -50,7 +50,7 @@ void nvif_device_ref(struct nvif_device *, struct nvif_device **);
 #define nvxx_wait_cb(a,b,c) nv_wait_cb(nvxx_timer(a), (b), (c))
 #define nvxx_therm(a) nouveau_therm(nvxx_device(a))
 
-#include <engine/device.h>
+#include <core/device.h>
 #include <engine/fifo.h>
 #include <engine/gr.h>
 #include <engine/sw.h>
index 9c2f13694a5780e872258f4c55f12a6d4d8a4f32..333db33a162c8dacaace87048a2440843eb5b189 100644 (file)
@@ -84,4 +84,18 @@ nv_device_resource_len(struct nvkm_device *device, unsigned int bar);
 
 int
 nv_device_get_irq(struct nvkm_device *device, bool stall);
+
+struct platform_device;
+
+enum nv_bus_type {
+       NVKM_BUS_PCI,
+       NVKM_BUS_PLATFORM,
+};
+
+#define nvkm_device_create(p,t,n,s,c,d,u)                                   \
+       nvkm_device_create_((void *)(p), (t), (n), (s), (c), (d),           \
+                              sizeof(**u), (void **)u)
+int  nvkm_device_create_(void *, enum nv_bus_type type, u64 name,
+                           const char *sname, const char *cfg, const char *dbg,
+                           int, void **);
 #endif
index 0b35ba672265eaf6008323a1f2ffd98a70b59a8b..537db3a512c8e39d3a45fed12d321e1256235e70 100644 (file)
 #define nouveau_gr nvkm_gr
 #define nouveau_sw nvkm_sw
 #define nouveau_sw_chan nvkm_sw_chan
+#define nouveau_device_create nvkm_device_create
+#define nouveau_device_create_ nvkm_device_create_
 
 #endif
index 1de82ec6c276ce657c5cc239bf67fed83d39ebb1..f4ac7b5af85e0b4ea486ffc6836a919d4f3ede68 100644 (file)
@@ -318,7 +318,7 @@ static int nouveau_drm_probe(struct pci_dev *pdev,
                remove_conflicting_framebuffers(aper, "nouveaufb", boot);
        kfree(aper);
 
-       ret = nouveau_device_create(pdev, NOUVEAU_BUS_PCI,
+       ret = nouveau_device_create(pdev, NVKM_BUS_PCI,
                                    nouveau_pci_name(pdev), pci_name(pdev),
                                    nouveau_config, nouveau_debug, &device);
        if (ret)
@@ -1056,7 +1056,7 @@ nouveau_platform_device_create_(struct platform_device *pdev, int size,
        struct drm_device *drm;
        int err;
 
-       err = nouveau_device_create_(pdev, NOUVEAU_BUS_PLATFORM,
+       err = nouveau_device_create_(pdev, NVKM_BUS_PLATFORM,
                                    nouveau_platform_name(pdev),
                                    dev_name(&pdev->dev), nouveau_config,
                                    nouveau_debug, size, pobject);
index 77d06d46eff4641003056e2592f0a527a01b0e40..de1bf092b2b2a514880c6edb6d9fc24c5fd3d339 100644 (file)
@@ -7,6 +7,6 @@ nvkm-y += nvkm/engine/device/nv20.o
 nvkm-y += nvkm/engine/device/nv30.o
 nvkm-y += nvkm/engine/device/nv40.o
 nvkm-y += nvkm/engine/device/nv50.o
-nvkm-y += nvkm/engine/device/nvc0.o
-nvkm-y += nvkm/engine/device/nve0.o
+nvkm-y += nvkm/engine/device/gf100.o
+nvkm-y += nvkm/engine/device/gk104.o
 nvkm-y += nvkm/engine/device/gm100.o
index 4dbf0ba89e5c839327a1f4280afecc9e724d700a..f42706e1d5dbc95c2e24ee47c75a65ae6603565d 100644 (file)
  *
  * Authors: Ben Skeggs
  */
-
 #include "acpi.h"
 
+#include <core/device.h>
+
 #ifdef CONFIG_ACPI
 static int
 nvkm_acpi_ntfy(struct notifier_block *nb, unsigned long val, void *data)
 {
-       struct nouveau_device *device =
+       struct nvkm_device *device =
                container_of(nb, typeof(*device), acpi.nb);
        struct acpi_bus_event *info = data;
 
@@ -40,7 +41,7 @@ nvkm_acpi_ntfy(struct notifier_block *nb, unsigned long val, void *data)
 #endif
 
 int
-nvkm_acpi_fini(struct nouveau_device *device, bool suspend)
+nvkm_acpi_fini(struct nvkm_device *device, bool suspend)
 {
 #ifdef CONFIG_ACPI
        unregister_acpi_notifier(&device->acpi.nb);
@@ -49,7 +50,7 @@ nvkm_acpi_fini(struct nouveau_device *device, bool suspend)
 }
 
 int
-nvkm_acpi_init(struct nouveau_device *device)
+nvkm_acpi_init(struct nvkm_device *device)
 {
 #ifdef CONFIG_ACPI
        device->acpi.nb.notifier_call = nvkm_acpi_ntfy;
index cc49f4f568cd091861a44a7ec2d583ba197882d4..82dd359ddfa45093b169dd64835f0f86aba1cd0d 100644 (file)
@@ -1,9 +1,8 @@
 #ifndef __NVKM_DEVICE_ACPI_H__
 #define __NVKM_DEVICE_ACPI_H__
+#include <core/os.h>
+struct nvkm_device;
 
-#include <engine/device.h>
-
-int nvkm_acpi_init(struct nouveau_device *);
-int nvkm_acpi_fini(struct nouveau_device *, bool);
-
+int nvkm_acpi_init(struct nvkm_device *);
+int nvkm_acpi_fini(struct nvkm_device *, bool);
 #endif
index ae2ad8b4e5df41e15c225af6caa351bf8376f69f..29bd539af183d6d366ef2cafd79c8a5b0ad49ea9 100644 (file)
  *
  * Authors: Ben Skeggs
  */
+#include "priv.h"
+#include "acpi.h"
 
-#include <core/notify.h>
-#include <core/object.h>
-#include <core/device.h>
 #include <core/client.h>
 #include <core/option.h>
-#include <nvif/unpack.h>
-#include <nvif/class.h>
-
+#include <core/notify.h>
+#include <core/parent.h>
 #include <subdev/bios.h>
 #include <subdev/fb.h>
 #include <subdev/instmem.h>
 
-#include "priv.h"
-#include "acpi.h"
+#include <nvif/class.h>
+#include <nvif/unpack.h>
 
 static DEFINE_MUTEX(nv_devices_mutex);
 static LIST_HEAD(nv_devices);
 
-struct nouveau_device *
-nouveau_device_find(u64 name)
+struct nvkm_device *
+nvkm_device_find(u64 name)
 {
-       struct nouveau_device *device, *match = NULL;
+       struct nvkm_device *device, *match = NULL;
        mutex_lock(&nv_devices_mutex);
        list_for_each_entry(device, &nv_devices, head) {
                if (device->handle == name) {
@@ -56,9 +54,9 @@ nouveau_device_find(u64 name)
 }
 
 int
-nouveau_device_list(u64 *name, int size)
+nvkm_device_list(u64 *name, int size)
 {
-       struct nouveau_device *device;
+       struct nvkm_device *device;
        int nr = 0;
        mutex_lock(&nv_devices_mutex);
        list_for_each_entry(device, &nv_devices, head) {
@@ -70,20 +68,20 @@ nouveau_device_list(u64 *name, int size)
 }
 
 /******************************************************************************
- * nouveau_devobj (0x0080): class implementation
+ * nvkm_devobj (0x0080): class implementation
  *****************************************************************************/
 
-struct nouveau_devobj {
-       struct nouveau_parent base;
-       struct nouveau_object *subdev[NVDEV_SUBDEV_NR];
+struct nvkm_devobj {
+       struct nvkm_parent base;
+       struct nvkm_object *subdev[NVDEV_SUBDEV_NR];
 };
 
 static int
-nouveau_devobj_info(struct nouveau_object *object, void *data, u32 size)
+nvkm_devobj_info(struct nvkm_object *object, void *data, u32 size)
 {
-       struct nouveau_device *device = nv_device(object);
-       struct nouveau_fb *pfb = nouveau_fb(device);
-       struct nouveau_instmem *imem = nouveau_instmem(device);
+       struct nvkm_device *device = nv_device(object);
+       struct nvkm_fb *pfb = nvkm_fb(device);
+       struct nvkm_instmem *imem = nvkm_instmem(device);
        union {
                struct nv_device_info_v0 v0;
        } *args = data;
@@ -148,12 +146,11 @@ nouveau_devobj_info(struct nouveau_object *object, void *data, u32 size)
 }
 
 static int
-nouveau_devobj_mthd(struct nouveau_object *object, u32 mthd,
-                   void *data, u32 size)
+nvkm_devobj_mthd(struct nvkm_object *object, u32 mthd, void *data, u32 size)
 {
        switch (mthd) {
        case NV_DEVICE_V0_INFO:
-               return nouveau_devobj_info(object, data, size);
+               return nvkm_devobj_info(object, data, size);
        default:
                break;
        }
@@ -161,45 +158,45 @@ nouveau_devobj_mthd(struct nouveau_object *object, u32 mthd,
 }
 
 static u8
-nouveau_devobj_rd08(struct nouveau_object *object, u64 addr)
+nvkm_devobj_rd08(struct nvkm_object *object, u64 addr)
 {
        return nv_rd08(object->engine, addr);
 }
 
 static u16
-nouveau_devobj_rd16(struct nouveau_object *object, u64 addr)
+nvkm_devobj_rd16(struct nvkm_object *object, u64 addr)
 {
        return nv_rd16(object->engine, addr);
 }
 
 static u32
-nouveau_devobj_rd32(struct nouveau_object *object, u64 addr)
+nvkm_devobj_rd32(struct nvkm_object *object, u64 addr)
 {
        return nv_rd32(object->engine, addr);
 }
 
 static void
-nouveau_devobj_wr08(struct nouveau_object *object, u64 addr, u8 data)
+nvkm_devobj_wr08(struct nvkm_object *object, u64 addr, u8 data)
 {
        nv_wr08(object->engine, addr, data);
 }
 
 static void
-nouveau_devobj_wr16(struct nouveau_object *object, u64 addr, u16 data)
+nvkm_devobj_wr16(struct nvkm_object *object, u64 addr, u16 data)
 {
        nv_wr16(object->engine, addr, data);
 }
 
 static void
-nouveau_devobj_wr32(struct nouveau_object *object, u64 addr, u32 data)
+nvkm_devobj_wr32(struct nvkm_object *object, u64 addr, u32 data)
 {
        nv_wr32(object->engine, addr, data);
 }
 
 static int
-nouveau_devobj_map(struct nouveau_object *object, u64 *addr, u32 *size)
+nvkm_devobj_map(struct nvkm_object *object, u64 *addr, u32 *size)
 {
-       struct nouveau_device *device = nv_device(object);
+       struct nvkm_device *device = nv_device(object);
        *addr = nv_device_resource_start(device, 0);
        *size = nv_device_resource_len(device, 0);
        return 0;
@@ -248,47 +245,46 @@ static const u64 disable_map[] = {
 };
 
 static void
-nouveau_devobj_dtor(struct nouveau_object *object)
+nvkm_devobj_dtor(struct nvkm_object *object)
 {
-       struct nouveau_devobj *devobj = (void *)object;
+       struct nvkm_devobj *devobj = (void *)object;
        int i;
 
        for (i = NVDEV_SUBDEV_NR - 1; i >= 0; i--)
-               nouveau_object_ref(NULL, &devobj->subdev[i]);
+               nvkm_object_ref(NULL, &devobj->subdev[i]);
 
-       nouveau_parent_destroy(&devobj->base);
+       nvkm_parent_destroy(&devobj->base);
 }
 
-static struct nouveau_oclass
-nouveau_devobj_oclass_super = {
+static struct nvkm_oclass
+nvkm_devobj_oclass_super = {
        .handle = NV_DEVICE,
-       .ofuncs = &(struct nouveau_ofuncs) {
-               .dtor = nouveau_devobj_dtor,
-               .init = _nouveau_parent_init,
-               .fini = _nouveau_parent_fini,
-               .mthd = nouveau_devobj_mthd,
-               .map  = nouveau_devobj_map,
-               .rd08 = nouveau_devobj_rd08,
-               .rd16 = nouveau_devobj_rd16,
-               .rd32 = nouveau_devobj_rd32,
-               .wr08 = nouveau_devobj_wr08,
-               .wr16 = nouveau_devobj_wr16,
-               .wr32 = nouveau_devobj_wr32,
+       .ofuncs = &(struct nvkm_ofuncs) {
+               .dtor = nvkm_devobj_dtor,
+               .init = _nvkm_parent_init,
+               .fini = _nvkm_parent_fini,
+               .mthd = nvkm_devobj_mthd,
+               .map  = nvkm_devobj_map,
+               .rd08 = nvkm_devobj_rd08,
+               .rd16 = nvkm_devobj_rd16,
+               .rd32 = nvkm_devobj_rd32,
+               .wr08 = nvkm_devobj_wr08,
+               .wr16 = nvkm_devobj_wr16,
+               .wr32 = nvkm_devobj_wr32,
        }
 };
 
 static int
-nouveau_devobj_ctor(struct nouveau_object *parent,
-                   struct nouveau_object *engine,
-                   struct nouveau_oclass *oclass, void *data, u32 size,
-                   struct nouveau_object **pobject)
+nvkm_devobj_ctor(struct nvkm_object *parent, struct nvkm_object *engine,
+                struct nvkm_oclass *oclass, void *data, u32 size,
+                struct nvkm_object **pobject)
 {
        union {
                struct nv_device_v0 v0;
        } *args = data;
-       struct nouveau_client *client = nv_client(parent);
-       struct nouveau_device *device;
-       struct nouveau_devobj *devobj;
+       struct nvkm_client *client = nv_client(parent);
+       struct nvkm_device *device;
+       struct nvkm_devobj *devobj;
        u32 boot0, strap;
        u64 disable, mmio_base, mmio_size;
        void __iomem *map;
@@ -305,22 +301,22 @@ nouveau_devobj_ctor(struct nouveau_object *parent,
 
        /* give priviledged clients register access */
        if (client->super)
-               oclass = &nouveau_devobj_oclass_super;
+               oclass = &nvkm_devobj_oclass_super;
 
        /* find the device subdev that matches what the client requested */
        device = nv_device(client->device);
        if (args->v0.device != ~0) {
-               device = nouveau_device_find(args->v0.device);
+               device = nvkm_device_find(args->v0.device);
                if (!device)
                        return -ENODEV;
        }
 
-       ret = nouveau_parent_create(parent, nv_object(device), oclass, 0,
-                                   nouveau_control_oclass,
-                                   (1ULL << NVDEV_ENGINE_DMAOBJ) |
-                                   (1ULL << NVDEV_ENGINE_FIFO) |
-                                   (1ULL << NVDEV_ENGINE_DISP) |
-                                   (1ULL << NVDEV_ENGINE_PM     ), &devobj);
+       ret = nvkm_parent_create(parent, nv_object(device), oclass, 0,
+                                nvkm_control_oclass,
+                                (1ULL << NVDEV_ENGINE_DMAOBJ) |
+                                (1ULL << NVDEV_ENGINE_FIFO) |
+                                (1ULL << NVDEV_ENGINE_DISP) |
+                                (1ULL << NVDEV_ENGINE_PM), &devobj);
        *pobject = nv_object(devobj);
        if (ret)
                return ret;
@@ -403,8 +399,8 @@ nouveau_devobj_ctor(struct nouveau_object *parent,
                case NV_30: ret = nv30_identify(device); break;
                case NV_40: ret = nv40_identify(device); break;
                case NV_50: ret = nv50_identify(device); break;
-               case NV_C0: ret = nvc0_identify(device); break;
-               case NV_E0: ret = nve0_identify(device); break;
+               case NV_C0: ret = gf100_identify(device); break;
+               case NV_E0: ret = gk104_identify(device); break;
                case GM100: ret = gm100_identify(device); break;
                default:
                        ret = -EINVAL;
@@ -439,7 +435,7 @@ nouveau_devobj_ctor(struct nouveau_object *parent,
        } else
        if ( (args->v0.disable & NV_DEVICE_V0_DISABLE_IDENTIFY)) {
                device->cname = "NULL";
-               device->oclass[NVDEV_SUBDEV_VBIOS] = &nouveau_bios_oclass;
+               device->oclass[NVDEV_SUBDEV_VBIOS] = &nvkm_bios_oclass;
        }
 
        if (!(args->v0.disable & NV_DEVICE_V0_DISABLE_MMIO) &&
@@ -457,14 +453,12 @@ nouveau_devobj_ctor(struct nouveau_object *parent,
                        continue;
 
                if (device->subdev[i]) {
-                       nouveau_object_ref(device->subdev[i],
-                                         &devobj->subdev[i]);
+                       nvkm_object_ref(device->subdev[i], &devobj->subdev[i]);
                        continue;
                }
 
-               ret = nouveau_object_ctor(nv_object(device), NULL,
-                                         oclass, NULL, i,
-                                         &devobj->subdev[i]);
+               ret = nvkm_object_ctor(nv_object(device), NULL, oclass,
+                                      NULL, i, &devobj->subdev[i]);
                if (ret == -ENODEV)
                        continue;
                if (ret)
@@ -482,15 +476,15 @@ nouveau_devobj_ctor(struct nouveau_object *parent,
                 * subdev in turn as they're created.
                 */
                while (i >= NVDEV_SUBDEV_DEVINIT_LAST && c <= i) {
-                       struct nouveau_object *subdev = devobj->subdev[c++];
+                       struct nvkm_object *subdev = devobj->subdev[c++];
                        if (subdev && !nv_iclass(subdev, NV_ENGINE_CLASS)) {
-                               ret = nouveau_object_inc(subdev);
+                               ret = nvkm_object_inc(subdev);
                                if (ret)
                                        return ret;
                                atomic_dec(&nv_object(device)->usecount);
                        } else
                        if (subdev) {
-                               nouveau_subdev_reset(subdev);
+                               nvkm_subdev_reset(subdev);
                        }
                }
        }
@@ -498,23 +492,23 @@ nouveau_devobj_ctor(struct nouveau_object *parent,
        return 0;
 }
 
-static struct nouveau_ofuncs
-nouveau_devobj_ofuncs = {
-       .ctor = nouveau_devobj_ctor,
-       .dtor = nouveau_devobj_dtor,
-       .init = _nouveau_parent_init,
-       .fini = _nouveau_parent_fini,
-       .mthd = nouveau_devobj_mthd,
+static struct nvkm_ofuncs
+nvkm_devobj_ofuncs = {
+       .ctor = nvkm_devobj_ctor,
+       .dtor = nvkm_devobj_dtor,
+       .init = _nvkm_parent_init,
+       .fini = _nvkm_parent_fini,
+       .mthd = nvkm_devobj_mthd,
 };
 
 /******************************************************************************
- * nouveau_device: engine functions
+ * nvkm_device: engine functions
  *****************************************************************************/
 
-struct nouveau_device *
+struct nvkm_device *
 nv_device(void *obj)
 {
-       struct nouveau_object *device = nv_object(obj);
+       struct nvkm_object *device = nv_object(obj);
        if (device->engine == NULL) {
                while (device && device->parent)
                        device = device->parent;
@@ -530,15 +524,15 @@ nv_device(void *obj)
        return (void *)device;
 }
 
-static struct nouveau_oclass
-nouveau_device_sclass[] = {
-       { 0x0080, &nouveau_devobj_ofuncs },
+static struct nvkm_oclass
+nvkm_device_sclass[] = {
+       { 0x0080, &nvkm_devobj_ofuncs },
        {}
 };
 
 static int
-nouveau_device_event_ctor(struct nouveau_object *object, void *data, u32 size,
-                         struct nvkm_notify *notify)
+nvkm_device_event_ctor(struct nvkm_object *object, void *data, u32 size,
+                      struct nvkm_notify *notify)
 {
        if (!WARN_ON(size != 0)) {
                notify->size  = 0;
@@ -550,21 +544,21 @@ nouveau_device_event_ctor(struct nouveau_object *object, void *data, u32 size,
 }
 
 static const struct nvkm_event_func
-nouveau_device_event_func = {
-       .ctor = nouveau_device_event_ctor,
+nvkm_device_event_func = {
+       .ctor = nvkm_device_event_ctor,
 };
 
 static int
-nouveau_device_fini(struct nouveau_object *object, bool suspend)
+nvkm_device_fini(struct nvkm_object *object, bool suspend)
 {
-       struct nouveau_device *device = (void *)object;
-       struct nouveau_object *subdev;
+       struct nvkm_device *device = (void *)object;
+       struct nvkm_object *subdev;
        int ret, i;
 
        for (i = NVDEV_SUBDEV_NR - 1; i >= 0; i--) {
                if ((subdev = device->subdev[i])) {
                        if (!nv_iclass(subdev, NV_ENGINE_CLASS)) {
-                               ret = nouveau_object_dec(subdev, suspend);
+                               ret = nvkm_object_dec(subdev, suspend);
                                if (ret && suspend)
                                        goto fail;
                        }
@@ -576,7 +570,7 @@ fail:
        for (; ret && i < NVDEV_SUBDEV_NR; i++) {
                if ((subdev = device->subdev[i])) {
                        if (!nv_iclass(subdev, NV_ENGINE_CLASS)) {
-                               ret = nouveau_object_inc(subdev);
+                               ret = nvkm_object_inc(subdev);
                                if (ret) {
                                        /* XXX */
                                }
@@ -588,10 +582,10 @@ fail:
 }
 
 static int
-nouveau_device_init(struct nouveau_object *object)
+nvkm_device_init(struct nvkm_object *object)
 {
-       struct nouveau_device *device = (void *)object;
-       struct nouveau_object *subdev;
+       struct nvkm_device *device = (void *)object;
+       struct nvkm_object *subdev;
        int ret, i = 0;
 
        ret = nvkm_acpi_init(device);
@@ -601,11 +595,11 @@ nouveau_device_init(struct nouveau_object *object)
        for (i = 0; i < NVDEV_SUBDEV_NR; i++) {
                if ((subdev = device->subdev[i])) {
                        if (!nv_iclass(subdev, NV_ENGINE_CLASS)) {
-                               ret = nouveau_object_inc(subdev);
+                               ret = nvkm_object_inc(subdev);
                                if (ret)
                                        goto fail;
                        } else {
-                               nouveau_subdev_reset(subdev);
+                               nvkm_subdev_reset(subdev);
                        }
                }
        }
@@ -615,7 +609,7 @@ fail:
        for (--i; ret && i >= 0; i--) {
                if ((subdev = device->subdev[i])) {
                        if (!nv_iclass(subdev, NV_ENGINE_CLASS))
-                               nouveau_object_dec(subdev, false);
+                               nvkm_object_dec(subdev, false);
                }
        }
 
@@ -625,9 +619,9 @@ fail:
 }
 
 static void
-nouveau_device_dtor(struct nouveau_object *object)
+nvkm_device_dtor(struct nvkm_object *object)
 {
-       struct nouveau_device *device = (void *)object;
+       struct nvkm_device *device = (void *)object;
 
        nvkm_event_fini(&device->event);
 
@@ -638,11 +632,11 @@ nouveau_device_dtor(struct nouveau_object *object)
        if (nv_subdev(device)->mmio)
                iounmap(nv_subdev(device)->mmio);
 
-       nouveau_engine_destroy(&device->engine);
+       nvkm_engine_destroy(&device->engine);
 }
 
 resource_size_t
-nv_device_resource_start(struct nouveau_device *device, unsigned int bar)
+nv_device_resource_start(struct nvkm_device *device, unsigned int bar)
 {
        if (nv_device_is_pci(device)) {
                return pci_resource_start(device->pdev, bar);
@@ -657,7 +651,7 @@ nv_device_resource_start(struct nouveau_device *device, unsigned int bar)
 }
 
 resource_size_t
-nv_device_resource_len(struct nouveau_device *device, unsigned int bar)
+nv_device_resource_len(struct nvkm_device *device, unsigned int bar)
 {
        if (nv_device_is_pci(device)) {
                return pci_resource_len(device->pdev, bar);
@@ -672,7 +666,7 @@ nv_device_resource_len(struct nouveau_device *device, unsigned int bar)
 }
 
 int
-nv_device_get_irq(struct nouveau_device *device, bool stall)
+nv_device_get_irq(struct nvkm_device *device, bool stall)
 {
        if (nv_device_is_pci(device)) {
                return device->pdev->irq;
@@ -682,22 +676,22 @@ nv_device_get_irq(struct nouveau_device *device, bool stall)
        }
 }
 
-static struct nouveau_oclass
-nouveau_device_oclass = {
+static struct nvkm_oclass
+nvkm_device_oclass = {
        .handle = NV_ENGINE(DEVICE, 0x00),
-       .ofuncs = &(struct nouveau_ofuncs) {
-               .dtor = nouveau_device_dtor,
-               .init = nouveau_device_init,
-               .fini = nouveau_device_fini,
+       .ofuncs = &(struct nvkm_ofuncs) {
+               .dtor = nvkm_device_dtor,
+               .init = nvkm_device_init,
+               .fini = nvkm_device_fini,
        },
 };
 
 int
-nouveau_device_create_(void *dev, enum nv_bus_type type, u64 name,
-                      const char *sname, const char *cfg, const char *dbg,
-                      int length, void **pobject)
+nvkm_device_create_(void *dev, enum nv_bus_type type, u64 name,
+                   const char *sname, const char *cfg, const char *dbg,
+                   int length, void **pobject)
 {
-       struct nouveau_device *device;
+       struct nvkm_device *device;
        int ret = -EEXIST;
 
        mutex_lock(&nv_devices_mutex);
@@ -706,17 +700,17 @@ nouveau_device_create_(void *dev, enum nv_bus_type type, u64 name,
                        goto done;
        }
 
-       ret = nouveau_engine_create_(NULL, NULL, &nouveau_device_oclass, true,
-                                    "DEVICE", "device", length, pobject);
+       ret = nvkm_engine_create_(NULL, NULL, &nvkm_device_oclass, true,
+                                 "DEVICE", "device", length, pobject);
        device = *pobject;
        if (ret)
                goto done;
 
        switch (type) {
-       case NOUVEAU_BUS_PCI:
+       case NVKM_BUS_PCI:
                device->pdev = dev;
                break;
-       case NOUVEAU_BUS_PLATFORM:
+       case NVKM_BUS_PLATFORM:
                device->platformdev = dev;
                break;
        }
@@ -725,12 +719,11 @@ nouveau_device_create_(void *dev, enum nv_bus_type type, u64 name,
        device->dbgopt = dbg;
        device->name = sname;
 
-       nv_subdev(device)->debug = nouveau_dbgopt(device->dbgopt, "DEVICE");
-       nv_engine(device)->sclass = nouveau_device_sclass;
+       nv_subdev(device)->debug = nvkm_dbgopt(device->dbgopt, "DEVICE");
+       nv_engine(device)->sclass = nvkm_device_sclass;
        list_add(&device->head, &nv_devices);
 
-       ret = nvkm_event_init(&nouveau_device_event_func, 1, 1,
-                             &device->event);
+       ret = nvkm_event_init(&nvkm_device_event_func, 1, 1, &device->event);
 done:
        mutex_unlock(&nv_devices_mutex);
        return ret;
index 7a7632e65c772a138f22e4e51818cbeb54b7f73c..0b794b13cec3f0566b48ac5c914c6740ac3b1195 100644 (file)
  *
  * Authors: Ben Skeggs <bskeggs@redhat.com>
  */
+#include "priv.h"
 
 #include <core/client.h>
-#include <core/object.h>
-#include <nvif/unpack.h>
-#include <nvif/class.h>
-#include <nvif/ioctl.h>
-
 #include <subdev/clk.h>
 
-#include "priv.h"
+#include <nvif/class.h>
+#include <nvif/ioctl.h>
+#include <nvif/unpack.h>
 
 static int
-nouveau_control_mthd_pstate_info(struct nouveau_object *object,
-                                void *data, u32 size)
+nvkm_control_mthd_pstate_info(struct nvkm_object *object, void *data, u32 size)
 {
        union {
                struct nvif_control_pstate_info_v0 v0;
        } *args = data;
-       struct nouveau_clk *clk = nouveau_clk(object);
+       struct nvkm_clk *clk = nvkm_clk(object);
        int ret;
 
        nv_ioctl(object, "control pstate info size %d\n", size);
@@ -67,16 +64,15 @@ nouveau_control_mthd_pstate_info(struct nouveau_object *object,
 }
 
 static int
-nouveau_control_mthd_pstate_attr(struct nouveau_object *object,
-                                void *data, u32 size)
+nvkm_control_mthd_pstate_attr(struct nvkm_object *object, void *data, u32 size)
 {
        union {
                struct nvif_control_pstate_attr_v0 v0;
        } *args = data;
-       struct nouveau_clk *clk = nouveau_clk(object);
-       struct nouveau_domain *domain;
-       struct nouveau_pstate *pstate;
-       struct nouveau_cstate *cstate;
+       struct nvkm_clk *clk = nvkm_clk(object);
+       struct nvkm_domain *domain;
+       struct nvkm_pstate *pstate;
+       struct nvkm_cstate *cstate;
        int i = 0, j = -1;
        u32 lo, hi;
        int ret;
@@ -141,13 +137,12 @@ nouveau_control_mthd_pstate_attr(struct nouveau_object *object,
 }
 
 static int
-nouveau_control_mthd_pstate_user(struct nouveau_object *object,
-                                void *data, u32 size)
+nvkm_control_mthd_pstate_user(struct nvkm_object *object, void *data, u32 size)
 {
        union {
                struct nvif_control_pstate_user_v0 v0;
        } *args = data;
-       struct nouveau_clk *clk = nouveau_clk(object);
+       struct nvkm_clk *clk = nvkm_clk(object);
        int ret;
 
        nv_ioctl(object, "control pstate user size %d\n", size);
@@ -161,45 +156,44 @@ nouveau_control_mthd_pstate_user(struct nouveau_object *object,
                return ret;
 
        if (args->v0.pwrsrc >= 0) {
-               ret |= nouveau_clk_ustate(clk, args->v0.ustate, args->v0.pwrsrc);
+               ret |= nvkm_clk_ustate(clk, args->v0.ustate, args->v0.pwrsrc);
        } else {
-               ret |= nouveau_clk_ustate(clk, args->v0.ustate, 0);
-               ret |= nouveau_clk_ustate(clk, args->v0.ustate, 1);
+               ret |= nvkm_clk_ustate(clk, args->v0.ustate, 0);
+               ret |= nvkm_clk_ustate(clk, args->v0.ustate, 1);
        }
 
        return ret;
 }
 
 static int
-nouveau_control_mthd(struct nouveau_object *object, u32 mthd,
-                    void *data, u32 size)
+nvkm_control_mthd(struct nvkm_object *object, u32 mthd, void *data, u32 size)
 {
        switch (mthd) {
        case NVIF_CONTROL_PSTATE_INFO:
-               return nouveau_control_mthd_pstate_info(object, data, size);
+               return nvkm_control_mthd_pstate_info(object, data, size);
        case NVIF_CONTROL_PSTATE_ATTR:
-               return nouveau_control_mthd_pstate_attr(object, data, size);
+               return nvkm_control_mthd_pstate_attr(object, data, size);
        case NVIF_CONTROL_PSTATE_USER:
-               return nouveau_control_mthd_pstate_user(object, data, size);
+               return nvkm_control_mthd_pstate_user(object, data, size);
        default:
                break;
        }
        return -EINVAL;
 }
 
-static struct nouveau_ofuncs
-nouveau_control_ofuncs = {
-       .ctor = _nouveau_object_ctor,
-       .dtor = nouveau_object_destroy,
-       .init = nouveau_object_init,
-       .fini = nouveau_object_fini,
-       .mthd = nouveau_control_mthd,
+static struct nvkm_ofuncs
+nvkm_control_ofuncs = {
+       .ctor = _nvkm_object_ctor,
+       .dtor = nvkm_object_destroy,
+       .init = nvkm_object_init,
+       .fini = nvkm_object_fini,
+       .mthd = nvkm_control_mthd,
 };
 
-struct nouveau_oclass
-nouveau_control_oclass[] = {
+struct nvkm_oclass
+nvkm_control_oclass[] = {
        { .handle = NVIF_IOCTL_NEW_V0_CONTROL,
-         .ofuncs = &nouveau_control_ofuncs
+         .ofuncs = &nvkm_control_ofuncs
        },
        {}
 };
diff --git a/drivers/gpu/drm/nouveau/nvkm/engine/device/gf100.c b/drivers/gpu/drm/nouveau/nvkm/engine/device/gf100.c
new file mode 100644 (file)
index 0000000..82b38d7
--- /dev/null
@@ -0,0 +1,358 @@
+/*
+ * Copyright 2012 Red Hat Inc.
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a
+ * copy of this software and associated documentation files (the "Software"),
+ * to deal in the Software without restriction, including without limitation
+ * the rights to use, copy, modify, merge, publish, distribute, sublicense,
+ * and/or sell copies of the Software, and to permit persons to whom the
+ * Software is furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be included in
+ * all copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL
+ * THE COPYRIGHT HOLDER(S) OR AUTHOR(S) BE LIABLE FOR ANY CLAIM, DAMAGES OR
+ * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
+ * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
+ * OTHER DEALINGS IN THE SOFTWARE.
+ *
+ * Authors: Ben Skeggs
+ */
+#include "priv.h"
+
+#include <subdev/bios.h>
+#include <subdev/bus.h>
+#include <subdev/gpio.h>
+#include <subdev/i2c.h>
+#include <subdev/fuse.h>
+#include <subdev/clk.h>
+#include <subdev/therm.h>
+#include <subdev/mxm.h>
+#include <subdev/devinit.h>
+#include <subdev/mc.h>
+#include <subdev/timer.h>
+#include <subdev/fb.h>
+#include <subdev/ltc.h>
+#include <subdev/ibus.h>
+#include <subdev/instmem.h>
+#include <subdev/mmu.h>
+#include <subdev/bar.h>
+#include <subdev/pmu.h>
+#include <subdev/volt.h>
+
+#include <engine/dmaobj.h>
+#include <engine/fifo.h>
+#include <engine/sw.h>
+#include <engine/gr.h>
+#include <engine/mspdec.h>
+#include <engine/bsp.h>
+#include <engine/msvld.h>
+#include <engine/msppp.h>
+#include <engine/ce.h>
+#include <engine/disp.h>
+#include <engine/pm.h>
+
+int
+gf100_identify(struct nvkm_device *device)
+{
+       switch (device->chipset) {
+       case 0xc0:
+               device->cname = "GF100";
+               device->oclass[NVDEV_SUBDEV_VBIOS  ] = &nvkm_bios_oclass;
+               device->oclass[NVDEV_SUBDEV_GPIO   ] =  g94_gpio_oclass;
+               device->oclass[NVDEV_SUBDEV_I2C    ] =  g94_i2c_oclass;
+               device->oclass[NVDEV_SUBDEV_FUSE   ] = &gf100_fuse_oclass;
+               device->oclass[NVDEV_SUBDEV_CLK    ] = &gf100_clk_oclass;
+               device->oclass[NVDEV_SUBDEV_THERM  ] = &gt215_therm_oclass;
+               device->oclass[NVDEV_SUBDEV_MXM    ] = &nv50_mxm_oclass;
+               device->oclass[NVDEV_SUBDEV_DEVINIT] =  gf100_devinit_oclass;
+               device->oclass[NVDEV_SUBDEV_MC     ] =  gf100_mc_oclass;
+               device->oclass[NVDEV_SUBDEV_BUS    ] =  gf100_bus_oclass;
+               device->oclass[NVDEV_SUBDEV_TIMER  ] = &nv04_timer_oclass;
+               device->oclass[NVDEV_SUBDEV_FB     ] =  gf100_fb_oclass;
+               device->oclass[NVDEV_SUBDEV_LTC    ] =  gf100_ltc_oclass;
+               device->oclass[NVDEV_SUBDEV_IBUS   ] = &gf100_ibus_oclass;
+               device->oclass[NVDEV_SUBDEV_INSTMEM] =  nv50_instmem_oclass;
+               device->oclass[NVDEV_SUBDEV_MMU    ] = &gf100_mmu_oclass;
+               device->oclass[NVDEV_SUBDEV_BAR    ] = &gf100_bar_oclass;
+               device->oclass[NVDEV_SUBDEV_PMU    ] =  gf100_pmu_oclass;
+               device->oclass[NVDEV_SUBDEV_VOLT   ] = &nv40_volt_oclass;
+               device->oclass[NVDEV_ENGINE_DMAOBJ ] =  gf100_dmaeng_oclass;
+               device->oclass[NVDEV_ENGINE_FIFO   ] =  gf100_fifo_oclass;
+               device->oclass[NVDEV_ENGINE_SW     ] =  gf100_sw_oclass;
+               device->oclass[NVDEV_ENGINE_GR     ] =  gf100_gr_oclass;
+               device->oclass[NVDEV_ENGINE_MSPDEC ] = &gf100_mspdec_oclass;
+               device->oclass[NVDEV_ENGINE_MSVLD  ] = &gf100_msvld_oclass;
+               device->oclass[NVDEV_ENGINE_MSPPP  ] = &gf100_msppp_oclass;
+               device->oclass[NVDEV_ENGINE_CE0    ] = &gf100_ce0_oclass;
+               device->oclass[NVDEV_ENGINE_CE1    ] = &gf100_ce1_oclass;
+               device->oclass[NVDEV_ENGINE_DISP   ] =  gt215_disp_oclass;
+               device->oclass[NVDEV_ENGINE_PM     ] = &gf100_pm_oclass;
+               break;
+       case 0xc4:
+               device->cname = "GF104";
+               device->oclass[NVDEV_SUBDEV_VBIOS  ] = &nvkm_bios_oclass;
+               device->oclass[NVDEV_SUBDEV_GPIO   ] =  g94_gpio_oclass;
+               device->oclass[NVDEV_SUBDEV_I2C    ] =  g94_i2c_oclass;
+               device->oclass[NVDEV_SUBDEV_FUSE   ] = &gf100_fuse_oclass;
+               device->oclass[NVDEV_SUBDEV_CLK    ] = &gf100_clk_oclass;
+               device->oclass[NVDEV_SUBDEV_THERM  ] = &gt215_therm_oclass;
+               device->oclass[NVDEV_SUBDEV_MXM    ] = &nv50_mxm_oclass;
+               device->oclass[NVDEV_SUBDEV_DEVINIT] =  gf100_devinit_oclass;
+               device->oclass[NVDEV_SUBDEV_MC     ] =  gf100_mc_oclass;
+               device->oclass[NVDEV_SUBDEV_BUS    ] =  gf100_bus_oclass;
+               device->oclass[NVDEV_SUBDEV_TIMER  ] = &nv04_timer_oclass;
+               device->oclass[NVDEV_SUBDEV_FB     ] =  gf100_fb_oclass;
+               device->oclass[NVDEV_SUBDEV_LTC    ] =  gf100_ltc_oclass;
+               device->oclass[NVDEV_SUBDEV_IBUS   ] = &gf100_ibus_oclass;
+               device->oclass[NVDEV_SUBDEV_INSTMEM] =  nv50_instmem_oclass;
+               device->oclass[NVDEV_SUBDEV_MMU    ] = &gf100_mmu_oclass;
+               device->oclass[NVDEV_SUBDEV_BAR    ] = &gf100_bar_oclass;
+               device->oclass[NVDEV_SUBDEV_PMU    ] =  gf100_pmu_oclass;
+               device->oclass[NVDEV_SUBDEV_VOLT   ] = &nv40_volt_oclass;
+               device->oclass[NVDEV_ENGINE_DMAOBJ ] =  gf100_dmaeng_oclass;
+               device->oclass[NVDEV_ENGINE_FIFO   ] =  gf100_fifo_oclass;
+               device->oclass[NVDEV_ENGINE_SW     ] =  gf100_sw_oclass;
+               device->oclass[NVDEV_ENGINE_GR     ] =  gf104_gr_oclass;
+               device->oclass[NVDEV_ENGINE_MSPDEC ] = &gf100_mspdec_oclass;
+               device->oclass[NVDEV_ENGINE_MSVLD  ] = &gf100_msvld_oclass;
+               device->oclass[NVDEV_ENGINE_MSPPP  ] = &gf100_msppp_oclass;
+               device->oclass[NVDEV_ENGINE_CE0    ] = &gf100_ce0_oclass;
+               device->oclass[NVDEV_ENGINE_CE1    ] = &gf100_ce1_oclass;
+               device->oclass[NVDEV_ENGINE_DISP   ] =  gt215_disp_oclass;
+               device->oclass[NVDEV_ENGINE_PM     ] = &gf100_pm_oclass;
+               break;
+       case 0xc3:
+               device->cname = "GF106";
+               device->oclass[NVDEV_SUBDEV_VBIOS  ] = &nvkm_bios_oclass;
+               device->oclass[NVDEV_SUBDEV_GPIO   ] =  g94_gpio_oclass;
+               device->oclass[NVDEV_SUBDEV_I2C    ] =  g94_i2c_oclass;
+               device->oclass[NVDEV_SUBDEV_FUSE   ] = &gf100_fuse_oclass;
+               device->oclass[NVDEV_SUBDEV_CLK    ] = &gf100_clk_oclass;
+               device->oclass[NVDEV_SUBDEV_THERM  ] = &gt215_therm_oclass;
+               device->oclass[NVDEV_SUBDEV_MXM    ] = &nv50_mxm_oclass;
+               device->oclass[NVDEV_SUBDEV_DEVINIT] =  gf100_devinit_oclass;
+               device->oclass[NVDEV_SUBDEV_MC     ] =  gf106_mc_oclass;
+               device->oclass[NVDEV_SUBDEV_BUS    ] =  gf100_bus_oclass;
+               device->oclass[NVDEV_SUBDEV_TIMER  ] = &nv04_timer_oclass;
+               device->oclass[NVDEV_SUBDEV_FB     ] =  gf100_fb_oclass;
+               device->oclass[NVDEV_SUBDEV_LTC    ] =  gf100_ltc_oclass;
+               device->oclass[NVDEV_SUBDEV_IBUS   ] = &gf100_ibus_oclass;
+               device->oclass[NVDEV_SUBDEV_INSTMEM] =  nv50_instmem_oclass;
+               device->oclass[NVDEV_SUBDEV_MMU    ] = &gf100_mmu_oclass;
+               device->oclass[NVDEV_SUBDEV_BAR    ] = &gf100_bar_oclass;
+               device->oclass[NVDEV_SUBDEV_PMU    ] =  gf100_pmu_oclass;
+               device->oclass[NVDEV_SUBDEV_VOLT   ] = &nv40_volt_oclass;
+               device->oclass[NVDEV_ENGINE_DMAOBJ ] =  gf100_dmaeng_oclass;
+               device->oclass[NVDEV_ENGINE_FIFO   ] =  gf100_fifo_oclass;
+               device->oclass[NVDEV_ENGINE_SW     ] =  gf100_sw_oclass;
+               device->oclass[NVDEV_ENGINE_GR     ] =  gf104_gr_oclass;
+               device->oclass[NVDEV_ENGINE_MSPDEC ] = &gf100_mspdec_oclass;
+               device->oclass[NVDEV_ENGINE_MSVLD  ] = &gf100_msvld_oclass;
+               device->oclass[NVDEV_ENGINE_MSPPP  ] = &gf100_msppp_oclass;
+               device->oclass[NVDEV_ENGINE_CE0    ] = &gf100_ce0_oclass;
+               device->oclass[NVDEV_ENGINE_DISP   ] =  gt215_disp_oclass;
+               device->oclass[NVDEV_ENGINE_PM     ] = &gf100_pm_oclass;
+               break;
+       case 0xce:
+               device->cname = "GF114";
+               device->oclass[NVDEV_SUBDEV_VBIOS  ] = &nvkm_bios_oclass;
+               device->oclass[NVDEV_SUBDEV_GPIO   ] =  g94_gpio_oclass;
+               device->oclass[NVDEV_SUBDEV_I2C    ] =  g94_i2c_oclass;
+               device->oclass[NVDEV_SUBDEV_FUSE   ] = &gf100_fuse_oclass;
+               device->oclass[NVDEV_SUBDEV_CLK    ] = &gf100_clk_oclass;
+               device->oclass[NVDEV_SUBDEV_THERM  ] = &gt215_therm_oclass;
+               device->oclass[NVDEV_SUBDEV_MXM    ] = &nv50_mxm_oclass;
+               device->oclass[NVDEV_SUBDEV_DEVINIT] =  gf100_devinit_oclass;
+               device->oclass[NVDEV_SUBDEV_MC     ] =  gf100_mc_oclass;
+               device->oclass[NVDEV_SUBDEV_BUS    ] =  gf100_bus_oclass;
+               device->oclass[NVDEV_SUBDEV_TIMER  ] = &nv04_timer_oclass;
+               device->oclass[NVDEV_SUBDEV_FB     ] =  gf100_fb_oclass;
+               device->oclass[NVDEV_SUBDEV_LTC    ] =  gf100_ltc_oclass;
+               device->oclass[NVDEV_SUBDEV_IBUS   ] = &gf100_ibus_oclass;
+               device->oclass[NVDEV_SUBDEV_INSTMEM] =  nv50_instmem_oclass;
+               device->oclass[NVDEV_SUBDEV_MMU    ] = &gf100_mmu_oclass;
+               device->oclass[NVDEV_SUBDEV_BAR    ] = &gf100_bar_oclass;
+               device->oclass[NVDEV_SUBDEV_PMU    ] =  gf100_pmu_oclass;
+               device->oclass[NVDEV_SUBDEV_VOLT   ] = &nv40_volt_oclass;
+               device->oclass[NVDEV_ENGINE_DMAOBJ ] =  gf100_dmaeng_oclass;
+               device->oclass[NVDEV_ENGINE_FIFO   ] =  gf100_fifo_oclass;
+               device->oclass[NVDEV_ENGINE_SW     ] =  gf100_sw_oclass;
+               device->oclass[NVDEV_ENGINE_GR     ] =  gf104_gr_oclass;
+               device->oclass[NVDEV_ENGINE_MSPDEC ] = &gf100_mspdec_oclass;
+               device->oclass[NVDEV_ENGINE_MSVLD  ] = &gf100_msvld_oclass;
+               device->oclass[NVDEV_ENGINE_MSPPP  ] = &gf100_msppp_oclass;
+               device->oclass[NVDEV_ENGINE_CE0    ] = &gf100_ce0_oclass;
+               device->oclass[NVDEV_ENGINE_CE1    ] = &gf100_ce1_oclass;
+               device->oclass[NVDEV_ENGINE_DISP   ] =  gt215_disp_oclass;
+               device->oclass[NVDEV_ENGINE_PM     ] = &gf100_pm_oclass;
+               break;
+       case 0xcf:
+               device->cname = "GF116";
+               device->oclass[NVDEV_SUBDEV_VBIOS  ] = &nvkm_bios_oclass;
+               device->oclass[NVDEV_SUBDEV_GPIO   ] =  g94_gpio_oclass;
+               device->oclass[NVDEV_SUBDEV_I2C    ] =  g94_i2c_oclass;
+               device->oclass[NVDEV_SUBDEV_FUSE   ] = &gf100_fuse_oclass;
+               device->oclass[NVDEV_SUBDEV_CLK    ] = &gf100_clk_oclass;
+               device->oclass[NVDEV_SUBDEV_THERM  ] = &gt215_therm_oclass;
+               device->oclass[NVDEV_SUBDEV_MXM    ] = &nv50_mxm_oclass;
+               device->oclass[NVDEV_SUBDEV_DEVINIT] =  gf100_devinit_oclass;
+               device->oclass[NVDEV_SUBDEV_MC     ] =  gf106_mc_oclass;
+               device->oclass[NVDEV_SUBDEV_BUS    ] =  gf100_bus_oclass;
+               device->oclass[NVDEV_SUBDEV_TIMER  ] = &nv04_timer_oclass;
+               device->oclass[NVDEV_SUBDEV_FB     ] =  gf100_fb_oclass;
+               device->oclass[NVDEV_SUBDEV_LTC    ] =  gf100_ltc_oclass;
+               device->oclass[NVDEV_SUBDEV_IBUS   ] = &gf100_ibus_oclass;
+               device->oclass[NVDEV_SUBDEV_INSTMEM] =  nv50_instmem_oclass;
+               device->oclass[NVDEV_SUBDEV_MMU    ] = &gf100_mmu_oclass;
+               device->oclass[NVDEV_SUBDEV_BAR    ] = &gf100_bar_oclass;
+               device->oclass[NVDEV_SUBDEV_PMU    ] =  gf100_pmu_oclass;
+               device->oclass[NVDEV_SUBDEV_VOLT   ] = &nv40_volt_oclass;
+               device->oclass[NVDEV_ENGINE_DMAOBJ ] =  gf100_dmaeng_oclass;
+               device->oclass[NVDEV_ENGINE_FIFO   ] =  gf100_fifo_oclass;
+               device->oclass[NVDEV_ENGINE_SW     ] =  gf100_sw_oclass;
+               device->oclass[NVDEV_ENGINE_GR     ] =  gf104_gr_oclass;
+               device->oclass[NVDEV_ENGINE_MSPDEC ] = &gf100_mspdec_oclass;
+               device->oclass[NVDEV_ENGINE_MSVLD  ] = &gf100_msvld_oclass;
+               device->oclass[NVDEV_ENGINE_MSPPP  ] = &gf100_msppp_oclass;
+               device->oclass[NVDEV_ENGINE_CE0    ] = &gf100_ce0_oclass;
+               device->oclass[NVDEV_ENGINE_DISP   ] =  gt215_disp_oclass;
+               device->oclass[NVDEV_ENGINE_PM     ] = &gf100_pm_oclass;
+               break;
+       case 0xc1:
+               device->cname = "GF108";
+               device->oclass[NVDEV_SUBDEV_VBIOS  ] = &nvkm_bios_oclass;
+               device->oclass[NVDEV_SUBDEV_GPIO   ] =  g94_gpio_oclass;
+               device->oclass[NVDEV_SUBDEV_I2C    ] =  g94_i2c_oclass;
+               device->oclass[NVDEV_SUBDEV_FUSE   ] = &gf100_fuse_oclass;
+               device->oclass[NVDEV_SUBDEV_CLK    ] = &gf100_clk_oclass;
+               device->oclass[NVDEV_SUBDEV_THERM  ] = &gt215_therm_oclass;
+               device->oclass[NVDEV_SUBDEV_MXM    ] = &nv50_mxm_oclass;
+               device->oclass[NVDEV_SUBDEV_DEVINIT] =  gf100_devinit_oclass;
+               device->oclass[NVDEV_SUBDEV_MC     ] =  gf106_mc_oclass;
+               device->oclass[NVDEV_SUBDEV_BUS    ] =  gf100_bus_oclass;
+               device->oclass[NVDEV_SUBDEV_TIMER  ] = &nv04_timer_oclass;
+               device->oclass[NVDEV_SUBDEV_FB     ] =  gf100_fb_oclass;
+               device->oclass[NVDEV_SUBDEV_LTC    ] =  gf100_ltc_oclass;
+               device->oclass[NVDEV_SUBDEV_IBUS   ] = &gf100_ibus_oclass;
+               device->oclass[NVDEV_SUBDEV_INSTMEM] =  nv50_instmem_oclass;
+               device->oclass[NVDEV_SUBDEV_MMU    ] = &gf100_mmu_oclass;
+               device->oclass[NVDEV_SUBDEV_BAR    ] = &gf100_bar_oclass;
+               device->oclass[NVDEV_SUBDEV_PMU    ] =  gf100_pmu_oclass;
+               device->oclass[NVDEV_SUBDEV_VOLT   ] = &nv40_volt_oclass;
+               device->oclass[NVDEV_ENGINE_DMAOBJ ] =  gf100_dmaeng_oclass;
+               device->oclass[NVDEV_ENGINE_FIFO   ] =  gf100_fifo_oclass;
+               device->oclass[NVDEV_ENGINE_SW     ] =  gf100_sw_oclass;
+               device->oclass[NVDEV_ENGINE_GR     ] =  gf108_gr_oclass;
+               device->oclass[NVDEV_ENGINE_MSPDEC ] = &gf100_mspdec_oclass;
+               device->oclass[NVDEV_ENGINE_MSVLD  ] = &gf100_msvld_oclass;
+               device->oclass[NVDEV_ENGINE_MSPPP  ] = &gf100_msppp_oclass;
+               device->oclass[NVDEV_ENGINE_CE0    ] = &gf100_ce0_oclass;
+               device->oclass[NVDEV_ENGINE_DISP   ] =  gt215_disp_oclass;
+               device->oclass[NVDEV_ENGINE_PM     ] = &gf100_pm_oclass;
+               break;
+       case 0xc8:
+               device->cname = "GF110";
+               device->oclass[NVDEV_SUBDEV_VBIOS  ] = &nvkm_bios_oclass;
+               device->oclass[NVDEV_SUBDEV_GPIO   ] =  g94_gpio_oclass;
+               device->oclass[NVDEV_SUBDEV_I2C    ] =  g94_i2c_oclass;
+               device->oclass[NVDEV_SUBDEV_FUSE   ] = &gf100_fuse_oclass;
+               device->oclass[NVDEV_SUBDEV_CLK    ] = &gf100_clk_oclass;
+               device->oclass[NVDEV_SUBDEV_THERM  ] = &gt215_therm_oclass;
+               device->oclass[NVDEV_SUBDEV_MXM    ] = &nv50_mxm_oclass;
+               device->oclass[NVDEV_SUBDEV_DEVINIT] =  gf100_devinit_oclass;
+               device->oclass[NVDEV_SUBDEV_MC     ] =  gf100_mc_oclass;
+               device->oclass[NVDEV_SUBDEV_BUS    ] =  gf100_bus_oclass;
+               device->oclass[NVDEV_SUBDEV_TIMER  ] = &nv04_timer_oclass;
+               device->oclass[NVDEV_SUBDEV_FB     ] =  gf100_fb_oclass;
+               device->oclass[NVDEV_SUBDEV_LTC    ] =  gf100_ltc_oclass;
+               device->oclass[NVDEV_SUBDEV_IBUS   ] = &gf100_ibus_oclass;
+               device->oclass[NVDEV_SUBDEV_INSTMEM] =  nv50_instmem_oclass;
+               device->oclass[NVDEV_SUBDEV_MMU    ] = &gf100_mmu_oclass;
+               device->oclass[NVDEV_SUBDEV_BAR    ] = &gf100_bar_oclass;
+               device->oclass[NVDEV_SUBDEV_PMU    ] =  gf100_pmu_oclass;
+               device->oclass[NVDEV_SUBDEV_VOLT   ] = &nv40_volt_oclass;
+               device->oclass[NVDEV_ENGINE_DMAOBJ ] =  gf100_dmaeng_oclass;
+               device->oclass[NVDEV_ENGINE_FIFO   ] =  gf100_fifo_oclass;
+               device->oclass[NVDEV_ENGINE_SW     ] =  gf100_sw_oclass;
+               device->oclass[NVDEV_ENGINE_GR     ] =  gf110_gr_oclass;
+               device->oclass[NVDEV_ENGINE_MSPDEC ] = &gf100_mspdec_oclass;
+               device->oclass[NVDEV_ENGINE_MSVLD  ] = &gf100_msvld_oclass;
+               device->oclass[NVDEV_ENGINE_MSPPP  ] = &gf100_msppp_oclass;
+               device->oclass[NVDEV_ENGINE_CE0    ] = &gf100_ce0_oclass;
+               device->oclass[NVDEV_ENGINE_CE1    ] = &gf100_ce1_oclass;
+               device->oclass[NVDEV_ENGINE_DISP   ] =  gt215_disp_oclass;
+               device->oclass[NVDEV_ENGINE_PM     ] = &gf100_pm_oclass;
+               break;
+       case 0xd9:
+               device->cname = "GF119";
+               device->oclass[NVDEV_SUBDEV_VBIOS  ] = &nvkm_bios_oclass;
+               device->oclass[NVDEV_SUBDEV_GPIO   ] =  gf110_gpio_oclass;
+               device->oclass[NVDEV_SUBDEV_I2C    ] =  gf110_i2c_oclass;
+               device->oclass[NVDEV_SUBDEV_FUSE   ] = &gf100_fuse_oclass;
+               device->oclass[NVDEV_SUBDEV_CLK    ] = &gf100_clk_oclass;
+               device->oclass[NVDEV_SUBDEV_THERM  ] = &gf110_therm_oclass;
+               device->oclass[NVDEV_SUBDEV_MXM    ] = &nv50_mxm_oclass;
+               device->oclass[NVDEV_SUBDEV_DEVINIT] =  gf100_devinit_oclass;
+               device->oclass[NVDEV_SUBDEV_MC     ] =  gf106_mc_oclass;
+               device->oclass[NVDEV_SUBDEV_BUS    ] =  gf100_bus_oclass;
+               device->oclass[NVDEV_SUBDEV_TIMER  ] = &nv04_timer_oclass;
+               device->oclass[NVDEV_SUBDEV_FB     ] =  gf100_fb_oclass;
+               device->oclass[NVDEV_SUBDEV_LTC    ] =  gf100_ltc_oclass;
+               device->oclass[NVDEV_SUBDEV_IBUS   ] = &gf100_ibus_oclass;
+               device->oclass[NVDEV_SUBDEV_INSTMEM] =  nv50_instmem_oclass;
+               device->oclass[NVDEV_SUBDEV_MMU    ] = &gf100_mmu_oclass;
+               device->oclass[NVDEV_SUBDEV_BAR    ] = &gf100_bar_oclass;
+               device->oclass[NVDEV_SUBDEV_PMU    ] =  gf110_pmu_oclass;
+               device->oclass[NVDEV_SUBDEV_VOLT   ] = &nv40_volt_oclass;
+               device->oclass[NVDEV_ENGINE_DMAOBJ ] =  gf110_dmaeng_oclass;
+               device->oclass[NVDEV_ENGINE_FIFO   ] =  gf100_fifo_oclass;
+               device->oclass[NVDEV_ENGINE_SW     ] =  gf100_sw_oclass;
+               device->oclass[NVDEV_ENGINE_GR     ] =  gf119_gr_oclass;
+               device->oclass[NVDEV_ENGINE_MSPDEC ] = &gf100_mspdec_oclass;
+               device->oclass[NVDEV_ENGINE_MSVLD  ] = &gf100_msvld_oclass;
+               device->oclass[NVDEV_ENGINE_MSPPP  ] = &gf100_msppp_oclass;
+               device->oclass[NVDEV_ENGINE_CE0    ] = &gf100_ce0_oclass;
+               device->oclass[NVDEV_ENGINE_DISP   ] =  gf110_disp_oclass;
+               device->oclass[NVDEV_ENGINE_PM     ] = &gf100_pm_oclass;
+               break;
+       case 0xd7:
+               device->cname = "GF117";
+               device->oclass[NVDEV_SUBDEV_VBIOS  ] = &nvkm_bios_oclass;
+               device->oclass[NVDEV_SUBDEV_GPIO   ] =  gf110_gpio_oclass;
+               device->oclass[NVDEV_SUBDEV_I2C    ] =  gf117_i2c_oclass;
+               device->oclass[NVDEV_SUBDEV_FUSE   ] = &gf100_fuse_oclass;
+               device->oclass[NVDEV_SUBDEV_CLK    ] = &gf100_clk_oclass;
+               device->oclass[NVDEV_SUBDEV_THERM  ] = &gf110_therm_oclass;
+               device->oclass[NVDEV_SUBDEV_MXM    ] = &nv50_mxm_oclass;
+               device->oclass[NVDEV_SUBDEV_DEVINIT] =  gf100_devinit_oclass;
+               device->oclass[NVDEV_SUBDEV_MC     ] =  gf106_mc_oclass;
+               device->oclass[NVDEV_SUBDEV_BUS    ] =  gf100_bus_oclass;
+               device->oclass[NVDEV_SUBDEV_TIMER  ] = &nv04_timer_oclass;
+               device->oclass[NVDEV_SUBDEV_FB     ] =  gf100_fb_oclass;
+               device->oclass[NVDEV_SUBDEV_LTC    ] =  gf100_ltc_oclass;
+               device->oclass[NVDEV_SUBDEV_IBUS   ] = &gf100_ibus_oclass;
+               device->oclass[NVDEV_SUBDEV_INSTMEM] =  nv50_instmem_oclass;
+               device->oclass[NVDEV_SUBDEV_MMU    ] = &gf100_mmu_oclass;
+               device->oclass[NVDEV_SUBDEV_BAR    ] = &gf100_bar_oclass;
+               device->oclass[NVDEV_ENGINE_DMAOBJ ] =  gf110_dmaeng_oclass;
+               device->oclass[NVDEV_ENGINE_FIFO   ] =  gf100_fifo_oclass;
+               device->oclass[NVDEV_ENGINE_SW     ] =  gf100_sw_oclass;
+               device->oclass[NVDEV_ENGINE_GR     ] =  gf117_gr_oclass;
+               device->oclass[NVDEV_ENGINE_MSPDEC ] = &gf100_mspdec_oclass;
+               device->oclass[NVDEV_ENGINE_MSVLD  ] = &gf100_msvld_oclass;
+               device->oclass[NVDEV_ENGINE_MSPPP  ] = &gf100_msppp_oclass;
+               device->oclass[NVDEV_ENGINE_CE0    ] = &gf100_ce0_oclass;
+               device->oclass[NVDEV_ENGINE_DISP   ] =  gf110_disp_oclass;
+               device->oclass[NVDEV_ENGINE_PM     ] = &gf100_pm_oclass;
+               break;
+       default:
+               nv_fatal(device, "unknown Fermi chipset\n");
+               return -EINVAL;
+       }
+
+       return 0;
+}
diff --git a/drivers/gpu/drm/nouveau/nvkm/engine/device/gk104.c b/drivers/gpu/drm/nouveau/nvkm/engine/device/gk104.c
new file mode 100644 (file)
index 0000000..bf58934
--- /dev/null
@@ -0,0 +1,326 @@
+/*
+ * Copyright 2012 Red Hat Inc.
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a
+ * copy of this software and associated documentation files (the "Software"),
+ * to deal in the Software without restriction, including without limitation
+ * the rights to use, copy, modify, merge, publish, distribute, sublicense,
+ * and/or sell copies of the Software, and to permit persons to whom the
+ * Software is furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be included in
+ * all copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL
+ * THE COPYRIGHT HOLDER(S) OR AUTHOR(S) BE LIABLE FOR ANY CLAIM, DAMAGES OR
+ * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
+ * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
+ * OTHER DEALINGS IN THE SOFTWARE.
+ *
+ * Authors: Ben Skeggs
+ */
+#include "priv.h"
+
+#include <subdev/bios.h>
+#include <subdev/bus.h>
+#include <subdev/gpio.h>
+#include <subdev/i2c.h>
+#include <subdev/fuse.h>
+#include <subdev/clk.h>
+#include <subdev/therm.h>
+#include <subdev/mxm.h>
+#include <subdev/devinit.h>
+#include <subdev/mc.h>
+#include <subdev/timer.h>
+#include <subdev/fb.h>
+#include <subdev/ltc.h>
+#include <subdev/ibus.h>
+#include <subdev/instmem.h>
+#include <subdev/mmu.h>
+#include <subdev/bar.h>
+#include <subdev/pmu.h>
+#include <subdev/volt.h>
+
+#include <engine/dmaobj.h>
+#include <engine/fifo.h>
+#include <engine/sw.h>
+#include <engine/gr.h>
+#include <engine/disp.h>
+#include <engine/ce.h>
+#include <engine/bsp.h>
+#include <engine/msvld.h>
+#include <engine/mspdec.h>
+#include <engine/msppp.h>
+#include <engine/pm.h>
+
+int
+gk104_identify(struct nvkm_device *device)
+{
+       switch (device->chipset) {
+       case 0xe4:
+               device->cname = "GK104";
+               device->oclass[NVDEV_SUBDEV_VBIOS  ] = &nvkm_bios_oclass;
+               device->oclass[NVDEV_SUBDEV_GPIO   ] =  gk104_gpio_oclass;
+               device->oclass[NVDEV_SUBDEV_I2C    ] =  gk104_i2c_oclass;
+               device->oclass[NVDEV_SUBDEV_FUSE   ] = &gf100_fuse_oclass;
+               device->oclass[NVDEV_SUBDEV_CLK    ] = &gk104_clk_oclass;
+               device->oclass[NVDEV_SUBDEV_THERM  ] = &gf110_therm_oclass;
+               device->oclass[NVDEV_SUBDEV_MXM    ] = &nv50_mxm_oclass;
+               device->oclass[NVDEV_SUBDEV_DEVINIT] =  gf100_devinit_oclass;
+               device->oclass[NVDEV_SUBDEV_MC     ] =  gf106_mc_oclass;
+               device->oclass[NVDEV_SUBDEV_BUS    ] =  gf100_bus_oclass;
+               device->oclass[NVDEV_SUBDEV_TIMER  ] = &nv04_timer_oclass;
+               device->oclass[NVDEV_SUBDEV_FB     ] =  gk104_fb_oclass;
+               device->oclass[NVDEV_SUBDEV_LTC    ] =  gk104_ltc_oclass;
+               device->oclass[NVDEV_SUBDEV_IBUS   ] = &gk104_ibus_oclass;
+               device->oclass[NVDEV_SUBDEV_INSTMEM] =  nv50_instmem_oclass;
+               device->oclass[NVDEV_SUBDEV_MMU    ] = &gf100_mmu_oclass;
+               device->oclass[NVDEV_SUBDEV_BAR    ] = &gf100_bar_oclass;
+               device->oclass[NVDEV_SUBDEV_PMU    ] =  gk104_pmu_oclass;
+               device->oclass[NVDEV_SUBDEV_VOLT   ] = &nv40_volt_oclass;
+               device->oclass[NVDEV_ENGINE_DMAOBJ ] =  gf110_dmaeng_oclass;
+               device->oclass[NVDEV_ENGINE_FIFO   ] =  gk104_fifo_oclass;
+               device->oclass[NVDEV_ENGINE_SW     ] =  gf100_sw_oclass;
+               device->oclass[NVDEV_ENGINE_GR     ] =  gk104_gr_oclass;
+               device->oclass[NVDEV_ENGINE_DISP   ] =  gk104_disp_oclass;
+               device->oclass[NVDEV_ENGINE_CE0    ] = &gk104_ce0_oclass;
+               device->oclass[NVDEV_ENGINE_CE1    ] = &gk104_ce1_oclass;
+               device->oclass[NVDEV_ENGINE_CE2    ] = &gk104_ce2_oclass;
+               device->oclass[NVDEV_ENGINE_MSVLD  ] = &gk104_msvld_oclass;
+               device->oclass[NVDEV_ENGINE_MSPDEC ] = &gk104_mspdec_oclass;
+               device->oclass[NVDEV_ENGINE_MSPPP  ] = &gf100_msppp_oclass;
+               device->oclass[NVDEV_ENGINE_PM     ] = &gk104_pm_oclass;
+               break;
+       case 0xe7:
+               device->cname = "GK107";
+               device->oclass[NVDEV_SUBDEV_VBIOS  ] = &nvkm_bios_oclass;
+               device->oclass[NVDEV_SUBDEV_GPIO   ] =  gk104_gpio_oclass;
+               device->oclass[NVDEV_SUBDEV_I2C    ] =  gk104_i2c_oclass;
+               device->oclass[NVDEV_SUBDEV_FUSE   ] = &gf100_fuse_oclass;
+               device->oclass[NVDEV_SUBDEV_CLK    ] = &gk104_clk_oclass;
+               device->oclass[NVDEV_SUBDEV_THERM  ] = &gf110_therm_oclass;
+               device->oclass[NVDEV_SUBDEV_MXM    ] = &nv50_mxm_oclass;
+               device->oclass[NVDEV_SUBDEV_DEVINIT] =  gf100_devinit_oclass;
+               device->oclass[NVDEV_SUBDEV_MC     ] =  gf106_mc_oclass;
+               device->oclass[NVDEV_SUBDEV_BUS    ] =  gf100_bus_oclass;
+               device->oclass[NVDEV_SUBDEV_TIMER  ] = &nv04_timer_oclass;
+               device->oclass[NVDEV_SUBDEV_FB     ] =  gk104_fb_oclass;
+               device->oclass[NVDEV_SUBDEV_LTC    ] =  gk104_ltc_oclass;
+               device->oclass[NVDEV_SUBDEV_IBUS   ] = &gk104_ibus_oclass;
+               device->oclass[NVDEV_SUBDEV_INSTMEM] =  nv50_instmem_oclass;
+               device->oclass[NVDEV_SUBDEV_MMU    ] = &gf100_mmu_oclass;
+               device->oclass[NVDEV_SUBDEV_BAR    ] = &gf100_bar_oclass;
+               device->oclass[NVDEV_SUBDEV_PMU    ] =  gf110_pmu_oclass;
+               device->oclass[NVDEV_SUBDEV_VOLT   ] = &nv40_volt_oclass;
+               device->oclass[NVDEV_ENGINE_DMAOBJ ] =  gf110_dmaeng_oclass;
+               device->oclass[NVDEV_ENGINE_FIFO   ] =  gk104_fifo_oclass;
+               device->oclass[NVDEV_ENGINE_SW     ] =  gf100_sw_oclass;
+               device->oclass[NVDEV_ENGINE_GR     ] =  gk104_gr_oclass;
+               device->oclass[NVDEV_ENGINE_DISP   ] =  gk104_disp_oclass;
+               device->oclass[NVDEV_ENGINE_CE0    ] = &gk104_ce0_oclass;
+               device->oclass[NVDEV_ENGINE_CE1    ] = &gk104_ce1_oclass;
+               device->oclass[NVDEV_ENGINE_CE2    ] = &gk104_ce2_oclass;
+               device->oclass[NVDEV_ENGINE_MSVLD  ] = &gk104_msvld_oclass;
+               device->oclass[NVDEV_ENGINE_MSPDEC ] = &gk104_mspdec_oclass;
+               device->oclass[NVDEV_ENGINE_MSPPP  ] = &gf100_msppp_oclass;
+               device->oclass[NVDEV_ENGINE_PM     ] = &gk104_pm_oclass;
+               break;
+       case 0xe6:
+               device->cname = "GK106";
+               device->oclass[NVDEV_SUBDEV_VBIOS  ] = &nvkm_bios_oclass;
+               device->oclass[NVDEV_SUBDEV_GPIO   ] =  gk104_gpio_oclass;
+               device->oclass[NVDEV_SUBDEV_I2C    ] =  gk104_i2c_oclass;
+               device->oclass[NVDEV_SUBDEV_FUSE   ] = &gf100_fuse_oclass;
+               device->oclass[NVDEV_SUBDEV_CLK    ] = &gk104_clk_oclass;
+               device->oclass[NVDEV_SUBDEV_THERM  ] = &gf110_therm_oclass;
+               device->oclass[NVDEV_SUBDEV_MXM    ] = &nv50_mxm_oclass;
+               device->oclass[NVDEV_SUBDEV_DEVINIT] =  gf100_devinit_oclass;
+               device->oclass[NVDEV_SUBDEV_MC     ] =  gf106_mc_oclass;
+               device->oclass[NVDEV_SUBDEV_BUS    ] =  gf100_bus_oclass;
+               device->oclass[NVDEV_SUBDEV_TIMER  ] = &nv04_timer_oclass;
+               device->oclass[NVDEV_SUBDEV_FB     ] =  gk104_fb_oclass;
+               device->oclass[NVDEV_SUBDEV_LTC    ] =  gk104_ltc_oclass;
+               device->oclass[NVDEV_SUBDEV_IBUS   ] = &gk104_ibus_oclass;
+               device->oclass[NVDEV_SUBDEV_INSTMEM] =  nv50_instmem_oclass;
+               device->oclass[NVDEV_SUBDEV_MMU    ] = &gf100_mmu_oclass;
+               device->oclass[NVDEV_SUBDEV_BAR    ] = &gf100_bar_oclass;
+               device->oclass[NVDEV_SUBDEV_PMU    ] =  gk104_pmu_oclass;
+               device->oclass[NVDEV_SUBDEV_VOLT   ] = &nv40_volt_oclass;
+               device->oclass[NVDEV_ENGINE_DMAOBJ ] =  gf110_dmaeng_oclass;
+               device->oclass[NVDEV_ENGINE_FIFO   ] =  gk104_fifo_oclass;
+               device->oclass[NVDEV_ENGINE_SW     ] =  gf100_sw_oclass;
+               device->oclass[NVDEV_ENGINE_GR     ] =  gk104_gr_oclass;
+               device->oclass[NVDEV_ENGINE_DISP   ] =  gk104_disp_oclass;
+               device->oclass[NVDEV_ENGINE_CE0    ] = &gk104_ce0_oclass;
+               device->oclass[NVDEV_ENGINE_CE1    ] = &gk104_ce1_oclass;
+               device->oclass[NVDEV_ENGINE_CE2    ] = &gk104_ce2_oclass;
+               device->oclass[NVDEV_ENGINE_MSVLD  ] = &gk104_msvld_oclass;
+               device->oclass[NVDEV_ENGINE_MSPDEC ] = &gk104_mspdec_oclass;
+               device->oclass[NVDEV_ENGINE_MSPPP  ] = &gf100_msppp_oclass;
+               device->oclass[NVDEV_ENGINE_PM     ] = &gk104_pm_oclass;
+               break;
+       case 0xea:
+               device->cname = "GK20A";
+               device->oclass[NVDEV_SUBDEV_CLK    ] = &gk20a_clk_oclass;
+               device->oclass[NVDEV_SUBDEV_MC     ] =  gk20a_mc_oclass;
+               device->oclass[NVDEV_SUBDEV_BUS    ] =  gf100_bus_oclass;
+               device->oclass[NVDEV_SUBDEV_FUSE   ] = &gf100_fuse_oclass;
+               device->oclass[NVDEV_SUBDEV_TIMER  ] = &gk20a_timer_oclass;
+               device->oclass[NVDEV_SUBDEV_FB     ] =  gk20a_fb_oclass;
+               device->oclass[NVDEV_SUBDEV_LTC    ] =  gk104_ltc_oclass;
+               device->oclass[NVDEV_SUBDEV_IBUS   ] = &gk20a_ibus_oclass;
+               device->oclass[NVDEV_SUBDEV_INSTMEM] = nv50_instmem_oclass;
+               device->oclass[NVDEV_SUBDEV_MMU    ] = &gf100_mmu_oclass;
+               device->oclass[NVDEV_SUBDEV_BAR    ] = &gk20a_bar_oclass;
+               device->oclass[NVDEV_ENGINE_DMAOBJ ] =  gf110_dmaeng_oclass;
+               device->oclass[NVDEV_ENGINE_FIFO   ] =  gk20a_fifo_oclass;
+               device->oclass[NVDEV_ENGINE_SW     ] =  gf100_sw_oclass;
+               device->oclass[NVDEV_ENGINE_GR     ] =  gk20a_gr_oclass;
+               device->oclass[NVDEV_ENGINE_CE2    ] = &gk104_ce2_oclass;
+               device->oclass[NVDEV_ENGINE_PM     ] = &gk104_pm_oclass;
+               device->oclass[NVDEV_SUBDEV_VOLT   ] = &gk20a_volt_oclass;
+               device->oclass[NVDEV_SUBDEV_PMU    ] =  gk20a_pmu_oclass;
+               break;
+       case 0xf0:
+               device->cname = "GK110";
+               device->oclass[NVDEV_SUBDEV_VBIOS  ] = &nvkm_bios_oclass;
+               device->oclass[NVDEV_SUBDEV_GPIO   ] =  gk104_gpio_oclass;
+               device->oclass[NVDEV_SUBDEV_I2C    ] =  gk104_i2c_oclass;
+               device->oclass[NVDEV_SUBDEV_FUSE   ] = &gf100_fuse_oclass;
+               device->oclass[NVDEV_SUBDEV_CLK    ] = &gk104_clk_oclass;
+               device->oclass[NVDEV_SUBDEV_THERM  ] = &gf110_therm_oclass;
+               device->oclass[NVDEV_SUBDEV_MXM    ] = &nv50_mxm_oclass;
+               device->oclass[NVDEV_SUBDEV_DEVINIT] =  gf100_devinit_oclass;
+               device->oclass[NVDEV_SUBDEV_MC     ] =  gf106_mc_oclass;
+               device->oclass[NVDEV_SUBDEV_BUS    ] =  gf100_bus_oclass;
+               device->oclass[NVDEV_SUBDEV_TIMER  ] = &nv04_timer_oclass;
+               device->oclass[NVDEV_SUBDEV_FB     ] =  gk104_fb_oclass;
+               device->oclass[NVDEV_SUBDEV_LTC    ] =  gk104_ltc_oclass;
+               device->oclass[NVDEV_SUBDEV_IBUS   ] = &gk104_ibus_oclass;
+               device->oclass[NVDEV_SUBDEV_INSTMEM] =  nv50_instmem_oclass;
+               device->oclass[NVDEV_SUBDEV_MMU    ] = &gf100_mmu_oclass;
+               device->oclass[NVDEV_SUBDEV_BAR    ] = &gf100_bar_oclass;
+               device->oclass[NVDEV_SUBDEV_PMU    ] =  gf110_pmu_oclass;
+               device->oclass[NVDEV_SUBDEV_VOLT   ] = &nv40_volt_oclass;
+               device->oclass[NVDEV_ENGINE_DMAOBJ ] =  gf110_dmaeng_oclass;
+               device->oclass[NVDEV_ENGINE_FIFO   ] =  gk104_fifo_oclass;
+               device->oclass[NVDEV_ENGINE_SW     ] =  gf100_sw_oclass;
+               device->oclass[NVDEV_ENGINE_GR     ] =  gk110_gr_oclass;
+               device->oclass[NVDEV_ENGINE_DISP   ] =  gk110_disp_oclass;
+               device->oclass[NVDEV_ENGINE_CE0    ] = &gk104_ce0_oclass;
+               device->oclass[NVDEV_ENGINE_CE1    ] = &gk104_ce1_oclass;
+               device->oclass[NVDEV_ENGINE_CE2    ] = &gk104_ce2_oclass;
+               device->oclass[NVDEV_ENGINE_MSVLD  ] = &gk104_msvld_oclass;
+               device->oclass[NVDEV_ENGINE_MSPDEC ] = &gk104_mspdec_oclass;
+               device->oclass[NVDEV_ENGINE_MSPPP  ] = &gf100_msppp_oclass;
+               device->oclass[NVDEV_ENGINE_PM     ] = &gk110_pm_oclass;
+               break;
+       case 0xf1:
+               device->cname = "GK110B";
+               device->oclass[NVDEV_SUBDEV_VBIOS  ] = &nvkm_bios_oclass;
+               device->oclass[NVDEV_SUBDEV_GPIO   ] =  gk104_gpio_oclass;
+               device->oclass[NVDEV_SUBDEV_I2C    ] =  gf110_i2c_oclass;
+               device->oclass[NVDEV_SUBDEV_FUSE   ] = &gf100_fuse_oclass;
+               device->oclass[NVDEV_SUBDEV_CLK    ] = &gk104_clk_oclass;
+               device->oclass[NVDEV_SUBDEV_THERM  ] = &gf110_therm_oclass;
+               device->oclass[NVDEV_SUBDEV_MXM    ] = &nv50_mxm_oclass;
+               device->oclass[NVDEV_SUBDEV_DEVINIT] =  gf100_devinit_oclass;
+               device->oclass[NVDEV_SUBDEV_MC     ] =  gf106_mc_oclass;
+               device->oclass[NVDEV_SUBDEV_BUS    ] =  gf100_bus_oclass;
+               device->oclass[NVDEV_SUBDEV_TIMER  ] = &nv04_timer_oclass;
+               device->oclass[NVDEV_SUBDEV_FB     ] =  gk104_fb_oclass;
+               device->oclass[NVDEV_SUBDEV_LTC    ] =  gk104_ltc_oclass;
+               device->oclass[NVDEV_SUBDEV_IBUS   ] = &gk104_ibus_oclass;
+               device->oclass[NVDEV_SUBDEV_INSTMEM] =  nv50_instmem_oclass;
+               device->oclass[NVDEV_SUBDEV_MMU    ] = &gf100_mmu_oclass;
+               device->oclass[NVDEV_SUBDEV_BAR    ] = &gf100_bar_oclass;
+               device->oclass[NVDEV_SUBDEV_PMU    ] =  gf110_pmu_oclass;
+               device->oclass[NVDEV_SUBDEV_VOLT   ] = &nv40_volt_oclass;
+               device->oclass[NVDEV_ENGINE_DMAOBJ ] =  gf110_dmaeng_oclass;
+               device->oclass[NVDEV_ENGINE_FIFO   ] =  gk104_fifo_oclass;
+               device->oclass[NVDEV_ENGINE_SW     ] =  gf100_sw_oclass;
+               device->oclass[NVDEV_ENGINE_GR     ] =  gk110b_gr_oclass;
+               device->oclass[NVDEV_ENGINE_DISP   ] =  gk110_disp_oclass;
+               device->oclass[NVDEV_ENGINE_CE0    ] = &gk104_ce0_oclass;
+               device->oclass[NVDEV_ENGINE_CE1    ] = &gk104_ce1_oclass;
+               device->oclass[NVDEV_ENGINE_CE2    ] = &gk104_ce2_oclass;
+               device->oclass[NVDEV_ENGINE_MSVLD  ] = &gk104_msvld_oclass;
+               device->oclass[NVDEV_ENGINE_MSPDEC ] = &gk104_mspdec_oclass;
+               device->oclass[NVDEV_ENGINE_MSPPP  ] = &gf100_msppp_oclass;
+               device->oclass[NVDEV_ENGINE_PM     ] = &gk110_pm_oclass;
+               break;
+       case 0x106:
+               device->cname = "GK208B";
+               device->oclass[NVDEV_SUBDEV_VBIOS  ] = &nvkm_bios_oclass;
+               device->oclass[NVDEV_SUBDEV_GPIO   ] =  gk104_gpio_oclass;
+               device->oclass[NVDEV_SUBDEV_I2C    ] =  gk104_i2c_oclass;
+               device->oclass[NVDEV_SUBDEV_FUSE   ] = &gf100_fuse_oclass;
+               device->oclass[NVDEV_SUBDEV_CLK    ] = &gk104_clk_oclass;
+               device->oclass[NVDEV_SUBDEV_THERM  ] = &gf110_therm_oclass;
+               device->oclass[NVDEV_SUBDEV_MXM    ] = &nv50_mxm_oclass;
+               device->oclass[NVDEV_SUBDEV_DEVINIT] =  gf100_devinit_oclass;
+               device->oclass[NVDEV_SUBDEV_MC     ] =  gk20a_mc_oclass;
+               device->oclass[NVDEV_SUBDEV_BUS    ] =  gf100_bus_oclass;
+               device->oclass[NVDEV_SUBDEV_TIMER  ] = &nv04_timer_oclass;
+               device->oclass[NVDEV_SUBDEV_FB     ] =  gk104_fb_oclass;
+               device->oclass[NVDEV_SUBDEV_LTC    ] =  gk104_ltc_oclass;
+               device->oclass[NVDEV_SUBDEV_IBUS   ] = &gk104_ibus_oclass;
+               device->oclass[NVDEV_SUBDEV_INSTMEM] =  nv50_instmem_oclass;
+               device->oclass[NVDEV_SUBDEV_MMU    ] = &gf100_mmu_oclass;
+               device->oclass[NVDEV_SUBDEV_BAR    ] = &gf100_bar_oclass;
+               device->oclass[NVDEV_SUBDEV_PMU    ] =  gk208_pmu_oclass;
+               device->oclass[NVDEV_SUBDEV_VOLT   ] = &nv40_volt_oclass;
+               device->oclass[NVDEV_ENGINE_DMAOBJ ] =  gf110_dmaeng_oclass;
+               device->oclass[NVDEV_ENGINE_FIFO   ] =  gk208_fifo_oclass;
+               device->oclass[NVDEV_ENGINE_SW     ] =  gf100_sw_oclass;
+               device->oclass[NVDEV_ENGINE_GR     ] =  gk208_gr_oclass;
+               device->oclass[NVDEV_ENGINE_DISP   ] =  gk110_disp_oclass;
+               device->oclass[NVDEV_ENGINE_CE0    ] = &gk104_ce0_oclass;
+               device->oclass[NVDEV_ENGINE_CE1    ] = &gk104_ce1_oclass;
+               device->oclass[NVDEV_ENGINE_CE2    ] = &gk104_ce2_oclass;
+               device->oclass[NVDEV_ENGINE_MSVLD  ] = &gk104_msvld_oclass;
+               device->oclass[NVDEV_ENGINE_MSPDEC ] = &gk104_mspdec_oclass;
+               device->oclass[NVDEV_ENGINE_MSPPP  ] = &gf100_msppp_oclass;
+               break;
+       case 0x108:
+               device->cname = "GK208";
+               device->oclass[NVDEV_SUBDEV_VBIOS  ] = &nvkm_bios_oclass;
+               device->oclass[NVDEV_SUBDEV_GPIO   ] =  gk104_gpio_oclass;
+               device->oclass[NVDEV_SUBDEV_I2C    ] =  gk104_i2c_oclass;
+               device->oclass[NVDEV_SUBDEV_FUSE   ] = &gf100_fuse_oclass;
+               device->oclass[NVDEV_SUBDEV_CLK    ] = &gk104_clk_oclass;
+               device->oclass[NVDEV_SUBDEV_THERM  ] = &gf110_therm_oclass;
+               device->oclass[NVDEV_SUBDEV_MXM    ] = &nv50_mxm_oclass;
+               device->oclass[NVDEV_SUBDEV_DEVINIT] =  gf100_devinit_oclass;
+               device->oclass[NVDEV_SUBDEV_MC     ] =  gk20a_mc_oclass;
+               device->oclass[NVDEV_SUBDEV_BUS    ] =  gf100_bus_oclass;
+               device->oclass[NVDEV_SUBDEV_TIMER  ] = &nv04_timer_oclass;
+               device->oclass[NVDEV_SUBDEV_FB     ] =  gk104_fb_oclass;
+               device->oclass[NVDEV_SUBDEV_LTC    ] =  gk104_ltc_oclass;
+               device->oclass[NVDEV_SUBDEV_IBUS   ] = &gk104_ibus_oclass;
+               device->oclass[NVDEV_SUBDEV_INSTMEM] =  nv50_instmem_oclass;
+               device->oclass[NVDEV_SUBDEV_MMU    ] = &gf100_mmu_oclass;
+               device->oclass[NVDEV_SUBDEV_BAR    ] = &gf100_bar_oclass;
+               device->oclass[NVDEV_SUBDEV_PMU    ] =  gk208_pmu_oclass;
+               device->oclass[NVDEV_SUBDEV_VOLT   ] = &nv40_volt_oclass;
+               device->oclass[NVDEV_ENGINE_DMAOBJ ] =  gf110_dmaeng_oclass;
+               device->oclass[NVDEV_ENGINE_FIFO   ] =  gk208_fifo_oclass;
+               device->oclass[NVDEV_ENGINE_SW     ] =  gf100_sw_oclass;
+               device->oclass[NVDEV_ENGINE_GR     ] =  gk208_gr_oclass;
+               device->oclass[NVDEV_ENGINE_DISP   ] =  gk110_disp_oclass;
+               device->oclass[NVDEV_ENGINE_CE0    ] = &gk104_ce0_oclass;
+               device->oclass[NVDEV_ENGINE_CE1    ] = &gk104_ce1_oclass;
+               device->oclass[NVDEV_ENGINE_CE2    ] = &gk104_ce2_oclass;
+               device->oclass[NVDEV_ENGINE_MSVLD  ] = &gk104_msvld_oclass;
+               device->oclass[NVDEV_ENGINE_MSPDEC ] = &gk104_mspdec_oclass;
+               device->oclass[NVDEV_ENGINE_MSPPP  ] = &gf100_msppp_oclass;
+               break;
+       default:
+               nv_fatal(device, "unknown Kepler chipset\n");
+               return -EINVAL;
+       }
+
+       return 0;
+}
index ffa2da42f39717464af8d7f0c57676612af44213..539561ed3281a1602348eb375b2c698ddb8f7afd 100644 (file)
@@ -21,6 +21,7 @@
  *
  * Authors: Ben Skeggs
  */
+#include "priv.h"
 
 #include <subdev/bios.h>
 #include <subdev/bus.h>
@@ -42,7 +43,6 @@
 #include <subdev/pmu.h>
 #include <subdev/volt.h>
 
-#include <engine/device.h>
 #include <engine/dmaobj.h>
 #include <engine/fifo.h>
 #include <engine/sw.h>
 #include <engine/pm.h>
 
 int
-gm100_identify(struct nouveau_device *device)
+gm100_identify(struct nvkm_device *device)
 {
        switch (device->chipset) {
        case 0x117:
                device->cname = "GM107";
-               device->oclass[NVDEV_SUBDEV_VBIOS  ] = &nouveau_bios_oclass;
+               device->oclass[NVDEV_SUBDEV_VBIOS  ] = &nvkm_bios_oclass;
                device->oclass[NVDEV_SUBDEV_GPIO   ] =  gk104_gpio_oclass;
                device->oclass[NVDEV_SUBDEV_I2C    ] =  gf110_i2c_oclass;
                device->oclass[NVDEV_SUBDEV_FUSE   ] = &gm107_fuse_oclass;
@@ -101,7 +101,7 @@ gm100_identify(struct nouveau_device *device)
                break;
        case 0x124:
                device->cname = "GM204";
-               device->oclass[NVDEV_SUBDEV_VBIOS  ] = &nouveau_bios_oclass;
+               device->oclass[NVDEV_SUBDEV_VBIOS  ] = &nvkm_bios_oclass;
                device->oclass[NVDEV_SUBDEV_GPIO   ] =  gk104_gpio_oclass;
                device->oclass[NVDEV_SUBDEV_I2C    ] =  gm204_i2c_oclass;
                device->oclass[NVDEV_SUBDEV_FUSE   ] = &gm107_fuse_oclass;
index 1d409af560da5b5a6c497d7ac5a36ffb7c9326e0..5a2ae043b478c47b55b65accdcec0fb9684b0842 100644 (file)
@@ -21,6 +21,7 @@
  *
  * Authors: Ben Skeggs
  */
+#include "priv.h"
 
 #include <subdev/bios.h>
 #include <subdev/bus.h>
@@ -33,7 +34,6 @@
 #include <subdev/instmem.h>
 #include <subdev/mmu.h>
 
-#include <engine/device.h>
 #include <engine/dmaobj.h>
 #include <engine/fifo.h>
 #include <engine/sw.h>
 #include <engine/disp.h>
 
 int
-nv04_identify(struct nouveau_device *device)
+nv04_identify(struct nvkm_device *device)
 {
        switch (device->chipset) {
        case 0x04:
                device->cname = "NV04";
-               device->oclass[NVDEV_SUBDEV_VBIOS  ] = &nouveau_bios_oclass;
+               device->oclass[NVDEV_SUBDEV_VBIOS  ] = &nvkm_bios_oclass;
                device->oclass[NVDEV_SUBDEV_I2C    ] =  nv04_i2c_oclass;
                device->oclass[NVDEV_SUBDEV_CLK    ] = &nv04_clk_oclass;
                device->oclass[NVDEV_SUBDEV_DEVINIT] =  nv04_devinit_oclass;
@@ -64,7 +64,7 @@ nv04_identify(struct nouveau_device *device)
                break;
        case 0x05:
                device->cname = "NV05";
-               device->oclass[NVDEV_SUBDEV_VBIOS  ] = &nouveau_bios_oclass;
+               device->oclass[NVDEV_SUBDEV_VBIOS  ] = &nvkm_bios_oclass;
                device->oclass[NVDEV_SUBDEV_I2C    ] =  nv04_i2c_oclass;
                device->oclass[NVDEV_SUBDEV_CLK    ] = &nv04_clk_oclass;
                device->oclass[NVDEV_SUBDEV_DEVINIT] =  nv05_devinit_oclass;
index 66d8c338ae985e3110d91daa79aa8bafe1b32721..94a1ca45e94a797d0d0a296818927b3fb4412c02 100644 (file)
@@ -21,6 +21,7 @@
  *
  * Authors: Ben Skeggs
  */
+#include "priv.h"
 
 #include <subdev/bios.h>
 #include <subdev/bus.h>
@@ -34,7 +35,6 @@
 #include <subdev/instmem.h>
 #include <subdev/mmu.h>
 
-#include <engine/device.h>
 #include <engine/dmaobj.h>
 #include <engine/fifo.h>
 #include <engine/sw.h>
 #include <engine/disp.h>
 
 int
-nv10_identify(struct nouveau_device *device)
+nv10_identify(struct nvkm_device *device)
 {
        switch (device->chipset) {
        case 0x10:
                device->cname = "NV10";
-               device->oclass[NVDEV_SUBDEV_VBIOS  ] = &nouveau_bios_oclass;
+               device->oclass[NVDEV_SUBDEV_VBIOS  ] = &nvkm_bios_oclass;
                device->oclass[NVDEV_SUBDEV_GPIO   ] =  nv10_gpio_oclass;
                device->oclass[NVDEV_SUBDEV_I2C    ] =  nv04_i2c_oclass;
                device->oclass[NVDEV_SUBDEV_CLK    ] = &nv04_clk_oclass;
@@ -64,7 +64,7 @@ nv10_identify(struct nouveau_device *device)
                break;
        case 0x15:
                device->cname = "NV15";
-               device->oclass[NVDEV_SUBDEV_VBIOS  ] = &nouveau_bios_oclass;
+               device->oclass[NVDEV_SUBDEV_VBIOS  ] = &nvkm_bios_oclass;
                device->oclass[NVDEV_SUBDEV_GPIO   ] =  nv10_gpio_oclass;
                device->oclass[NVDEV_SUBDEV_I2C    ] =  nv04_i2c_oclass;
                device->oclass[NVDEV_SUBDEV_CLK    ] = &nv04_clk_oclass;
@@ -83,7 +83,7 @@ nv10_identify(struct nouveau_device *device)
                break;
        case 0x16:
                device->cname = "NV16";
-               device->oclass[NVDEV_SUBDEV_VBIOS  ] = &nouveau_bios_oclass;
+               device->oclass[NVDEV_SUBDEV_VBIOS  ] = &nvkm_bios_oclass;
                device->oclass[NVDEV_SUBDEV_GPIO   ] =  nv10_gpio_oclass;
                device->oclass[NVDEV_SUBDEV_I2C    ] =  nv04_i2c_oclass;
                device->oclass[NVDEV_SUBDEV_CLK    ] = &nv04_clk_oclass;
@@ -102,7 +102,7 @@ nv10_identify(struct nouveau_device *device)
                break;
        case 0x1a:
                device->cname = "nForce";
-               device->oclass[NVDEV_SUBDEV_VBIOS  ] = &nouveau_bios_oclass;
+               device->oclass[NVDEV_SUBDEV_VBIOS  ] = &nvkm_bios_oclass;
                device->oclass[NVDEV_SUBDEV_GPIO   ] =  nv10_gpio_oclass;
                device->oclass[NVDEV_SUBDEV_I2C    ] =  nv04_i2c_oclass;
                device->oclass[NVDEV_SUBDEV_CLK    ] = &nv04_clk_oclass;
@@ -121,7 +121,7 @@ nv10_identify(struct nouveau_device *device)
                break;
        case 0x11:
                device->cname = "NV11";
-               device->oclass[NVDEV_SUBDEV_VBIOS  ] = &nouveau_bios_oclass;
+               device->oclass[NVDEV_SUBDEV_VBIOS  ] = &nvkm_bios_oclass;
                device->oclass[NVDEV_SUBDEV_GPIO   ] =  nv10_gpio_oclass;
                device->oclass[NVDEV_SUBDEV_I2C    ] =  nv04_i2c_oclass;
                device->oclass[NVDEV_SUBDEV_CLK    ] = &nv04_clk_oclass;
@@ -140,7 +140,7 @@ nv10_identify(struct nouveau_device *device)
                break;
        case 0x17:
                device->cname = "NV17";
-               device->oclass[NVDEV_SUBDEV_VBIOS  ] = &nouveau_bios_oclass;
+               device->oclass[NVDEV_SUBDEV_VBIOS  ] = &nvkm_bios_oclass;
                device->oclass[NVDEV_SUBDEV_GPIO   ] =  nv10_gpio_oclass;
                device->oclass[NVDEV_SUBDEV_I2C    ] =  nv04_i2c_oclass;
                device->oclass[NVDEV_SUBDEV_CLK    ] = &nv04_clk_oclass;
@@ -159,7 +159,7 @@ nv10_identify(struct nouveau_device *device)
                break;
        case 0x1f:
                device->cname = "nForce2";
-               device->oclass[NVDEV_SUBDEV_VBIOS  ] = &nouveau_bios_oclass;
+               device->oclass[NVDEV_SUBDEV_VBIOS  ] = &nvkm_bios_oclass;
                device->oclass[NVDEV_SUBDEV_GPIO   ] =  nv10_gpio_oclass;
                device->oclass[NVDEV_SUBDEV_I2C    ] =  nv04_i2c_oclass;
                device->oclass[NVDEV_SUBDEV_CLK    ] = &nv04_clk_oclass;
@@ -178,7 +178,7 @@ nv10_identify(struct nouveau_device *device)
                break;
        case 0x18:
                device->cname = "NV18";
-               device->oclass[NVDEV_SUBDEV_VBIOS  ] = &nouveau_bios_oclass;
+               device->oclass[NVDEV_SUBDEV_VBIOS  ] = &nvkm_bios_oclass;
                device->oclass[NVDEV_SUBDEV_GPIO   ] =  nv10_gpio_oclass;
                device->oclass[NVDEV_SUBDEV_I2C    ] =  nv04_i2c_oclass;
                device->oclass[NVDEV_SUBDEV_CLK    ] = &nv04_clk_oclass;
index 59cefdd46897747ffcf5fce7f0c900455b5d84da..d5ec8937df68d3bafcb0debb3c8ebdf3be6b70f2 100644 (file)
@@ -21,6 +21,7 @@
  *
  * Authors: Ben Skeggs
  */
+#include "priv.h"
 
 #include <subdev/bios.h>
 #include <subdev/bus.h>
@@ -35,7 +36,6 @@
 #include <subdev/instmem.h>
 #include <subdev/mmu.h>
 
-#include <engine/device.h>
 #include <engine/dmaobj.h>
 #include <engine/fifo.h>
 #include <engine/sw.h>
 #include <engine/disp.h>
 
 int
-nv20_identify(struct nouveau_device *device)
+nv20_identify(struct nvkm_device *device)
 {
        switch (device->chipset) {
        case 0x20:
                device->cname = "NV20";
-               device->oclass[NVDEV_SUBDEV_VBIOS  ] = &nouveau_bios_oclass;
+               device->oclass[NVDEV_SUBDEV_VBIOS  ] = &nvkm_bios_oclass;
                device->oclass[NVDEV_SUBDEV_GPIO   ] =  nv10_gpio_oclass;
                device->oclass[NVDEV_SUBDEV_I2C    ] =  nv04_i2c_oclass;
                device->oclass[NVDEV_SUBDEV_CLK    ] = &nv04_clk_oclass;
@@ -67,7 +67,7 @@ nv20_identify(struct nouveau_device *device)
                break;
        case 0x25:
                device->cname = "NV25";
-               device->oclass[NVDEV_SUBDEV_VBIOS  ] = &nouveau_bios_oclass;
+               device->oclass[NVDEV_SUBDEV_VBIOS  ] = &nvkm_bios_oclass;
                device->oclass[NVDEV_SUBDEV_GPIO   ] =  nv10_gpio_oclass;
                device->oclass[NVDEV_SUBDEV_I2C    ] =  nv04_i2c_oclass;
                device->oclass[NVDEV_SUBDEV_CLK    ] = &nv04_clk_oclass;
@@ -86,7 +86,7 @@ nv20_identify(struct nouveau_device *device)
                break;
        case 0x28:
                device->cname = "NV28";
-               device->oclass[NVDEV_SUBDEV_VBIOS  ] = &nouveau_bios_oclass;
+               device->oclass[NVDEV_SUBDEV_VBIOS  ] = &nvkm_bios_oclass;
                device->oclass[NVDEV_SUBDEV_GPIO   ] =  nv10_gpio_oclass;
                device->oclass[NVDEV_SUBDEV_I2C    ] =  nv04_i2c_oclass;
                device->oclass[NVDEV_SUBDEV_CLK    ] = &nv04_clk_oclass;
@@ -105,7 +105,7 @@ nv20_identify(struct nouveau_device *device)
                break;
        case 0x2a:
                device->cname = "NV2A";
-               device->oclass[NVDEV_SUBDEV_VBIOS  ] = &nouveau_bios_oclass;
+               device->oclass[NVDEV_SUBDEV_VBIOS  ] = &nvkm_bios_oclass;
                device->oclass[NVDEV_SUBDEV_GPIO   ] =  nv10_gpio_oclass;
                device->oclass[NVDEV_SUBDEV_I2C    ] =  nv04_i2c_oclass;
                device->oclass[NVDEV_SUBDEV_CLK    ] = &nv04_clk_oclass;
index dfb610f837b02825e151112ee32a9515c4e53611..dda09621e898161277a1b292092776876f1991b0 100644 (file)
@@ -21,6 +21,7 @@
  *
  * Authors: Ben Skeggs
  */
+#include "priv.h"
 
 #include <subdev/bios.h>
 #include <subdev/bus.h>
@@ -34,7 +35,6 @@
 #include <subdev/instmem.h>
 #include <subdev/mmu.h>
 
-#include <engine/device.h>
 #include <engine/dmaobj.h>
 #include <engine/fifo.h>
 #include <engine/sw.h>
 #include <engine/disp.h>
 
 int
-nv30_identify(struct nouveau_device *device)
+nv30_identify(struct nvkm_device *device)
 {
        switch (device->chipset) {
        case 0x30:
                device->cname = "NV30";
-               device->oclass[NVDEV_SUBDEV_VBIOS  ] = &nouveau_bios_oclass;
+               device->oclass[NVDEV_SUBDEV_VBIOS  ] = &nvkm_bios_oclass;
                device->oclass[NVDEV_SUBDEV_GPIO   ] =  nv10_gpio_oclass;
                device->oclass[NVDEV_SUBDEV_I2C    ] =  nv04_i2c_oclass;
                device->oclass[NVDEV_SUBDEV_CLK    ] = &nv04_clk_oclass;
@@ -67,7 +67,7 @@ nv30_identify(struct nouveau_device *device)
                break;
        case 0x35:
                device->cname = "NV35";
-               device->oclass[NVDEV_SUBDEV_VBIOS  ] = &nouveau_bios_oclass;
+               device->oclass[NVDEV_SUBDEV_VBIOS  ] = &nvkm_bios_oclass;
                device->oclass[NVDEV_SUBDEV_GPIO   ] =  nv10_gpio_oclass;
                device->oclass[NVDEV_SUBDEV_I2C    ] =  nv04_i2c_oclass;
                device->oclass[NVDEV_SUBDEV_CLK    ] = &nv04_clk_oclass;
@@ -86,7 +86,7 @@ nv30_identify(struct nouveau_device *device)
                break;
        case 0x31:
                device->cname = "NV31";
-               device->oclass[NVDEV_SUBDEV_VBIOS  ] = &nouveau_bios_oclass;
+               device->oclass[NVDEV_SUBDEV_VBIOS  ] = &nvkm_bios_oclass;
                device->oclass[NVDEV_SUBDEV_GPIO   ] =  nv10_gpio_oclass;
                device->oclass[NVDEV_SUBDEV_I2C    ] =  nv04_i2c_oclass;
                device->oclass[NVDEV_SUBDEV_CLK    ] = &nv04_clk_oclass;
@@ -106,7 +106,7 @@ nv30_identify(struct nouveau_device *device)
                break;
        case 0x36:
                device->cname = "NV36";
-               device->oclass[NVDEV_SUBDEV_VBIOS  ] = &nouveau_bios_oclass;
+               device->oclass[NVDEV_SUBDEV_VBIOS  ] = &nvkm_bios_oclass;
                device->oclass[NVDEV_SUBDEV_GPIO   ] =  nv10_gpio_oclass;
                device->oclass[NVDEV_SUBDEV_I2C    ] =  nv04_i2c_oclass;
                device->oclass[NVDEV_SUBDEV_CLK    ] = &nv04_clk_oclass;
@@ -126,7 +126,7 @@ nv30_identify(struct nouveau_device *device)
                break;
        case 0x34:
                device->cname = "NV34";
-               device->oclass[NVDEV_SUBDEV_VBIOS  ] = &nouveau_bios_oclass;
+               device->oclass[NVDEV_SUBDEV_VBIOS  ] = &nvkm_bios_oclass;
                device->oclass[NVDEV_SUBDEV_GPIO   ] =  nv10_gpio_oclass;
                device->oclass[NVDEV_SUBDEV_I2C    ] =  nv04_i2c_oclass;
                device->oclass[NVDEV_SUBDEV_CLK    ] = &nv04_clk_oclass;
index 7bdb7d6729b7bacdce2d63cc7f9fa243118dc512..c6301361d14f3b34d243ca5292eef077102cc921 100644 (file)
@@ -21,6 +21,7 @@
  *
  * Authors: Ben Skeggs
  */
+#include "priv.h"
 
 #include <subdev/bios.h>
 #include <subdev/bus.h>
@@ -37,7 +38,6 @@
 #include <subdev/mmu.h>
 #include <subdev/volt.h>
 
-#include <engine/device.h>
 #include <engine/dmaobj.h>
 #include <engine/fifo.h>
 #include <engine/sw.h>
 #include <engine/pm.h>
 
 int
-nv40_identify(struct nouveau_device *device)
+nv40_identify(struct nvkm_device *device)
 {
        switch (device->chipset) {
        case 0x40:
                device->cname = "NV40";
-               device->oclass[NVDEV_SUBDEV_VBIOS  ] = &nouveau_bios_oclass;
+               device->oclass[NVDEV_SUBDEV_VBIOS  ] = &nvkm_bios_oclass;
                device->oclass[NVDEV_SUBDEV_GPIO   ] =  nv10_gpio_oclass;
                device->oclass[NVDEV_SUBDEV_I2C    ] =  nv04_i2c_oclass;
                device->oclass[NVDEV_SUBDEV_CLK    ] = &nv40_clk_oclass;
@@ -75,7 +75,7 @@ nv40_identify(struct nouveau_device *device)
                break;
        case 0x41:
                device->cname = "NV41";
-               device->oclass[NVDEV_SUBDEV_VBIOS  ] = &nouveau_bios_oclass;
+               device->oclass[NVDEV_SUBDEV_VBIOS  ] = &nvkm_bios_oclass;
                device->oclass[NVDEV_SUBDEV_GPIO   ] =  nv10_gpio_oclass;
                device->oclass[NVDEV_SUBDEV_I2C    ] =  nv04_i2c_oclass;
                device->oclass[NVDEV_SUBDEV_CLK    ] = &nv40_clk_oclass;
@@ -98,7 +98,7 @@ nv40_identify(struct nouveau_device *device)
                break;
        case 0x42:
                device->cname = "NV42";
-               device->oclass[NVDEV_SUBDEV_VBIOS  ] = &nouveau_bios_oclass;
+               device->oclass[NVDEV_SUBDEV_VBIOS  ] = &nvkm_bios_oclass;
                device->oclass[NVDEV_SUBDEV_GPIO   ] =  nv10_gpio_oclass;
                device->oclass[NVDEV_SUBDEV_I2C    ] =  nv04_i2c_oclass;
                device->oclass[NVDEV_SUBDEV_CLK    ] = &nv40_clk_oclass;
@@ -121,7 +121,7 @@ nv40_identify(struct nouveau_device *device)
                break;
        case 0x43:
                device->cname = "NV43";
-               device->oclass[NVDEV_SUBDEV_VBIOS  ] = &nouveau_bios_oclass;
+               device->oclass[NVDEV_SUBDEV_VBIOS  ] = &nvkm_bios_oclass;
                device->oclass[NVDEV_SUBDEV_GPIO   ] =  nv10_gpio_oclass;
                device->oclass[NVDEV_SUBDEV_I2C    ] =  nv04_i2c_oclass;
                device->oclass[NVDEV_SUBDEV_CLK    ] = &nv40_clk_oclass;
@@ -144,7 +144,7 @@ nv40_identify(struct nouveau_device *device)
                break;
        case 0x45:
                device->cname = "NV45";
-               device->oclass[NVDEV_SUBDEV_VBIOS  ] = &nouveau_bios_oclass;
+               device->oclass[NVDEV_SUBDEV_VBIOS  ] = &nvkm_bios_oclass;
                device->oclass[NVDEV_SUBDEV_GPIO   ] =  nv10_gpio_oclass;
                device->oclass[NVDEV_SUBDEV_I2C    ] =  nv04_i2c_oclass;
                device->oclass[NVDEV_SUBDEV_CLK    ] = &nv40_clk_oclass;
@@ -167,7 +167,7 @@ nv40_identify(struct nouveau_device *device)
                break;
        case 0x47:
                device->cname = "G70";
-               device->oclass[NVDEV_SUBDEV_VBIOS  ] = &nouveau_bios_oclass;
+               device->oclass[NVDEV_SUBDEV_VBIOS  ] = &nvkm_bios_oclass;
                device->oclass[NVDEV_SUBDEV_GPIO   ] =  nv10_gpio_oclass;
                device->oclass[NVDEV_SUBDEV_I2C    ] =  nv04_i2c_oclass;
                device->oclass[NVDEV_SUBDEV_CLK    ] = &nv40_clk_oclass;
@@ -190,7 +190,7 @@ nv40_identify(struct nouveau_device *device)
                break;
        case 0x49:
                device->cname = "G71";
-               device->oclass[NVDEV_SUBDEV_VBIOS  ] = &nouveau_bios_oclass;
+               device->oclass[NVDEV_SUBDEV_VBIOS  ] = &nvkm_bios_oclass;
                device->oclass[NVDEV_SUBDEV_GPIO   ] =  nv10_gpio_oclass;
                device->oclass[NVDEV_SUBDEV_I2C    ] =  nv04_i2c_oclass;
                device->oclass[NVDEV_SUBDEV_CLK    ] = &nv40_clk_oclass;
@@ -213,7 +213,7 @@ nv40_identify(struct nouveau_device *device)
                break;
        case 0x4b:
                device->cname = "G73";
-               device->oclass[NVDEV_SUBDEV_VBIOS  ] = &nouveau_bios_oclass;
+               device->oclass[NVDEV_SUBDEV_VBIOS  ] = &nvkm_bios_oclass;
                device->oclass[NVDEV_SUBDEV_GPIO   ] =  nv10_gpio_oclass;
                device->oclass[NVDEV_SUBDEV_I2C    ] =  nv04_i2c_oclass;
                device->oclass[NVDEV_SUBDEV_CLK    ] = &nv40_clk_oclass;
@@ -236,7 +236,7 @@ nv40_identify(struct nouveau_device *device)
                break;
        case 0x44:
                device->cname = "NV44";
-               device->oclass[NVDEV_SUBDEV_VBIOS  ] = &nouveau_bios_oclass;
+               device->oclass[NVDEV_SUBDEV_VBIOS  ] = &nvkm_bios_oclass;
                device->oclass[NVDEV_SUBDEV_GPIO   ] =  nv10_gpio_oclass;
                device->oclass[NVDEV_SUBDEV_I2C    ] =  nv04_i2c_oclass;
                device->oclass[NVDEV_SUBDEV_CLK    ] = &nv40_clk_oclass;
@@ -259,7 +259,7 @@ nv40_identify(struct nouveau_device *device)
                break;
        case 0x46:
                device->cname = "G72";
-               device->oclass[NVDEV_SUBDEV_VBIOS  ] = &nouveau_bios_oclass;
+               device->oclass[NVDEV_SUBDEV_VBIOS  ] = &nvkm_bios_oclass;
                device->oclass[NVDEV_SUBDEV_GPIO   ] =  nv10_gpio_oclass;
                device->oclass[NVDEV_SUBDEV_I2C    ] =  nv04_i2c_oclass;
                device->oclass[NVDEV_SUBDEV_CLK    ] = &nv40_clk_oclass;
@@ -282,7 +282,7 @@ nv40_identify(struct nouveau_device *device)
                break;
        case 0x4a:
                device->cname = "NV44A";
-               device->oclass[NVDEV_SUBDEV_VBIOS  ] = &nouveau_bios_oclass;
+               device->oclass[NVDEV_SUBDEV_VBIOS  ] = &nvkm_bios_oclass;
                device->oclass[NVDEV_SUBDEV_GPIO   ] =  nv10_gpio_oclass;
                device->oclass[NVDEV_SUBDEV_I2C    ] =  nv04_i2c_oclass;
                device->oclass[NVDEV_SUBDEV_CLK    ] = &nv40_clk_oclass;
@@ -305,7 +305,7 @@ nv40_identify(struct nouveau_device *device)
                break;
        case 0x4c:
                device->cname = "C61";
-               device->oclass[NVDEV_SUBDEV_VBIOS  ] = &nouveau_bios_oclass;
+               device->oclass[NVDEV_SUBDEV_VBIOS  ] = &nvkm_bios_oclass;
                device->oclass[NVDEV_SUBDEV_GPIO   ] =  nv10_gpio_oclass;
                device->oclass[NVDEV_SUBDEV_I2C    ] =  nv04_i2c_oclass;
                device->oclass[NVDEV_SUBDEV_CLK    ] = &nv40_clk_oclass;
@@ -328,7 +328,7 @@ nv40_identify(struct nouveau_device *device)
                break;
        case 0x4e:
                device->cname = "C51";
-               device->oclass[NVDEV_SUBDEV_VBIOS  ] = &nouveau_bios_oclass;
+               device->oclass[NVDEV_SUBDEV_VBIOS  ] = &nvkm_bios_oclass;
                device->oclass[NVDEV_SUBDEV_GPIO   ] =  nv10_gpio_oclass;
                device->oclass[NVDEV_SUBDEV_I2C    ] =  nv4e_i2c_oclass;
                device->oclass[NVDEV_SUBDEV_CLK    ] = &nv40_clk_oclass;
@@ -351,7 +351,7 @@ nv40_identify(struct nouveau_device *device)
                break;
        case 0x63:
                device->cname = "C73";
-               device->oclass[NVDEV_SUBDEV_VBIOS  ] = &nouveau_bios_oclass;
+               device->oclass[NVDEV_SUBDEV_VBIOS  ] = &nvkm_bios_oclass;
                device->oclass[NVDEV_SUBDEV_GPIO   ] =  nv10_gpio_oclass;
                device->oclass[NVDEV_SUBDEV_I2C    ] =  nv04_i2c_oclass;
                device->oclass[NVDEV_SUBDEV_CLK    ] = &nv40_clk_oclass;
@@ -374,7 +374,7 @@ nv40_identify(struct nouveau_device *device)
                break;
        case 0x67:
                device->cname = "C67";
-               device->oclass[NVDEV_SUBDEV_VBIOS  ] = &nouveau_bios_oclass;
+               device->oclass[NVDEV_SUBDEV_VBIOS  ] = &nvkm_bios_oclass;
                device->oclass[NVDEV_SUBDEV_GPIO   ] =  nv10_gpio_oclass;
                device->oclass[NVDEV_SUBDEV_I2C    ] =  nv04_i2c_oclass;
                device->oclass[NVDEV_SUBDEV_CLK    ] = &nv40_clk_oclass;
@@ -397,7 +397,7 @@ nv40_identify(struct nouveau_device *device)
                break;
        case 0x68:
                device->cname = "C68";
-               device->oclass[NVDEV_SUBDEV_VBIOS  ] = &nouveau_bios_oclass;
+               device->oclass[NVDEV_SUBDEV_VBIOS  ] = &nvkm_bios_oclass;
                device->oclass[NVDEV_SUBDEV_GPIO   ] =  nv10_gpio_oclass;
                device->oclass[NVDEV_SUBDEV_I2C    ] =  nv04_i2c_oclass;
                device->oclass[NVDEV_SUBDEV_CLK    ] = &nv40_clk_oclass;
index 36944babbb536f426f2ce5d00b9db1fd3a259379..249b84454612575223dd63c2988aab9a2c366b46 100644 (file)
@@ -21,6 +21,7 @@
  *
  * Authors: Ben Skeggs
  */
+#include "priv.h"
 
 #include <subdev/bios.h>
 #include <subdev/bus.h>
@@ -40,7 +41,6 @@
 #include <subdev/pmu.h>
 #include <subdev/volt.h>
 
-#include <engine/device.h>
 #include <engine/dmaobj.h>
 #include <engine/fifo.h>
 #include <engine/sw.h>
 #include <engine/pm.h>
 
 int
-nv50_identify(struct nouveau_device *device)
+nv50_identify(struct nvkm_device *device)
 {
        switch (device->chipset) {
        case 0x50:
                device->cname = "G80";
-               device->oclass[NVDEV_SUBDEV_VBIOS  ] = &nouveau_bios_oclass;
+               device->oclass[NVDEV_SUBDEV_VBIOS  ] = &nvkm_bios_oclass;
                device->oclass[NVDEV_SUBDEV_GPIO   ] =  nv50_gpio_oclass;
                device->oclass[NVDEV_SUBDEV_I2C    ] =  nv50_i2c_oclass;
                device->oclass[NVDEV_SUBDEV_FUSE   ] =  &nv50_fuse_oclass;
@@ -89,7 +89,7 @@ nv50_identify(struct nouveau_device *device)
                break;
        case 0x84:
                device->cname = "G84";
-               device->oclass[NVDEV_SUBDEV_VBIOS  ] = &nouveau_bios_oclass;
+               device->oclass[NVDEV_SUBDEV_VBIOS  ] = &nvkm_bios_oclass;
                device->oclass[NVDEV_SUBDEV_GPIO   ] =  nv50_gpio_oclass;
                device->oclass[NVDEV_SUBDEV_I2C    ] =  nv50_i2c_oclass;
                device->oclass[NVDEV_SUBDEV_FUSE   ] =  &nv50_fuse_oclass;
@@ -118,7 +118,7 @@ nv50_identify(struct nouveau_device *device)
                break;
        case 0x86:
                device->cname = "G86";
-               device->oclass[NVDEV_SUBDEV_VBIOS  ] = &nouveau_bios_oclass;
+               device->oclass[NVDEV_SUBDEV_VBIOS  ] = &nvkm_bios_oclass;
                device->oclass[NVDEV_SUBDEV_GPIO   ] =  nv50_gpio_oclass;
                device->oclass[NVDEV_SUBDEV_I2C    ] =  nv50_i2c_oclass;
                device->oclass[NVDEV_SUBDEV_FUSE   ] =  &nv50_fuse_oclass;
@@ -147,7 +147,7 @@ nv50_identify(struct nouveau_device *device)
                break;
        case 0x92:
                device->cname = "G92";
-               device->oclass[NVDEV_SUBDEV_VBIOS  ] = &nouveau_bios_oclass;
+               device->oclass[NVDEV_SUBDEV_VBIOS  ] = &nvkm_bios_oclass;
                device->oclass[NVDEV_SUBDEV_GPIO   ] =  nv50_gpio_oclass;
                device->oclass[NVDEV_SUBDEV_I2C    ] =  nv50_i2c_oclass;
                device->oclass[NVDEV_SUBDEV_FUSE   ] =  &nv50_fuse_oclass;
@@ -176,7 +176,7 @@ nv50_identify(struct nouveau_device *device)
                break;
        case 0x94:
                device->cname = "G94";
-               device->oclass[NVDEV_SUBDEV_VBIOS  ] = &nouveau_bios_oclass;
+               device->oclass[NVDEV_SUBDEV_VBIOS  ] = &nvkm_bios_oclass;
                device->oclass[NVDEV_SUBDEV_GPIO   ] =  g94_gpio_oclass;
                device->oclass[NVDEV_SUBDEV_I2C    ] =  g94_i2c_oclass;
                device->oclass[NVDEV_SUBDEV_FUSE   ] =  &nv50_fuse_oclass;
@@ -205,7 +205,7 @@ nv50_identify(struct nouveau_device *device)
                break;
        case 0x96:
                device->cname = "G96";
-               device->oclass[NVDEV_SUBDEV_VBIOS  ] = &nouveau_bios_oclass;
+               device->oclass[NVDEV_SUBDEV_VBIOS  ] = &nvkm_bios_oclass;
                device->oclass[NVDEV_SUBDEV_GPIO   ] =  g94_gpio_oclass;
                device->oclass[NVDEV_SUBDEV_I2C    ] =  g94_i2c_oclass;
                device->oclass[NVDEV_SUBDEV_FUSE   ] =  &nv50_fuse_oclass;
@@ -234,7 +234,7 @@ nv50_identify(struct nouveau_device *device)
                break;
        case 0x98:
                device->cname = "G98";
-               device->oclass[NVDEV_SUBDEV_VBIOS  ] = &nouveau_bios_oclass;
+               device->oclass[NVDEV_SUBDEV_VBIOS  ] = &nvkm_bios_oclass;
                device->oclass[NVDEV_SUBDEV_GPIO   ] =  g94_gpio_oclass;
                device->oclass[NVDEV_SUBDEV_I2C    ] =  g94_i2c_oclass;
                device->oclass[NVDEV_SUBDEV_FUSE   ] =  &nv50_fuse_oclass;
@@ -263,7 +263,7 @@ nv50_identify(struct nouveau_device *device)
                break;
        case 0xa0:
                device->cname = "G200";
-               device->oclass[NVDEV_SUBDEV_VBIOS  ] = &nouveau_bios_oclass;
+               device->oclass[NVDEV_SUBDEV_VBIOS  ] = &nvkm_bios_oclass;
                device->oclass[NVDEV_SUBDEV_GPIO   ] =  g94_gpio_oclass;
                device->oclass[NVDEV_SUBDEV_I2C    ] =  nv50_i2c_oclass;
                device->oclass[NVDEV_SUBDEV_FUSE   ] =  &nv50_fuse_oclass;
@@ -292,7 +292,7 @@ nv50_identify(struct nouveau_device *device)
                break;
        case 0xaa:
                device->cname = "MCP77/MCP78";
-               device->oclass[NVDEV_SUBDEV_VBIOS  ] = &nouveau_bios_oclass;
+               device->oclass[NVDEV_SUBDEV_VBIOS  ] = &nvkm_bios_oclass;
                device->oclass[NVDEV_SUBDEV_GPIO   ] =  g94_gpio_oclass;
                device->oclass[NVDEV_SUBDEV_I2C    ] =  g94_i2c_oclass;
                device->oclass[NVDEV_SUBDEV_FUSE   ] =  &nv50_fuse_oclass;
@@ -321,7 +321,7 @@ nv50_identify(struct nouveau_device *device)
                break;
        case 0xac:
                device->cname = "MCP79/MCP7A";
-               device->oclass[NVDEV_SUBDEV_VBIOS  ] = &nouveau_bios_oclass;
+               device->oclass[NVDEV_SUBDEV_VBIOS  ] = &nvkm_bios_oclass;
                device->oclass[NVDEV_SUBDEV_GPIO   ] =  g94_gpio_oclass;
                device->oclass[NVDEV_SUBDEV_I2C    ] =  g94_i2c_oclass;
                device->oclass[NVDEV_SUBDEV_FUSE   ] =  &nv50_fuse_oclass;
@@ -350,7 +350,7 @@ nv50_identify(struct nouveau_device *device)
                break;
        case 0xa3:
                device->cname = "GT215";
-               device->oclass[NVDEV_SUBDEV_VBIOS  ] = &nouveau_bios_oclass;
+               device->oclass[NVDEV_SUBDEV_VBIOS  ] = &nvkm_bios_oclass;
                device->oclass[NVDEV_SUBDEV_GPIO   ] =  g94_gpio_oclass;
                device->oclass[NVDEV_SUBDEV_I2C    ] =  g94_i2c_oclass;
                device->oclass[NVDEV_SUBDEV_FUSE   ] =  &nv50_fuse_oclass;
@@ -381,7 +381,7 @@ nv50_identify(struct nouveau_device *device)
                break;
        case 0xa5:
                device->cname = "GT216";
-               device->oclass[NVDEV_SUBDEV_VBIOS  ] = &nouveau_bios_oclass;
+               device->oclass[NVDEV_SUBDEV_VBIOS  ] = &nvkm_bios_oclass;
                device->oclass[NVDEV_SUBDEV_GPIO   ] =  g94_gpio_oclass;
                device->oclass[NVDEV_SUBDEV_I2C    ] =  g94_i2c_oclass;
                device->oclass[NVDEV_SUBDEV_FUSE   ] =  &nv50_fuse_oclass;
@@ -411,7 +411,7 @@ nv50_identify(struct nouveau_device *device)
                break;
        case 0xa8:
                device->cname = "GT218";
-               device->oclass[NVDEV_SUBDEV_VBIOS  ] = &nouveau_bios_oclass;
+               device->oclass[NVDEV_SUBDEV_VBIOS  ] = &nvkm_bios_oclass;
                device->oclass[NVDEV_SUBDEV_GPIO   ] =  g94_gpio_oclass;
                device->oclass[NVDEV_SUBDEV_I2C    ] =  g94_i2c_oclass;
                device->oclass[NVDEV_SUBDEV_FUSE   ] =  &nv50_fuse_oclass;
@@ -441,7 +441,7 @@ nv50_identify(struct nouveau_device *device)
                break;
        case 0xaf:
                device->cname = "MCP89";
-               device->oclass[NVDEV_SUBDEV_VBIOS  ] = &nouveau_bios_oclass;
+               device->oclass[NVDEV_SUBDEV_VBIOS  ] = &nvkm_bios_oclass;
                device->oclass[NVDEV_SUBDEV_GPIO   ] =  g94_gpio_oclass;
                device->oclass[NVDEV_SUBDEV_I2C    ] =  g94_i2c_oclass;
                device->oclass[NVDEV_SUBDEV_FUSE   ] =  &nv50_fuse_oclass;
diff --git a/drivers/gpu/drm/nouveau/nvkm/engine/device/nvc0.c b/drivers/gpu/drm/nouveau/nvkm/engine/device/nvc0.c
deleted file mode 100644 (file)
index 887ec05..0000000
+++ /dev/null
@@ -1,358 +0,0 @@
-/*
- * Copyright 2012 Red Hat Inc.
- *
- * Permission is hereby granted, free of charge, to any person obtaining a
- * copy of this software and associated documentation files (the "Software"),
- * to deal in the Software without restriction, including without limitation
- * the rights to use, copy, modify, merge, publish, distribute, sublicense,
- * and/or sell copies of the Software, and to permit persons to whom the
- * Software is furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice shall be included in
- * all copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL
- * THE COPYRIGHT HOLDER(S) OR AUTHOR(S) BE LIABLE FOR ANY CLAIM, DAMAGES OR
- * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
- * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
- * OTHER DEALINGS IN THE SOFTWARE.
- *
- * Authors: Ben Skeggs
- */
-
-#include <subdev/bios.h>
-#include <subdev/bus.h>
-#include <subdev/gpio.h>
-#include <subdev/i2c.h>
-#include <subdev/fuse.h>
-#include <subdev/clk.h>
-#include <subdev/therm.h>
-#include <subdev/mxm.h>
-#include <subdev/devinit.h>
-#include <subdev/mc.h>
-#include <subdev/timer.h>
-#include <subdev/fb.h>
-#include <subdev/ltc.h>
-#include <subdev/ibus.h>
-#include <subdev/instmem.h>
-#include <subdev/mmu.h>
-#include <subdev/bar.h>
-#include <subdev/pmu.h>
-#include <subdev/volt.h>
-
-#include <engine/device.h>
-#include <engine/dmaobj.h>
-#include <engine/fifo.h>
-#include <engine/sw.h>
-#include <engine/gr.h>
-#include <engine/mspdec.h>
-#include <engine/bsp.h>
-#include <engine/msvld.h>
-#include <engine/msppp.h>
-#include <engine/ce.h>
-#include <engine/disp.h>
-#include <engine/pm.h>
-
-int
-nvc0_identify(struct nouveau_device *device)
-{
-       switch (device->chipset) {
-       case 0xc0:
-               device->cname = "GF100";
-               device->oclass[NVDEV_SUBDEV_VBIOS  ] = &nouveau_bios_oclass;
-               device->oclass[NVDEV_SUBDEV_GPIO   ] =  g94_gpio_oclass;
-               device->oclass[NVDEV_SUBDEV_I2C    ] =  g94_i2c_oclass;
-               device->oclass[NVDEV_SUBDEV_FUSE   ] = &gf100_fuse_oclass;
-               device->oclass[NVDEV_SUBDEV_CLK    ] = &gf100_clk_oclass;
-               device->oclass[NVDEV_SUBDEV_THERM  ] = &gt215_therm_oclass;
-               device->oclass[NVDEV_SUBDEV_MXM    ] = &nv50_mxm_oclass;
-               device->oclass[NVDEV_SUBDEV_DEVINIT] =  gf100_devinit_oclass;
-               device->oclass[NVDEV_SUBDEV_MC     ] =  gf100_mc_oclass;
-               device->oclass[NVDEV_SUBDEV_BUS    ] =  gf100_bus_oclass;
-               device->oclass[NVDEV_SUBDEV_TIMER  ] = &nv04_timer_oclass;
-               device->oclass[NVDEV_SUBDEV_FB     ] =  gf100_fb_oclass;
-               device->oclass[NVDEV_SUBDEV_LTC    ] =  gf100_ltc_oclass;
-               device->oclass[NVDEV_SUBDEV_IBUS   ] = &gf100_ibus_oclass;
-               device->oclass[NVDEV_SUBDEV_INSTMEM] =  nv50_instmem_oclass;
-               device->oclass[NVDEV_SUBDEV_MMU    ] = &gf100_mmu_oclass;
-               device->oclass[NVDEV_SUBDEV_BAR    ] = &gf100_bar_oclass;
-               device->oclass[NVDEV_SUBDEV_PMU    ] =  gf100_pmu_oclass;
-               device->oclass[NVDEV_SUBDEV_VOLT   ] = &nv40_volt_oclass;
-               device->oclass[NVDEV_ENGINE_DMAOBJ ] =  gf100_dmaeng_oclass;
-               device->oclass[NVDEV_ENGINE_FIFO   ] =  gf100_fifo_oclass;
-               device->oclass[NVDEV_ENGINE_SW     ] =  gf100_sw_oclass;
-               device->oclass[NVDEV_ENGINE_GR     ] =  gf100_gr_oclass;
-               device->oclass[NVDEV_ENGINE_MSPDEC ] = &gf100_mspdec_oclass;
-               device->oclass[NVDEV_ENGINE_MSVLD  ] = &gf100_msvld_oclass;
-               device->oclass[NVDEV_ENGINE_MSPPP  ] = &gf100_msppp_oclass;
-               device->oclass[NVDEV_ENGINE_CE0    ] = &gf100_ce0_oclass;
-               device->oclass[NVDEV_ENGINE_CE1    ] = &gf100_ce1_oclass;
-               device->oclass[NVDEV_ENGINE_DISP   ] =  gt215_disp_oclass;
-               device->oclass[NVDEV_ENGINE_PM     ] = &gf100_pm_oclass;
-               break;
-       case 0xc4:
-               device->cname = "GF104";
-               device->oclass[NVDEV_SUBDEV_VBIOS  ] = &nouveau_bios_oclass;
-               device->oclass[NVDEV_SUBDEV_GPIO   ] =  g94_gpio_oclass;
-               device->oclass[NVDEV_SUBDEV_I2C    ] =  g94_i2c_oclass;
-               device->oclass[NVDEV_SUBDEV_FUSE   ] = &gf100_fuse_oclass;
-               device->oclass[NVDEV_SUBDEV_CLK    ] = &gf100_clk_oclass;
-               device->oclass[NVDEV_SUBDEV_THERM  ] = &gt215_therm_oclass;
-               device->oclass[NVDEV_SUBDEV_MXM    ] = &nv50_mxm_oclass;
-               device->oclass[NVDEV_SUBDEV_DEVINIT] =  gf100_devinit_oclass;
-               device->oclass[NVDEV_SUBDEV_MC     ] =  gf100_mc_oclass;
-               device->oclass[NVDEV_SUBDEV_BUS    ] =  gf100_bus_oclass;
-               device->oclass[NVDEV_SUBDEV_TIMER  ] = &nv04_timer_oclass;
-               device->oclass[NVDEV_SUBDEV_FB     ] =  gf100_fb_oclass;
-               device->oclass[NVDEV_SUBDEV_LTC    ] =  gf100_ltc_oclass;
-               device->oclass[NVDEV_SUBDEV_IBUS   ] = &gf100_ibus_oclass;
-               device->oclass[NVDEV_SUBDEV_INSTMEM] =  nv50_instmem_oclass;
-               device->oclass[NVDEV_SUBDEV_MMU    ] = &gf100_mmu_oclass;
-               device->oclass[NVDEV_SUBDEV_BAR    ] = &gf100_bar_oclass;
-               device->oclass[NVDEV_SUBDEV_PMU    ] =  gf100_pmu_oclass;
-               device->oclass[NVDEV_SUBDEV_VOLT   ] = &nv40_volt_oclass;
-               device->oclass[NVDEV_ENGINE_DMAOBJ ] =  gf100_dmaeng_oclass;
-               device->oclass[NVDEV_ENGINE_FIFO   ] =  gf100_fifo_oclass;
-               device->oclass[NVDEV_ENGINE_SW     ] =  gf100_sw_oclass;
-               device->oclass[NVDEV_ENGINE_GR     ] =  gf104_gr_oclass;
-               device->oclass[NVDEV_ENGINE_MSPDEC ] = &gf100_mspdec_oclass;
-               device->oclass[NVDEV_ENGINE_MSVLD  ] = &gf100_msvld_oclass;
-               device->oclass[NVDEV_ENGINE_MSPPP  ] = &gf100_msppp_oclass;
-               device->oclass[NVDEV_ENGINE_CE0    ] = &gf100_ce0_oclass;
-               device->oclass[NVDEV_ENGINE_CE1    ] = &gf100_ce1_oclass;
-               device->oclass[NVDEV_ENGINE_DISP   ] =  gt215_disp_oclass;
-               device->oclass[NVDEV_ENGINE_PM     ] = &gf100_pm_oclass;
-               break;
-       case 0xc3:
-               device->cname = "GF106";
-               device->oclass[NVDEV_SUBDEV_VBIOS  ] = &nouveau_bios_oclass;
-               device->oclass[NVDEV_SUBDEV_GPIO   ] =  g94_gpio_oclass;
-               device->oclass[NVDEV_SUBDEV_I2C    ] =  g94_i2c_oclass;
-               device->oclass[NVDEV_SUBDEV_FUSE   ] = &gf100_fuse_oclass;
-               device->oclass[NVDEV_SUBDEV_CLK    ] = &gf100_clk_oclass;
-               device->oclass[NVDEV_SUBDEV_THERM  ] = &gt215_therm_oclass;
-               device->oclass[NVDEV_SUBDEV_MXM    ] = &nv50_mxm_oclass;
-               device->oclass[NVDEV_SUBDEV_DEVINIT] =  gf100_devinit_oclass;
-               device->oclass[NVDEV_SUBDEV_MC     ] =  gf106_mc_oclass;
-               device->oclass[NVDEV_SUBDEV_BUS    ] =  gf100_bus_oclass;
-               device->oclass[NVDEV_SUBDEV_TIMER  ] = &nv04_timer_oclass;
-               device->oclass[NVDEV_SUBDEV_FB     ] =  gf100_fb_oclass;
-               device->oclass[NVDEV_SUBDEV_LTC    ] =  gf100_ltc_oclass;
-               device->oclass[NVDEV_SUBDEV_IBUS   ] = &gf100_ibus_oclass;
-               device->oclass[NVDEV_SUBDEV_INSTMEM] =  nv50_instmem_oclass;
-               device->oclass[NVDEV_SUBDEV_MMU    ] = &gf100_mmu_oclass;
-               device->oclass[NVDEV_SUBDEV_BAR    ] = &gf100_bar_oclass;
-               device->oclass[NVDEV_SUBDEV_PMU    ] =  gf100_pmu_oclass;
-               device->oclass[NVDEV_SUBDEV_VOLT   ] = &nv40_volt_oclass;
-               device->oclass[NVDEV_ENGINE_DMAOBJ ] =  gf100_dmaeng_oclass;
-               device->oclass[NVDEV_ENGINE_FIFO   ] =  gf100_fifo_oclass;
-               device->oclass[NVDEV_ENGINE_SW     ] =  gf100_sw_oclass;
-               device->oclass[NVDEV_ENGINE_GR     ] =  gf104_gr_oclass;
-               device->oclass[NVDEV_ENGINE_MSPDEC ] = &gf100_mspdec_oclass;
-               device->oclass[NVDEV_ENGINE_MSVLD  ] = &gf100_msvld_oclass;
-               device->oclass[NVDEV_ENGINE_MSPPP  ] = &gf100_msppp_oclass;
-               device->oclass[NVDEV_ENGINE_CE0    ] = &gf100_ce0_oclass;
-               device->oclass[NVDEV_ENGINE_DISP   ] =  gt215_disp_oclass;
-               device->oclass[NVDEV_ENGINE_PM     ] = &gf100_pm_oclass;
-               break;
-       case 0xce:
-               device->cname = "GF114";
-               device->oclass[NVDEV_SUBDEV_VBIOS  ] = &nouveau_bios_oclass;
-               device->oclass[NVDEV_SUBDEV_GPIO   ] =  g94_gpio_oclass;
-               device->oclass[NVDEV_SUBDEV_I2C    ] =  g94_i2c_oclass;
-               device->oclass[NVDEV_SUBDEV_FUSE   ] = &gf100_fuse_oclass;
-               device->oclass[NVDEV_SUBDEV_CLK    ] = &gf100_clk_oclass;
-               device->oclass[NVDEV_SUBDEV_THERM  ] = &gt215_therm_oclass;
-               device->oclass[NVDEV_SUBDEV_MXM    ] = &nv50_mxm_oclass;
-               device->oclass[NVDEV_SUBDEV_DEVINIT] =  gf100_devinit_oclass;
-               device->oclass[NVDEV_SUBDEV_MC     ] =  gf100_mc_oclass;
-               device->oclass[NVDEV_SUBDEV_BUS    ] =  gf100_bus_oclass;
-               device->oclass[NVDEV_SUBDEV_TIMER  ] = &nv04_timer_oclass;
-               device->oclass[NVDEV_SUBDEV_FB     ] =  gf100_fb_oclass;
-               device->oclass[NVDEV_SUBDEV_LTC    ] =  gf100_ltc_oclass;
-               device->oclass[NVDEV_SUBDEV_IBUS   ] = &gf100_ibus_oclass;
-               device->oclass[NVDEV_SUBDEV_INSTMEM] =  nv50_instmem_oclass;
-               device->oclass[NVDEV_SUBDEV_MMU    ] = &gf100_mmu_oclass;
-               device->oclass[NVDEV_SUBDEV_BAR    ] = &gf100_bar_oclass;
-               device->oclass[NVDEV_SUBDEV_PMU    ] =  gf100_pmu_oclass;
-               device->oclass[NVDEV_SUBDEV_VOLT   ] = &nv40_volt_oclass;
-               device->oclass[NVDEV_ENGINE_DMAOBJ ] =  gf100_dmaeng_oclass;
-               device->oclass[NVDEV_ENGINE_FIFO   ] =  gf100_fifo_oclass;
-               device->oclass[NVDEV_ENGINE_SW     ] =  gf100_sw_oclass;
-               device->oclass[NVDEV_ENGINE_GR     ] =  gf104_gr_oclass;
-               device->oclass[NVDEV_ENGINE_MSPDEC ] = &gf100_mspdec_oclass;
-               device->oclass[NVDEV_ENGINE_MSVLD  ] = &gf100_msvld_oclass;
-               device->oclass[NVDEV_ENGINE_MSPPP  ] = &gf100_msppp_oclass;
-               device->oclass[NVDEV_ENGINE_CE0    ] = &gf100_ce0_oclass;
-               device->oclass[NVDEV_ENGINE_CE1    ] = &gf100_ce1_oclass;
-               device->oclass[NVDEV_ENGINE_DISP   ] =  gt215_disp_oclass;
-               device->oclass[NVDEV_ENGINE_PM     ] = &gf100_pm_oclass;
-               break;
-       case 0xcf:
-               device->cname = "GF116";
-               device->oclass[NVDEV_SUBDEV_VBIOS  ] = &nouveau_bios_oclass;
-               device->oclass[NVDEV_SUBDEV_GPIO   ] =  g94_gpio_oclass;
-               device->oclass[NVDEV_SUBDEV_I2C    ] =  g94_i2c_oclass;
-               device->oclass[NVDEV_SUBDEV_FUSE   ] = &gf100_fuse_oclass;
-               device->oclass[NVDEV_SUBDEV_CLK    ] = &gf100_clk_oclass;
-               device->oclass[NVDEV_SUBDEV_THERM  ] = &gt215_therm_oclass;
-               device->oclass[NVDEV_SUBDEV_MXM    ] = &nv50_mxm_oclass;
-               device->oclass[NVDEV_SUBDEV_DEVINIT] =  gf100_devinit_oclass;
-               device->oclass[NVDEV_SUBDEV_MC     ] =  gf106_mc_oclass;
-               device->oclass[NVDEV_SUBDEV_BUS    ] =  gf100_bus_oclass;
-               device->oclass[NVDEV_SUBDEV_TIMER  ] = &nv04_timer_oclass;
-               device->oclass[NVDEV_SUBDEV_FB     ] =  gf100_fb_oclass;
-               device->oclass[NVDEV_SUBDEV_LTC    ] =  gf100_ltc_oclass;
-               device->oclass[NVDEV_SUBDEV_IBUS   ] = &gf100_ibus_oclass;
-               device->oclass[NVDEV_SUBDEV_INSTMEM] =  nv50_instmem_oclass;
-               device->oclass[NVDEV_SUBDEV_MMU    ] = &gf100_mmu_oclass;
-               device->oclass[NVDEV_SUBDEV_BAR    ] = &gf100_bar_oclass;
-               device->oclass[NVDEV_SUBDEV_PMU    ] =  gf100_pmu_oclass;
-               device->oclass[NVDEV_SUBDEV_VOLT   ] = &nv40_volt_oclass;
-               device->oclass[NVDEV_ENGINE_DMAOBJ ] =  gf100_dmaeng_oclass;
-               device->oclass[NVDEV_ENGINE_FIFO   ] =  gf100_fifo_oclass;
-               device->oclass[NVDEV_ENGINE_SW     ] =  gf100_sw_oclass;
-               device->oclass[NVDEV_ENGINE_GR     ] =  gf104_gr_oclass;
-               device->oclass[NVDEV_ENGINE_MSPDEC ] = &gf100_mspdec_oclass;
-               device->oclass[NVDEV_ENGINE_MSVLD  ] = &gf100_msvld_oclass;
-               device->oclass[NVDEV_ENGINE_MSPPP  ] = &gf100_msppp_oclass;
-               device->oclass[NVDEV_ENGINE_CE0    ] = &gf100_ce0_oclass;
-               device->oclass[NVDEV_ENGINE_DISP   ] =  gt215_disp_oclass;
-               device->oclass[NVDEV_ENGINE_PM     ] = &gf100_pm_oclass;
-               break;
-       case 0xc1:
-               device->cname = "GF108";
-               device->oclass[NVDEV_SUBDEV_VBIOS  ] = &nouveau_bios_oclass;
-               device->oclass[NVDEV_SUBDEV_GPIO   ] =  g94_gpio_oclass;
-               device->oclass[NVDEV_SUBDEV_I2C    ] =  g94_i2c_oclass;
-               device->oclass[NVDEV_SUBDEV_FUSE   ] = &gf100_fuse_oclass;
-               device->oclass[NVDEV_SUBDEV_CLK    ] = &gf100_clk_oclass;
-               device->oclass[NVDEV_SUBDEV_THERM  ] = &gt215_therm_oclass;
-               device->oclass[NVDEV_SUBDEV_MXM    ] = &nv50_mxm_oclass;
-               device->oclass[NVDEV_SUBDEV_DEVINIT] =  gf100_devinit_oclass;
-               device->oclass[NVDEV_SUBDEV_MC     ] =  gf106_mc_oclass;
-               device->oclass[NVDEV_SUBDEV_BUS    ] =  gf100_bus_oclass;
-               device->oclass[NVDEV_SUBDEV_TIMER  ] = &nv04_timer_oclass;
-               device->oclass[NVDEV_SUBDEV_FB     ] =  gf100_fb_oclass;
-               device->oclass[NVDEV_SUBDEV_LTC    ] =  gf100_ltc_oclass;
-               device->oclass[NVDEV_SUBDEV_IBUS   ] = &gf100_ibus_oclass;
-               device->oclass[NVDEV_SUBDEV_INSTMEM] =  nv50_instmem_oclass;
-               device->oclass[NVDEV_SUBDEV_MMU    ] = &gf100_mmu_oclass;
-               device->oclass[NVDEV_SUBDEV_BAR    ] = &gf100_bar_oclass;
-               device->oclass[NVDEV_SUBDEV_PMU    ] =  gf100_pmu_oclass;
-               device->oclass[NVDEV_SUBDEV_VOLT   ] = &nv40_volt_oclass;
-               device->oclass[NVDEV_ENGINE_DMAOBJ ] =  gf100_dmaeng_oclass;
-               device->oclass[NVDEV_ENGINE_FIFO   ] =  gf100_fifo_oclass;
-               device->oclass[NVDEV_ENGINE_SW     ] =  gf100_sw_oclass;
-               device->oclass[NVDEV_ENGINE_GR     ] =  gf108_gr_oclass;
-               device->oclass[NVDEV_ENGINE_MSPDEC ] = &gf100_mspdec_oclass;
-               device->oclass[NVDEV_ENGINE_MSVLD  ] = &gf100_msvld_oclass;
-               device->oclass[NVDEV_ENGINE_MSPPP  ] = &gf100_msppp_oclass;
-               device->oclass[NVDEV_ENGINE_CE0    ] = &gf100_ce0_oclass;
-               device->oclass[NVDEV_ENGINE_DISP   ] =  gt215_disp_oclass;
-               device->oclass[NVDEV_ENGINE_PM     ] = &gf100_pm_oclass;
-               break;
-       case 0xc8:
-               device->cname = "GF110";
-               device->oclass[NVDEV_SUBDEV_VBIOS  ] = &nouveau_bios_oclass;
-               device->oclass[NVDEV_SUBDEV_GPIO   ] =  g94_gpio_oclass;
-               device->oclass[NVDEV_SUBDEV_I2C    ] =  g94_i2c_oclass;
-               device->oclass[NVDEV_SUBDEV_FUSE   ] = &gf100_fuse_oclass;
-               device->oclass[NVDEV_SUBDEV_CLK    ] = &gf100_clk_oclass;
-               device->oclass[NVDEV_SUBDEV_THERM  ] = &gt215_therm_oclass;
-               device->oclass[NVDEV_SUBDEV_MXM    ] = &nv50_mxm_oclass;
-               device->oclass[NVDEV_SUBDEV_DEVINIT] =  gf100_devinit_oclass;
-               device->oclass[NVDEV_SUBDEV_MC     ] =  gf100_mc_oclass;
-               device->oclass[NVDEV_SUBDEV_BUS    ] =  gf100_bus_oclass;
-               device->oclass[NVDEV_SUBDEV_TIMER  ] = &nv04_timer_oclass;
-               device->oclass[NVDEV_SUBDEV_FB     ] =  gf100_fb_oclass;
-               device->oclass[NVDEV_SUBDEV_LTC    ] =  gf100_ltc_oclass;
-               device->oclass[NVDEV_SUBDEV_IBUS   ] = &gf100_ibus_oclass;
-               device->oclass[NVDEV_SUBDEV_INSTMEM] =  nv50_instmem_oclass;
-               device->oclass[NVDEV_SUBDEV_MMU    ] = &gf100_mmu_oclass;
-               device->oclass[NVDEV_SUBDEV_BAR    ] = &gf100_bar_oclass;
-               device->oclass[NVDEV_SUBDEV_PMU    ] =  gf100_pmu_oclass;
-               device->oclass[NVDEV_SUBDEV_VOLT   ] = &nv40_volt_oclass;
-               device->oclass[NVDEV_ENGINE_DMAOBJ ] =  gf100_dmaeng_oclass;
-               device->oclass[NVDEV_ENGINE_FIFO   ] =  gf100_fifo_oclass;
-               device->oclass[NVDEV_ENGINE_SW     ] =  gf100_sw_oclass;
-               device->oclass[NVDEV_ENGINE_GR     ] =  gf110_gr_oclass;
-               device->oclass[NVDEV_ENGINE_MSPDEC ] = &gf100_mspdec_oclass;
-               device->oclass[NVDEV_ENGINE_MSVLD  ] = &gf100_msvld_oclass;
-               device->oclass[NVDEV_ENGINE_MSPPP  ] = &gf100_msppp_oclass;
-               device->oclass[NVDEV_ENGINE_CE0    ] = &gf100_ce0_oclass;
-               device->oclass[NVDEV_ENGINE_CE1    ] = &gf100_ce1_oclass;
-               device->oclass[NVDEV_ENGINE_DISP   ] =  gt215_disp_oclass;
-               device->oclass[NVDEV_ENGINE_PM     ] = &gf100_pm_oclass;
-               break;
-       case 0xd9:
-               device->cname = "GF119";
-               device->oclass[NVDEV_SUBDEV_VBIOS  ] = &nouveau_bios_oclass;
-               device->oclass[NVDEV_SUBDEV_GPIO   ] =  gf110_gpio_oclass;
-               device->oclass[NVDEV_SUBDEV_I2C    ] =  gf110_i2c_oclass;
-               device->oclass[NVDEV_SUBDEV_FUSE   ] = &gf100_fuse_oclass;
-               device->oclass[NVDEV_SUBDEV_CLK    ] = &gf100_clk_oclass;
-               device->oclass[NVDEV_SUBDEV_THERM  ] = &gf110_therm_oclass;
-               device->oclass[NVDEV_SUBDEV_MXM    ] = &nv50_mxm_oclass;
-               device->oclass[NVDEV_SUBDEV_DEVINIT] =  gf100_devinit_oclass;
-               device->oclass[NVDEV_SUBDEV_MC     ] =  gf106_mc_oclass;
-               device->oclass[NVDEV_SUBDEV_BUS    ] =  gf100_bus_oclass;
-               device->oclass[NVDEV_SUBDEV_TIMER  ] = &nv04_timer_oclass;
-               device->oclass[NVDEV_SUBDEV_FB     ] =  gf100_fb_oclass;
-               device->oclass[NVDEV_SUBDEV_LTC    ] =  gf100_ltc_oclass;
-               device->oclass[NVDEV_SUBDEV_IBUS   ] = &gf100_ibus_oclass;
-               device->oclass[NVDEV_SUBDEV_INSTMEM] =  nv50_instmem_oclass;
-               device->oclass[NVDEV_SUBDEV_MMU    ] = &gf100_mmu_oclass;
-               device->oclass[NVDEV_SUBDEV_BAR    ] = &gf100_bar_oclass;
-               device->oclass[NVDEV_SUBDEV_PMU    ] =  gf110_pmu_oclass;
-               device->oclass[NVDEV_SUBDEV_VOLT   ] = &nv40_volt_oclass;
-               device->oclass[NVDEV_ENGINE_DMAOBJ ] =  gf110_dmaeng_oclass;
-               device->oclass[NVDEV_ENGINE_FIFO   ] =  gf100_fifo_oclass;
-               device->oclass[NVDEV_ENGINE_SW     ] =  gf100_sw_oclass;
-               device->oclass[NVDEV_ENGINE_GR     ] =  gf119_gr_oclass;
-               device->oclass[NVDEV_ENGINE_MSPDEC ] = &gf100_mspdec_oclass;
-               device->oclass[NVDEV_ENGINE_MSVLD  ] = &gf100_msvld_oclass;
-               device->oclass[NVDEV_ENGINE_MSPPP  ] = &gf100_msppp_oclass;
-               device->oclass[NVDEV_ENGINE_CE0    ] = &gf100_ce0_oclass;
-               device->oclass[NVDEV_ENGINE_DISP   ] =  gf110_disp_oclass;
-               device->oclass[NVDEV_ENGINE_PM     ] = &gf100_pm_oclass;
-               break;
-       case 0xd7:
-               device->cname = "GF117";
-               device->oclass[NVDEV_SUBDEV_VBIOS  ] = &nouveau_bios_oclass;
-               device->oclass[NVDEV_SUBDEV_GPIO   ] =  gf110_gpio_oclass;
-               device->oclass[NVDEV_SUBDEV_I2C    ] =  gf117_i2c_oclass;
-               device->oclass[NVDEV_SUBDEV_FUSE   ] = &gf100_fuse_oclass;
-               device->oclass[NVDEV_SUBDEV_CLK    ] = &gf100_clk_oclass;
-               device->oclass[NVDEV_SUBDEV_THERM  ] = &gf110_therm_oclass;
-               device->oclass[NVDEV_SUBDEV_MXM    ] = &nv50_mxm_oclass;
-               device->oclass[NVDEV_SUBDEV_DEVINIT] =  gf100_devinit_oclass;
-               device->oclass[NVDEV_SUBDEV_MC     ] =  gf106_mc_oclass;
-               device->oclass[NVDEV_SUBDEV_BUS    ] =  gf100_bus_oclass;
-               device->oclass[NVDEV_SUBDEV_TIMER  ] = &nv04_timer_oclass;
-               device->oclass[NVDEV_SUBDEV_FB     ] =  gf100_fb_oclass;
-               device->oclass[NVDEV_SUBDEV_LTC    ] =  gf100_ltc_oclass;
-               device->oclass[NVDEV_SUBDEV_IBUS   ] = &gf100_ibus_oclass;
-               device->oclass[NVDEV_SUBDEV_INSTMEM] =  nv50_instmem_oclass;
-               device->oclass[NVDEV_SUBDEV_MMU    ] = &gf100_mmu_oclass;
-               device->oclass[NVDEV_SUBDEV_BAR    ] = &gf100_bar_oclass;
-               device->oclass[NVDEV_ENGINE_DMAOBJ ] =  gf110_dmaeng_oclass;
-               device->oclass[NVDEV_ENGINE_FIFO   ] =  gf100_fifo_oclass;
-               device->oclass[NVDEV_ENGINE_SW     ] =  gf100_sw_oclass;
-               device->oclass[NVDEV_ENGINE_GR     ] =  gf117_gr_oclass;
-               device->oclass[NVDEV_ENGINE_MSPDEC ] = &gf100_mspdec_oclass;
-               device->oclass[NVDEV_ENGINE_MSVLD  ] = &gf100_msvld_oclass;
-               device->oclass[NVDEV_ENGINE_MSPPP  ] = &gf100_msppp_oclass;
-               device->oclass[NVDEV_ENGINE_CE0    ] = &gf100_ce0_oclass;
-               device->oclass[NVDEV_ENGINE_DISP   ] =  gf110_disp_oclass;
-               device->oclass[NVDEV_ENGINE_PM     ] = &gf100_pm_oclass;
-               break;
-       default:
-               nv_fatal(device, "unknown Fermi chipset\n");
-               return -EINVAL;
-       }
-
-       return 0;
-       }
diff --git a/drivers/gpu/drm/nouveau/nvkm/engine/device/nve0.c b/drivers/gpu/drm/nouveau/nvkm/engine/device/nve0.c
deleted file mode 100644 (file)
index faaf87b..0000000
+++ /dev/null
@@ -1,326 +0,0 @@
-/*
- * Copyright 2012 Red Hat Inc.
- *
- * Permission is hereby granted, free of charge, to any person obtaining a
- * copy of this software and associated documentation files (the "Software"),
- * to deal in the Software without restriction, including without limitation
- * the rights to use, copy, modify, merge, publish, distribute, sublicense,
- * and/or sell copies of the Software, and to permit persons to whom the
- * Software is furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice shall be included in
- * all copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL
- * THE COPYRIGHT HOLDER(S) OR AUTHOR(S) BE LIABLE FOR ANY CLAIM, DAMAGES OR
- * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
- * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
- * OTHER DEALINGS IN THE SOFTWARE.
- *
- * Authors: Ben Skeggs
- */
-
-#include <subdev/bios.h>
-#include <subdev/bus.h>
-#include <subdev/gpio.h>
-#include <subdev/i2c.h>
-#include <subdev/fuse.h>
-#include <subdev/clk.h>
-#include <subdev/therm.h>
-#include <subdev/mxm.h>
-#include <subdev/devinit.h>
-#include <subdev/mc.h>
-#include <subdev/timer.h>
-#include <subdev/fb.h>
-#include <subdev/ltc.h>
-#include <subdev/ibus.h>
-#include <subdev/instmem.h>
-#include <subdev/mmu.h>
-#include <subdev/bar.h>
-#include <subdev/pmu.h>
-#include <subdev/volt.h>
-
-#include <engine/device.h>
-#include <engine/dmaobj.h>
-#include <engine/fifo.h>
-#include <engine/sw.h>
-#include <engine/gr.h>
-#include <engine/disp.h>
-#include <engine/ce.h>
-#include <engine/bsp.h>
-#include <engine/msvld.h>
-#include <engine/mspdec.h>
-#include <engine/msppp.h>
-#include <engine/pm.h>
-
-int
-nve0_identify(struct nouveau_device *device)
-{
-       switch (device->chipset) {
-       case 0xe4:
-               device->cname = "GK104";
-               device->oclass[NVDEV_SUBDEV_VBIOS  ] = &nouveau_bios_oclass;
-               device->oclass[NVDEV_SUBDEV_GPIO   ] =  gk104_gpio_oclass;
-               device->oclass[NVDEV_SUBDEV_I2C    ] =  gk104_i2c_oclass;
-               device->oclass[NVDEV_SUBDEV_FUSE   ] = &gf100_fuse_oclass;
-               device->oclass[NVDEV_SUBDEV_CLK    ] = &gk104_clk_oclass;
-               device->oclass[NVDEV_SUBDEV_THERM  ] = &gf110_therm_oclass;
-               device->oclass[NVDEV_SUBDEV_MXM    ] = &nv50_mxm_oclass;
-               device->oclass[NVDEV_SUBDEV_DEVINIT] =  gf100_devinit_oclass;
-               device->oclass[NVDEV_SUBDEV_MC     ] =  gf106_mc_oclass;
-               device->oclass[NVDEV_SUBDEV_BUS    ] =  gf100_bus_oclass;
-               device->oclass[NVDEV_SUBDEV_TIMER  ] = &nv04_timer_oclass;
-               device->oclass[NVDEV_SUBDEV_FB     ] =  gk104_fb_oclass;
-               device->oclass[NVDEV_SUBDEV_LTC    ] =  gk104_ltc_oclass;
-               device->oclass[NVDEV_SUBDEV_IBUS   ] = &gk104_ibus_oclass;
-               device->oclass[NVDEV_SUBDEV_INSTMEM] =  nv50_instmem_oclass;
-               device->oclass[NVDEV_SUBDEV_MMU    ] = &gf100_mmu_oclass;
-               device->oclass[NVDEV_SUBDEV_BAR    ] = &gf100_bar_oclass;
-               device->oclass[NVDEV_SUBDEV_PMU    ] =  gk104_pmu_oclass;
-               device->oclass[NVDEV_SUBDEV_VOLT   ] = &nv40_volt_oclass;
-               device->oclass[NVDEV_ENGINE_DMAOBJ ] =  gf110_dmaeng_oclass;
-               device->oclass[NVDEV_ENGINE_FIFO   ] =  gk104_fifo_oclass;
-               device->oclass[NVDEV_ENGINE_SW     ] =  gf100_sw_oclass;
-               device->oclass[NVDEV_ENGINE_GR     ] =  gk104_gr_oclass;
-               device->oclass[NVDEV_ENGINE_DISP   ] =  gk104_disp_oclass;
-               device->oclass[NVDEV_ENGINE_CE0    ] = &gk104_ce0_oclass;
-               device->oclass[NVDEV_ENGINE_CE1    ] = &gk104_ce1_oclass;
-               device->oclass[NVDEV_ENGINE_CE2    ] = &gk104_ce2_oclass;
-               device->oclass[NVDEV_ENGINE_MSVLD  ] = &gk104_msvld_oclass;
-               device->oclass[NVDEV_ENGINE_MSPDEC ] = &gk104_mspdec_oclass;
-               device->oclass[NVDEV_ENGINE_MSPPP  ] = &gf100_msppp_oclass;
-               device->oclass[NVDEV_ENGINE_PM     ] = &gk104_pm_oclass;
-               break;
-       case 0xe7:
-               device->cname = "GK107";
-               device->oclass[NVDEV_SUBDEV_VBIOS  ] = &nouveau_bios_oclass;
-               device->oclass[NVDEV_SUBDEV_GPIO   ] =  gk104_gpio_oclass;
-               device->oclass[NVDEV_SUBDEV_I2C    ] =  gk104_i2c_oclass;
-               device->oclass[NVDEV_SUBDEV_FUSE   ] = &gf100_fuse_oclass;
-               device->oclass[NVDEV_SUBDEV_CLK    ] = &gk104_clk_oclass;
-               device->oclass[NVDEV_SUBDEV_THERM  ] = &gf110_therm_oclass;
-               device->oclass[NVDEV_SUBDEV_MXM    ] = &nv50_mxm_oclass;
-               device->oclass[NVDEV_SUBDEV_DEVINIT] =  gf100_devinit_oclass;
-               device->oclass[NVDEV_SUBDEV_MC     ] =  gf106_mc_oclass;
-               device->oclass[NVDEV_SUBDEV_BUS    ] =  gf100_bus_oclass;
-               device->oclass[NVDEV_SUBDEV_TIMER  ] = &nv04_timer_oclass;
-               device->oclass[NVDEV_SUBDEV_FB     ] =  gk104_fb_oclass;
-               device->oclass[NVDEV_SUBDEV_LTC    ] =  gk104_ltc_oclass;
-               device->oclass[NVDEV_SUBDEV_IBUS   ] = &gk104_ibus_oclass;
-               device->oclass[NVDEV_SUBDEV_INSTMEM] =  nv50_instmem_oclass;
-               device->oclass[NVDEV_SUBDEV_MMU    ] = &gf100_mmu_oclass;
-               device->oclass[NVDEV_SUBDEV_BAR    ] = &gf100_bar_oclass;
-               device->oclass[NVDEV_SUBDEV_PMU    ] =  gf110_pmu_oclass;
-               device->oclass[NVDEV_SUBDEV_VOLT   ] = &nv40_volt_oclass;
-               device->oclass[NVDEV_ENGINE_DMAOBJ ] =  gf110_dmaeng_oclass;
-               device->oclass[NVDEV_ENGINE_FIFO   ] =  gk104_fifo_oclass;
-               device->oclass[NVDEV_ENGINE_SW     ] =  gf100_sw_oclass;
-               device->oclass[NVDEV_ENGINE_GR     ] =  gk104_gr_oclass;
-               device->oclass[NVDEV_ENGINE_DISP   ] =  gk104_disp_oclass;
-               device->oclass[NVDEV_ENGINE_CE0    ] = &gk104_ce0_oclass;
-               device->oclass[NVDEV_ENGINE_CE1    ] = &gk104_ce1_oclass;
-               device->oclass[NVDEV_ENGINE_CE2    ] = &gk104_ce2_oclass;
-               device->oclass[NVDEV_ENGINE_MSVLD  ] = &gk104_msvld_oclass;
-               device->oclass[NVDEV_ENGINE_MSPDEC ] = &gk104_mspdec_oclass;
-               device->oclass[NVDEV_ENGINE_MSPPP  ] = &gf100_msppp_oclass;
-               device->oclass[NVDEV_ENGINE_PM     ] = &gk104_pm_oclass;
-               break;
-       case 0xe6:
-               device->cname = "GK106";
-               device->oclass[NVDEV_SUBDEV_VBIOS  ] = &nouveau_bios_oclass;
-               device->oclass[NVDEV_SUBDEV_GPIO   ] =  gk104_gpio_oclass;
-               device->oclass[NVDEV_SUBDEV_I2C    ] =  gk104_i2c_oclass;
-               device->oclass[NVDEV_SUBDEV_FUSE   ] = &gf100_fuse_oclass;
-               device->oclass[NVDEV_SUBDEV_CLK    ] = &gk104_clk_oclass;
-               device->oclass[NVDEV_SUBDEV_THERM  ] = &gf110_therm_oclass;
-               device->oclass[NVDEV_SUBDEV_MXM    ] = &nv50_mxm_oclass;
-               device->oclass[NVDEV_SUBDEV_DEVINIT] =  gf100_devinit_oclass;
-               device->oclass[NVDEV_SUBDEV_MC     ] =  gf106_mc_oclass;
-               device->oclass[NVDEV_SUBDEV_BUS    ] =  gf100_bus_oclass;
-               device->oclass[NVDEV_SUBDEV_TIMER  ] = &nv04_timer_oclass;
-               device->oclass[NVDEV_SUBDEV_FB     ] =  gk104_fb_oclass;
-               device->oclass[NVDEV_SUBDEV_LTC    ] =  gk104_ltc_oclass;
-               device->oclass[NVDEV_SUBDEV_IBUS   ] = &gk104_ibus_oclass;
-               device->oclass[NVDEV_SUBDEV_INSTMEM] =  nv50_instmem_oclass;
-               device->oclass[NVDEV_SUBDEV_MMU    ] = &gf100_mmu_oclass;
-               device->oclass[NVDEV_SUBDEV_BAR    ] = &gf100_bar_oclass;
-               device->oclass[NVDEV_SUBDEV_PMU    ] =  gk104_pmu_oclass;
-               device->oclass[NVDEV_SUBDEV_VOLT   ] = &nv40_volt_oclass;
-               device->oclass[NVDEV_ENGINE_DMAOBJ ] =  gf110_dmaeng_oclass;
-               device->oclass[NVDEV_ENGINE_FIFO   ] =  gk104_fifo_oclass;
-               device->oclass[NVDEV_ENGINE_SW     ] =  gf100_sw_oclass;
-               device->oclass[NVDEV_ENGINE_GR     ] =  gk104_gr_oclass;
-               device->oclass[NVDEV_ENGINE_DISP   ] =  gk104_disp_oclass;
-               device->oclass[NVDEV_ENGINE_CE0    ] = &gk104_ce0_oclass;
-               device->oclass[NVDEV_ENGINE_CE1    ] = &gk104_ce1_oclass;
-               device->oclass[NVDEV_ENGINE_CE2    ] = &gk104_ce2_oclass;
-               device->oclass[NVDEV_ENGINE_MSVLD  ] = &gk104_msvld_oclass;
-               device->oclass[NVDEV_ENGINE_MSPDEC ] = &gk104_mspdec_oclass;
-               device->oclass[NVDEV_ENGINE_MSPPP  ] = &gf100_msppp_oclass;
-               device->oclass[NVDEV_ENGINE_PM     ] = &gk104_pm_oclass;
-               break;
-       case 0xea:
-               device->cname = "GK20A";
-               device->oclass[NVDEV_SUBDEV_CLK    ] = &gk20a_clk_oclass;
-               device->oclass[NVDEV_SUBDEV_MC     ] =  gk20a_mc_oclass;
-               device->oclass[NVDEV_SUBDEV_BUS    ] =  gf100_bus_oclass;
-               device->oclass[NVDEV_SUBDEV_FUSE   ] = &gf100_fuse_oclass;
-               device->oclass[NVDEV_SUBDEV_TIMER  ] = &gk20a_timer_oclass;
-               device->oclass[NVDEV_SUBDEV_FB     ] =  gk20a_fb_oclass;
-               device->oclass[NVDEV_SUBDEV_LTC    ] =  gk104_ltc_oclass;
-               device->oclass[NVDEV_SUBDEV_IBUS   ] = &gk20a_ibus_oclass;
-               device->oclass[NVDEV_SUBDEV_INSTMEM] = nv50_instmem_oclass;
-               device->oclass[NVDEV_SUBDEV_MMU    ] = &gf100_mmu_oclass;
-               device->oclass[NVDEV_SUBDEV_BAR    ] = &gk20a_bar_oclass;
-               device->oclass[NVDEV_ENGINE_DMAOBJ ] =  gf110_dmaeng_oclass;
-               device->oclass[NVDEV_ENGINE_FIFO   ] =  gk20a_fifo_oclass;
-               device->oclass[NVDEV_ENGINE_SW     ] =  gf100_sw_oclass;
-               device->oclass[NVDEV_ENGINE_GR     ] =  gk20a_gr_oclass;
-               device->oclass[NVDEV_ENGINE_CE2    ] = &gk104_ce2_oclass;
-               device->oclass[NVDEV_ENGINE_PM     ] = &gk104_pm_oclass;
-               device->oclass[NVDEV_SUBDEV_VOLT   ] = &gk20a_volt_oclass;
-               device->oclass[NVDEV_SUBDEV_PMU    ] =  gk20a_pmu_oclass;
-               break;
-       case 0xf0:
-               device->cname = "GK110";
-               device->oclass[NVDEV_SUBDEV_VBIOS  ] = &nouveau_bios_oclass;
-               device->oclass[NVDEV_SUBDEV_GPIO   ] =  gk104_gpio_oclass;
-               device->oclass[NVDEV_SUBDEV_I2C    ] =  gk104_i2c_oclass;
-               device->oclass[NVDEV_SUBDEV_FUSE   ] = &gf100_fuse_oclass;
-               device->oclass[NVDEV_SUBDEV_CLK    ] = &gk104_clk_oclass;
-               device->oclass[NVDEV_SUBDEV_THERM  ] = &gf110_therm_oclass;
-               device->oclass[NVDEV_SUBDEV_MXM    ] = &nv50_mxm_oclass;
-               device->oclass[NVDEV_SUBDEV_DEVINIT] =  gf100_devinit_oclass;
-               device->oclass[NVDEV_SUBDEV_MC     ] =  gf106_mc_oclass;
-               device->oclass[NVDEV_SUBDEV_BUS    ] =  gf100_bus_oclass;
-               device->oclass[NVDEV_SUBDEV_TIMER  ] = &nv04_timer_oclass;
-               device->oclass[NVDEV_SUBDEV_FB     ] =  gk104_fb_oclass;
-               device->oclass[NVDEV_SUBDEV_LTC    ] =  gk104_ltc_oclass;
-               device->oclass[NVDEV_SUBDEV_IBUS   ] = &gk104_ibus_oclass;
-               device->oclass[NVDEV_SUBDEV_INSTMEM] =  nv50_instmem_oclass;
-               device->oclass[NVDEV_SUBDEV_MMU    ] = &gf100_mmu_oclass;
-               device->oclass[NVDEV_SUBDEV_BAR    ] = &gf100_bar_oclass;
-               device->oclass[NVDEV_SUBDEV_PMU    ] =  gf110_pmu_oclass;
-               device->oclass[NVDEV_SUBDEV_VOLT   ] = &nv40_volt_oclass;
-               device->oclass[NVDEV_ENGINE_DMAOBJ ] =  gf110_dmaeng_oclass;
-               device->oclass[NVDEV_ENGINE_FIFO   ] =  gk104_fifo_oclass;
-               device->oclass[NVDEV_ENGINE_SW     ] =  gf100_sw_oclass;
-               device->oclass[NVDEV_ENGINE_GR     ] =  gk110_gr_oclass;
-               device->oclass[NVDEV_ENGINE_DISP   ] =  gk110_disp_oclass;
-               device->oclass[NVDEV_ENGINE_CE0    ] = &gk104_ce0_oclass;
-               device->oclass[NVDEV_ENGINE_CE1    ] = &gk104_ce1_oclass;
-               device->oclass[NVDEV_ENGINE_CE2    ] = &gk104_ce2_oclass;
-               device->oclass[NVDEV_ENGINE_MSVLD  ] = &gk104_msvld_oclass;
-               device->oclass[NVDEV_ENGINE_MSPDEC ] = &gk104_mspdec_oclass;
-               device->oclass[NVDEV_ENGINE_MSPPP  ] = &gf100_msppp_oclass;
-               device->oclass[NVDEV_ENGINE_PM     ] = &gk110_pm_oclass;
-               break;
-       case 0xf1:
-               device->cname = "GK110B";
-               device->oclass[NVDEV_SUBDEV_VBIOS  ] = &nouveau_bios_oclass;
-               device->oclass[NVDEV_SUBDEV_GPIO   ] =  gk104_gpio_oclass;
-               device->oclass[NVDEV_SUBDEV_I2C    ] =  gf110_i2c_oclass;
-               device->oclass[NVDEV_SUBDEV_FUSE   ] = &gf100_fuse_oclass;
-               device->oclass[NVDEV_SUBDEV_CLK    ] = &gk104_clk_oclass;
-               device->oclass[NVDEV_SUBDEV_THERM  ] = &gf110_therm_oclass;
-               device->oclass[NVDEV_SUBDEV_MXM    ] = &nv50_mxm_oclass;
-               device->oclass[NVDEV_SUBDEV_DEVINIT] =  gf100_devinit_oclass;
-               device->oclass[NVDEV_SUBDEV_MC     ] =  gf106_mc_oclass;
-               device->oclass[NVDEV_SUBDEV_BUS    ] =  gf100_bus_oclass;
-               device->oclass[NVDEV_SUBDEV_TIMER  ] = &nv04_timer_oclass;
-               device->oclass[NVDEV_SUBDEV_FB     ] =  gk104_fb_oclass;
-               device->oclass[NVDEV_SUBDEV_LTC    ] =  gk104_ltc_oclass;
-               device->oclass[NVDEV_SUBDEV_IBUS   ] = &gk104_ibus_oclass;
-               device->oclass[NVDEV_SUBDEV_INSTMEM] =  nv50_instmem_oclass;
-               device->oclass[NVDEV_SUBDEV_MMU    ] = &gf100_mmu_oclass;
-               device->oclass[NVDEV_SUBDEV_BAR    ] = &gf100_bar_oclass;
-               device->oclass[NVDEV_SUBDEV_PMU    ] =  gf110_pmu_oclass;
-               device->oclass[NVDEV_SUBDEV_VOLT   ] = &nv40_volt_oclass;
-               device->oclass[NVDEV_ENGINE_DMAOBJ ] =  gf110_dmaeng_oclass;
-               device->oclass[NVDEV_ENGINE_FIFO   ] =  gk104_fifo_oclass;
-               device->oclass[NVDEV_ENGINE_SW     ] =  gf100_sw_oclass;
-               device->oclass[NVDEV_ENGINE_GR     ] =  gk110b_gr_oclass;
-               device->oclass[NVDEV_ENGINE_DISP   ] =  gk110_disp_oclass;
-               device->oclass[NVDEV_ENGINE_CE0    ] = &gk104_ce0_oclass;
-               device->oclass[NVDEV_ENGINE_CE1    ] = &gk104_ce1_oclass;
-               device->oclass[NVDEV_ENGINE_CE2    ] = &gk104_ce2_oclass;
-               device->oclass[NVDEV_ENGINE_MSVLD  ] = &gk104_msvld_oclass;
-               device->oclass[NVDEV_ENGINE_MSPDEC ] = &gk104_mspdec_oclass;
-               device->oclass[NVDEV_ENGINE_MSPPP  ] = &gf100_msppp_oclass;
-               device->oclass[NVDEV_ENGINE_PM     ] = &gk110_pm_oclass;
-               break;
-       case 0x106:
-               device->cname = "GK208B";
-               device->oclass[NVDEV_SUBDEV_VBIOS  ] = &nouveau_bios_oclass;
-               device->oclass[NVDEV_SUBDEV_GPIO   ] =  gk104_gpio_oclass;
-               device->oclass[NVDEV_SUBDEV_I2C    ] =  gk104_i2c_oclass;
-               device->oclass[NVDEV_SUBDEV_FUSE   ] = &gf100_fuse_oclass;
-               device->oclass[NVDEV_SUBDEV_CLK    ] = &gk104_clk_oclass;
-               device->oclass[NVDEV_SUBDEV_THERM  ] = &gf110_therm_oclass;
-               device->oclass[NVDEV_SUBDEV_MXM    ] = &nv50_mxm_oclass;
-               device->oclass[NVDEV_SUBDEV_DEVINIT] =  gf100_devinit_oclass;
-               device->oclass[NVDEV_SUBDEV_MC     ] =  gk20a_mc_oclass;
-               device->oclass[NVDEV_SUBDEV_BUS    ] =  gf100_bus_oclass;
-               device->oclass[NVDEV_SUBDEV_TIMER  ] = &nv04_timer_oclass;
-               device->oclass[NVDEV_SUBDEV_FB     ] =  gk104_fb_oclass;
-               device->oclass[NVDEV_SUBDEV_LTC    ] =  gk104_ltc_oclass;
-               device->oclass[NVDEV_SUBDEV_IBUS   ] = &gk104_ibus_oclass;
-               device->oclass[NVDEV_SUBDEV_INSTMEM] =  nv50_instmem_oclass;
-               device->oclass[NVDEV_SUBDEV_MMU    ] = &gf100_mmu_oclass;
-               device->oclass[NVDEV_SUBDEV_BAR    ] = &gf100_bar_oclass;
-               device->oclass[NVDEV_SUBDEV_PMU    ] =  gk208_pmu_oclass;
-               device->oclass[NVDEV_SUBDEV_VOLT   ] = &nv40_volt_oclass;
-               device->oclass[NVDEV_ENGINE_DMAOBJ ] =  gf110_dmaeng_oclass;
-               device->oclass[NVDEV_ENGINE_FIFO   ] =  gk208_fifo_oclass;
-               device->oclass[NVDEV_ENGINE_SW     ] =  gf100_sw_oclass;
-               device->oclass[NVDEV_ENGINE_GR     ] =  gk208_gr_oclass;
-               device->oclass[NVDEV_ENGINE_DISP   ] =  gk110_disp_oclass;
-               device->oclass[NVDEV_ENGINE_CE0    ] = &gk104_ce0_oclass;
-               device->oclass[NVDEV_ENGINE_CE1    ] = &gk104_ce1_oclass;
-               device->oclass[NVDEV_ENGINE_CE2    ] = &gk104_ce2_oclass;
-               device->oclass[NVDEV_ENGINE_MSVLD  ] = &gk104_msvld_oclass;
-               device->oclass[NVDEV_ENGINE_MSPDEC ] = &gk104_mspdec_oclass;
-               device->oclass[NVDEV_ENGINE_MSPPP  ] = &gf100_msppp_oclass;
-               break;
-       case 0x108:
-               device->cname = "GK208";
-               device->oclass[NVDEV_SUBDEV_VBIOS  ] = &nouveau_bios_oclass;
-               device->oclass[NVDEV_SUBDEV_GPIO   ] =  gk104_gpio_oclass;
-               device->oclass[NVDEV_SUBDEV_I2C    ] =  gk104_i2c_oclass;
-               device->oclass[NVDEV_SUBDEV_FUSE   ] = &gf100_fuse_oclass;
-               device->oclass[NVDEV_SUBDEV_CLK    ] = &gk104_clk_oclass;
-               device->oclass[NVDEV_SUBDEV_THERM  ] = &gf110_therm_oclass;
-               device->oclass[NVDEV_SUBDEV_MXM    ] = &nv50_mxm_oclass;
-               device->oclass[NVDEV_SUBDEV_DEVINIT] =  gf100_devinit_oclass;
-               device->oclass[NVDEV_SUBDEV_MC     ] =  gk20a_mc_oclass;
-               device->oclass[NVDEV_SUBDEV_BUS    ] =  gf100_bus_oclass;
-               device->oclass[NVDEV_SUBDEV_TIMER  ] = &nv04_timer_oclass;
-               device->oclass[NVDEV_SUBDEV_FB     ] =  gk104_fb_oclass;
-               device->oclass[NVDEV_SUBDEV_LTC    ] =  gk104_ltc_oclass;
-               device->oclass[NVDEV_SUBDEV_IBUS   ] = &gk104_ibus_oclass;
-               device->oclass[NVDEV_SUBDEV_INSTMEM] =  nv50_instmem_oclass;
-               device->oclass[NVDEV_SUBDEV_MMU    ] = &gf100_mmu_oclass;
-               device->oclass[NVDEV_SUBDEV_BAR    ] = &gf100_bar_oclass;
-               device->oclass[NVDEV_SUBDEV_PMU    ] =  gk208_pmu_oclass;
-               device->oclass[NVDEV_SUBDEV_VOLT   ] = &nv40_volt_oclass;
-               device->oclass[NVDEV_ENGINE_DMAOBJ ] =  gf110_dmaeng_oclass;
-               device->oclass[NVDEV_ENGINE_FIFO   ] =  gk208_fifo_oclass;
-               device->oclass[NVDEV_ENGINE_SW     ] =  gf100_sw_oclass;
-               device->oclass[NVDEV_ENGINE_GR     ] =  gk208_gr_oclass;
-               device->oclass[NVDEV_ENGINE_DISP   ] =  gk110_disp_oclass;
-               device->oclass[NVDEV_ENGINE_CE0    ] = &gk104_ce0_oclass;
-               device->oclass[NVDEV_ENGINE_CE1    ] = &gk104_ce1_oclass;
-               device->oclass[NVDEV_ENGINE_CE2    ] = &gk104_ce2_oclass;
-               device->oclass[NVDEV_ENGINE_MSVLD  ] = &gk104_msvld_oclass;
-               device->oclass[NVDEV_ENGINE_MSPDEC ] = &gk104_mspdec_oclass;
-               device->oclass[NVDEV_ENGINE_MSPPP  ] = &gf100_msppp_oclass;
-               break;
-       default:
-               nv_fatal(device, "unknown Kepler chipset\n");
-               return -EINVAL;
-       }
-
-       return 0;
-}
index 035fd5b9cfc3dbed7a1be996a969f70fcac783ad..8d3590e7bd875c6f65a396f4dc5b2c6bf1998221 100644 (file)
@@ -1,8 +1,16 @@
 #ifndef __NVKM_DEVICE_PRIV_H__
 #define __NVKM_DEVICE_PRIV_H__
+#include <core/device.h>
 
-#include <engine/device.h>
-
-extern struct nouveau_oclass nouveau_control_oclass[];
+extern struct nvkm_oclass nvkm_control_oclass[];
 
+int nv04_identify(struct nvkm_device *);
+int nv10_identify(struct nvkm_device *);
+int nv20_identify(struct nvkm_device *);
+int nv30_identify(struct nvkm_device *);
+int nv40_identify(struct nvkm_device *);
+int nv50_identify(struct nvkm_device *);
+int gf100_identify(struct nvkm_device *);
+int gk104_identify(struct nvkm_device *);
+int gm100_identify(struct nvkm_device *);
 #endif
index 131619bda22ffe7a275e702e6aa4fe81f19547d5..d852bd6de57139a4bb2b4c8896ed986bdacbaa95 100644 (file)
@@ -1,7 +1,8 @@
 #ifndef __NV40_GR_H__
 #define __NV40_GR_H__
 #include <engine/gr.h>
-#include <engine/device.h>
+
+#include <core/device.h>
 struct nvkm_gpuobj;
 
 /* returns 1 if device is one of the nv4x using the 0x4497 object class,