Commit 9719047b authored by Ben Skeggs's avatar Ben Skeggs

drm/nouveau/device: namespace + nvidia gpu names (no binary change)

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: default avatarBen Skeggs <bskeggs@redhat.com>
parent a56866a9
...@@ -50,7 +50,7 @@ void nvif_device_ref(struct nvif_device *, struct nvif_device **); ...@@ -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_wait_cb(a,b,c) nv_wait_cb(nvxx_timer(a), (b), (c))
#define nvxx_therm(a) nouveau_therm(nvxx_device(a)) #define nvxx_therm(a) nouveau_therm(nvxx_device(a))
#include <engine/device.h> #include <core/device.h>
#include <engine/fifo.h> #include <engine/fifo.h>
#include <engine/gr.h> #include <engine/gr.h>
#include <engine/sw.h> #include <engine/sw.h>
......
...@@ -84,4 +84,18 @@ nv_device_resource_len(struct nvkm_device *device, unsigned int bar); ...@@ -84,4 +84,18 @@ nv_device_resource_len(struct nvkm_device *device, unsigned int bar);
int int
nv_device_get_irq(struct nvkm_device *device, bool stall); 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 #endif
...@@ -253,5 +253,7 @@ ...@@ -253,5 +253,7 @@
#define nouveau_gr nvkm_gr #define nouveau_gr nvkm_gr
#define nouveau_sw nvkm_sw #define nouveau_sw nvkm_sw
#define nouveau_sw_chan nvkm_sw_chan #define nouveau_sw_chan nvkm_sw_chan
#define nouveau_device_create nvkm_device_create
#define nouveau_device_create_ nvkm_device_create_
#endif #endif
...@@ -318,7 +318,7 @@ static int nouveau_drm_probe(struct pci_dev *pdev, ...@@ -318,7 +318,7 @@ static int nouveau_drm_probe(struct pci_dev *pdev,
remove_conflicting_framebuffers(aper, "nouveaufb", boot); remove_conflicting_framebuffers(aper, "nouveaufb", boot);
kfree(aper); 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_pci_name(pdev), pci_name(pdev),
nouveau_config, nouveau_debug, &device); nouveau_config, nouveau_debug, &device);
if (ret) if (ret)
...@@ -1056,7 +1056,7 @@ nouveau_platform_device_create_(struct platform_device *pdev, int size, ...@@ -1056,7 +1056,7 @@ nouveau_platform_device_create_(struct platform_device *pdev, int size,
struct drm_device *drm; struct drm_device *drm;
int err; int err;
err = nouveau_device_create_(pdev, NOUVEAU_BUS_PLATFORM, err = nouveau_device_create_(pdev, NVKM_BUS_PLATFORM,
nouveau_platform_name(pdev), nouveau_platform_name(pdev),
dev_name(&pdev->dev), nouveau_config, dev_name(&pdev->dev), nouveau_config,
nouveau_debug, size, pobject); nouveau_debug, size, pobject);
......
...@@ -7,6 +7,6 @@ nvkm-y += nvkm/engine/device/nv20.o ...@@ -7,6 +7,6 @@ nvkm-y += nvkm/engine/device/nv20.o
nvkm-y += nvkm/engine/device/nv30.o nvkm-y += nvkm/engine/device/nv30.o
nvkm-y += nvkm/engine/device/nv40.o nvkm-y += nvkm/engine/device/nv40.o
nvkm-y += nvkm/engine/device/nv50.o nvkm-y += nvkm/engine/device/nv50.o
nvkm-y += nvkm/engine/device/nvc0.o nvkm-y += nvkm/engine/device/gf100.o
nvkm-y += nvkm/engine/device/nve0.o nvkm-y += nvkm/engine/device/gk104.o
nvkm-y += nvkm/engine/device/gm100.o nvkm-y += nvkm/engine/device/gm100.o
...@@ -21,14 +21,15 @@ ...@@ -21,14 +21,15 @@
* *
* Authors: Ben Skeggs * Authors: Ben Skeggs
*/ */
#include "acpi.h" #include "acpi.h"
#include <core/device.h>
#ifdef CONFIG_ACPI #ifdef CONFIG_ACPI
static int static int
nvkm_acpi_ntfy(struct notifier_block *nb, unsigned long val, void *data) 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); container_of(nb, typeof(*device), acpi.nb);
struct acpi_bus_event *info = data; struct acpi_bus_event *info = data;
...@@ -40,7 +41,7 @@ nvkm_acpi_ntfy(struct notifier_block *nb, unsigned long val, void *data) ...@@ -40,7 +41,7 @@ nvkm_acpi_ntfy(struct notifier_block *nb, unsigned long val, void *data)
#endif #endif
int int
nvkm_acpi_fini(struct nouveau_device *device, bool suspend) nvkm_acpi_fini(struct nvkm_device *device, bool suspend)
{ {
#ifdef CONFIG_ACPI #ifdef CONFIG_ACPI
unregister_acpi_notifier(&device->acpi.nb); unregister_acpi_notifier(&device->acpi.nb);
...@@ -49,7 +50,7 @@ nvkm_acpi_fini(struct nouveau_device *device, bool suspend) ...@@ -49,7 +50,7 @@ nvkm_acpi_fini(struct nouveau_device *device, bool suspend)
} }
int int
nvkm_acpi_init(struct nouveau_device *device) nvkm_acpi_init(struct nvkm_device *device)
{ {
#ifdef CONFIG_ACPI #ifdef CONFIG_ACPI
device->acpi.nb.notifier_call = nvkm_acpi_ntfy; device->acpi.nb.notifier_call = nvkm_acpi_ntfy;
......
#ifndef __NVKM_DEVICE_ACPI_H__ #ifndef __NVKM_DEVICE_ACPI_H__
#define __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 nvkm_device *);
int nvkm_acpi_fini(struct nvkm_device *, bool);
int nvkm_acpi_init(struct nouveau_device *);
int nvkm_acpi_fini(struct nouveau_device *, bool);
#endif #endif
...@@ -21,25 +21,22 @@ ...@@ -21,25 +21,22 @@
* *
* Authors: Ben Skeggs <bskeggs@redhat.com> * Authors: Ben Skeggs <bskeggs@redhat.com>
*/ */
#include "priv.h"
#include <core/client.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 <subdev/clk.h>
#include "priv.h" #include <nvif/class.h>
#include <nvif/ioctl.h>
#include <nvif/unpack.h>
static int static int
nouveau_control_mthd_pstate_info(struct nouveau_object *object, nvkm_control_mthd_pstate_info(struct nvkm_object *object, void *data, u32 size)
void *data, u32 size)
{ {
union { union {
struct nvif_control_pstate_info_v0 v0; struct nvif_control_pstate_info_v0 v0;
} *args = data; } *args = data;
struct nouveau_clk *clk = nouveau_clk(object); struct nvkm_clk *clk = nvkm_clk(object);
int ret; int ret;
nv_ioctl(object, "control pstate info size %d\n", size); nv_ioctl(object, "control pstate info size %d\n", size);
...@@ -67,16 +64,15 @@ nouveau_control_mthd_pstate_info(struct nouveau_object *object, ...@@ -67,16 +64,15 @@ nouveau_control_mthd_pstate_info(struct nouveau_object *object,
} }
static int static int
nouveau_control_mthd_pstate_attr(struct nouveau_object *object, nvkm_control_mthd_pstate_attr(struct nvkm_object *object, void *data, u32 size)
void *data, u32 size)
{ {
union { union {
struct nvif_control_pstate_attr_v0 v0; struct nvif_control_pstate_attr_v0 v0;
} *args = data; } *args = data;
struct nouveau_clk *clk = nouveau_clk(object); struct nvkm_clk *clk = nvkm_clk(object);
struct nouveau_domain *domain; struct nvkm_domain *domain;
struct nouveau_pstate *pstate; struct nvkm_pstate *pstate;
struct nouveau_cstate *cstate; struct nvkm_cstate *cstate;
int i = 0, j = -1; int i = 0, j = -1;
u32 lo, hi; u32 lo, hi;
int ret; int ret;
...@@ -141,13 +137,12 @@ nouveau_control_mthd_pstate_attr(struct nouveau_object *object, ...@@ -141,13 +137,12 @@ nouveau_control_mthd_pstate_attr(struct nouveau_object *object,
} }
static int static int
nouveau_control_mthd_pstate_user(struct nouveau_object *object, nvkm_control_mthd_pstate_user(struct nvkm_object *object, void *data, u32 size)
void *data, u32 size)
{ {
union { union {
struct nvif_control_pstate_user_v0 v0; struct nvif_control_pstate_user_v0 v0;
} *args = data; } *args = data;
struct nouveau_clk *clk = nouveau_clk(object); struct nvkm_clk *clk = nvkm_clk(object);
int ret; int ret;
nv_ioctl(object, "control pstate user size %d\n", size); nv_ioctl(object, "control pstate user size %d\n", size);
...@@ -161,45 +156,44 @@ nouveau_control_mthd_pstate_user(struct nouveau_object *object, ...@@ -161,45 +156,44 @@ nouveau_control_mthd_pstate_user(struct nouveau_object *object,
return ret; return ret;
if (args->v0.pwrsrc >= 0) { 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 { } else {
ret |= nouveau_clk_ustate(clk, args->v0.ustate, 0); ret |= nvkm_clk_ustate(clk, args->v0.ustate, 0);
ret |= nouveau_clk_ustate(clk, args->v0.ustate, 1); ret |= nvkm_clk_ustate(clk, args->v0.ustate, 1);
} }
return ret; return ret;
} }
static int static int
nouveau_control_mthd(struct nouveau_object *object, u32 mthd, nvkm_control_mthd(struct nvkm_object *object, u32 mthd, void *data, u32 size)
void *data, u32 size)
{ {
switch (mthd) { switch (mthd) {
case NVIF_CONTROL_PSTATE_INFO: 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: 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: case NVIF_CONTROL_PSTATE_USER:
return nouveau_control_mthd_pstate_user(object, data, size); return nvkm_control_mthd_pstate_user(object, data, size);
default: default:
break; break;
} }
return -EINVAL; return -EINVAL;
} }
static struct nouveau_ofuncs static struct nvkm_ofuncs
nouveau_control_ofuncs = { nvkm_control_ofuncs = {
.ctor = _nouveau_object_ctor, .ctor = _nvkm_object_ctor,
.dtor = nouveau_object_destroy, .dtor = nvkm_object_destroy,
.init = nouveau_object_init, .init = nvkm_object_init,
.fini = nouveau_object_fini, .fini = nvkm_object_fini,
.mthd = nouveau_control_mthd, .mthd = nvkm_control_mthd,
}; };
struct nouveau_oclass struct nvkm_oclass
nouveau_control_oclass[] = { nvkm_control_oclass[] = {
{ .handle = NVIF_IOCTL_NEW_V0_CONTROL, { .handle = NVIF_IOCTL_NEW_V0_CONTROL,
.ofuncs = &nouveau_control_ofuncs .ofuncs = &nvkm_control_ofuncs
}, },
{} {}
}; };
...@@ -21,6 +21,7 @@ ...@@ -21,6 +21,7 @@
* *
* Authors: Ben Skeggs * Authors: Ben Skeggs
*/ */
#include "priv.h"
#include <subdev/bios.h> #include <subdev/bios.h>
#include <subdev/bus.h> #include <subdev/bus.h>
...@@ -42,7 +43,6 @@ ...@@ -42,7 +43,6 @@
#include <subdev/pmu.h> #include <subdev/pmu.h>
#include <subdev/volt.h> #include <subdev/volt.h>
#include <engine/device.h>
#include <engine/dmaobj.h> #include <engine/dmaobj.h>
#include <engine/fifo.h> #include <engine/fifo.h>
#include <engine/sw.h> #include <engine/sw.h>
...@@ -56,12 +56,12 @@ ...@@ -56,12 +56,12 @@
#include <engine/pm.h> #include <engine/pm.h>
int int
nvc0_identify(struct nouveau_device *device) gf100_identify(struct nvkm_device *device)
{ {
switch (device->chipset) { switch (device->chipset) {
case 0xc0: case 0xc0:
device->cname = "GF100"; device->cname = "GF100";
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_GPIO ] = g94_gpio_oclass;
device->oclass[NVDEV_SUBDEV_I2C ] = g94_i2c_oclass; device->oclass[NVDEV_SUBDEV_I2C ] = g94_i2c_oclass;
device->oclass[NVDEV_SUBDEV_FUSE ] = &gf100_fuse_oclass; device->oclass[NVDEV_SUBDEV_FUSE ] = &gf100_fuse_oclass;
...@@ -94,7 +94,7 @@ nvc0_identify(struct nouveau_device *device) ...@@ -94,7 +94,7 @@ nvc0_identify(struct nouveau_device *device)
break; break;
case 0xc4: case 0xc4:
device->cname = "GF104"; device->cname = "GF104";
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_GPIO ] = g94_gpio_oclass;
device->oclass[NVDEV_SUBDEV_I2C ] = g94_i2c_oclass; device->oclass[NVDEV_SUBDEV_I2C ] = g94_i2c_oclass;
device->oclass[NVDEV_SUBDEV_FUSE ] = &gf100_fuse_oclass; device->oclass[NVDEV_SUBDEV_FUSE ] = &gf100_fuse_oclass;
...@@ -127,7 +127,7 @@ nvc0_identify(struct nouveau_device *device) ...@@ -127,7 +127,7 @@ nvc0_identify(struct nouveau_device *device)
break; break;
case 0xc3: case 0xc3:
device->cname = "GF106"; device->cname = "GF106";
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_GPIO ] = g94_gpio_oclass;
device->oclass[NVDEV_SUBDEV_I2C ] = g94_i2c_oclass; device->oclass[NVDEV_SUBDEV_I2C ] = g94_i2c_oclass;
device->oclass[NVDEV_SUBDEV_FUSE ] = &gf100_fuse_oclass; device->oclass[NVDEV_SUBDEV_FUSE ] = &gf100_fuse_oclass;
...@@ -159,7 +159,7 @@ nvc0_identify(struct nouveau_device *device) ...@@ -159,7 +159,7 @@ nvc0_identify(struct nouveau_device *device)
break; break;
case 0xce: case 0xce:
device->cname = "GF114"; device->cname = "GF114";
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_GPIO ] = g94_gpio_oclass;
device->oclass[NVDEV_SUBDEV_I2C ] = g94_i2c_oclass; device->oclass[NVDEV_SUBDEV_I2C ] = g94_i2c_oclass;
device->oclass[NVDEV_SUBDEV_FUSE ] = &gf100_fuse_oclass; device->oclass[NVDEV_SUBDEV_FUSE ] = &gf100_fuse_oclass;
...@@ -192,7 +192,7 @@ nvc0_identify(struct nouveau_device *device) ...@@ -192,7 +192,7 @@ nvc0_identify(struct nouveau_device *device)
break; break;
case 0xcf: case 0xcf:
device->cname = "GF116"; device->cname = "GF116";
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_GPIO ] = g94_gpio_oclass;
device->oclass[NVDEV_SUBDEV_I2C ] = g94_i2c_oclass; device->oclass[NVDEV_SUBDEV_I2C ] = g94_i2c_oclass;
device->oclass[NVDEV_SUBDEV_FUSE ] = &gf100_fuse_oclass; device->oclass[NVDEV_SUBDEV_FUSE ] = &gf100_fuse_oclass;
...@@ -224,7 +224,7 @@ nvc0_identify(struct nouveau_device *device) ...@@ -224,7 +224,7 @@ nvc0_identify(struct nouveau_device *device)
break; break;
case 0xc1: case 0xc1:
device->cname = "GF108"; device->cname = "GF108";
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_GPIO ] = g94_gpio_oclass;
device->oclass[NVDEV_SUBDEV_I2C ] = g94_i2c_oclass; device->oclass[NVDEV_SUBDEV_I2C ] = g94_i2c_oclass;
device->oclass[NVDEV_SUBDEV_FUSE ] = &gf100_fuse_oclass; device->oclass[NVDEV_SUBDEV_FUSE ] = &gf100_fuse_oclass;
...@@ -256,7 +256,7 @@ nvc0_identify(struct nouveau_device *device) ...@@ -256,7 +256,7 @@ nvc0_identify(struct nouveau_device *device)
break; break;
case 0xc8: case 0xc8:
device->cname = "GF110"; device->cname = "GF110";
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_GPIO ] = g94_gpio_oclass;
device->oclass[NVDEV_SUBDEV_I2C ] = g94_i2c_oclass; device->oclass[NVDEV_SUBDEV_I2C ] = g94_i2c_oclass;
device->oclass[NVDEV_SUBDEV_FUSE ] = &gf100_fuse_oclass; device->oclass[NVDEV_SUBDEV_FUSE ] = &gf100_fuse_oclass;
...@@ -289,7 +289,7 @@ nvc0_identify(struct nouveau_device *device) ...@@ -289,7 +289,7 @@ nvc0_identify(struct nouveau_device *device)
break; break;
case 0xd9: case 0xd9:
device->cname = "GF119"; device->cname = "GF119";
device->oclass[NVDEV_SUBDEV_VBIOS ] = &nouveau_bios_oclass; device->oclass[NVDEV_SUBDEV_VBIOS ] = &nvkm_bios_oclass;
device->oclass[NVDEV_SUBDEV_GPIO ] = gf110_gpio_oclass; device->oclass[NVDEV_SUBDEV_GPIO ] = gf110_gpio_oclass;
device->oclass[NVDEV_SUBDEV_I2C ] = gf110_i2c_oclass; device->oclass[NVDEV_SUBDEV_I2C ] = gf110_i2c_oclass;
device->oclass[NVDEV_SUBDEV_FUSE ] = &gf100_fuse_oclass; device->oclass[NVDEV_SUBDEV_FUSE ] = &gf100_fuse_oclass;
...@@ -321,7 +321,7 @@ nvc0_identify(struct nouveau_device *device) ...@@ -321,7 +321,7 @@ nvc0_identify(struct nouveau_device *device)
break; break;
case 0xd7: case 0xd7:
device->cname = "GF117"; device->cname = "GF117";
device->oclass[NVDEV_SUBDEV_VBIOS ] = &nouveau_bios_oclass; device->oclass[NVDEV_SUBDEV_VBIOS ] = &nvkm_bios_oclass;
device->oclass[NVDEV_SUBDEV_GPIO ] = gf110_gpio_oclass; device->oclass[NVDEV_SUBDEV_GPIO ] = gf110_gpio_oclass;
device->oclass[NVDEV_SUBDEV_I2C ] = gf117_i2c_oclass; device->oclass[NVDEV_SUBDEV_I2C ] = gf117_i2c_oclass;
device->oclass[NVDEV_SUBDEV_FUSE ] = &gf100_fuse_oclass; device->oclass[NVDEV_SUBDEV_FUSE ] = &gf100_fuse_oclass;
...@@ -355,4 +355,4 @@ nvc0_identify(struct nouveau_device *device) ...@@ -355,4 +355,4 @@ nvc0_identify(struct nouveau_device *device)
} }
return 0; return 0;
} }
...@@ -21,6 +21,7 @@ ...@@ -21,6 +21,7 @@
* *
* Authors: Ben Skeggs * Authors: Ben Skeggs
*/ */
#include "priv.h"
#include <subdev/bios.h> #include <subdev/bios.h>
#include <subdev/bus.h> #include <subdev/bus.h>
...@@ -42,7 +43,6 @@ ...@@ -42,7 +43,6 @@
#include <subdev/pmu.h> #include <subdev/pmu.h>
#include <subdev/volt.h> #include <subdev/volt.h>
#include <engine/device.h>
#include <engine/dmaobj.h> #include <engine/dmaobj.h>
#include <engine/fifo.h> #include <engine/fifo.h>
#include <engine/sw.h> #include <engine/sw.h>
...@@ -56,12 +56,12 @@ ...@@ -56,12 +56,12 @@
#include <engine/pm.h> #include <engine/pm.h>
int int
nve0_identify(struct nouveau_device *device) gk104_identify(struct nvkm_device *device)
{ {
switch (device->chipset) { switch (device->chipset) {
case 0xe4: case 0xe4:
device->cname = "GK104"; device->cname = "GK104";
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_GPIO ] = gk104_gpio_oclass;
device->oclass[NVDEV_SUBDEV_I2C ] = gk104_i2c_oclass; device->oclass[NVDEV_SUBDEV_I2C ] = gk104_i2c_oclass;
device->oclass[NVDEV_SUBDEV_FUSE ] = &gf100_fuse_oclass; device->oclass[NVDEV_SUBDEV_FUSE ] = &gf100_fuse_oclass;
...@@ -95,7 +95,7 @@ nve0_identify(struct nouveau_device *device) ...@@ -95,7 +95,7 @@ nve0_identify(struct nouveau_device *device)
break; break;
case 0xe7: case 0xe7:
device->cname = "GK107"; device->cname = "GK107";
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_GPIO ] = gk104_gpio_oclass;
device->oclass[NVDEV_SUBDEV_I2C ] = gk104_i2c_oclass; device->oclass[NVDEV_SUBDEV_I2C ] = gk104_i2c_oclass;
device->oclass[NVDEV_SUBDEV_FUSE ] = &gf100_fuse_oclass; device->oclass[NVDEV_SUBDEV_FUSE ] = &gf100_fuse_oclass;
...@@ -129,7 +129,7 @@ nve0_identify(struct nouveau_device *device) ...@@ -129,7 +129,7 @@ nve0_identify(struct nouveau_device *device)
break; break;
case 0xe6: case 0xe6:
device->cname = "GK106"; device->cname = "GK106";
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_GPIO ] = gk104_gpio_oclass;
device->oclass[NVDEV_SUBDEV_I2C ] = gk104_i2c_oclass; device->oclass[NVDEV_SUBDEV_I2C ] = gk104_i2c_oclass;
device->oclass[NVDEV_SUBDEV_FUSE ] = &gf100_fuse_oclass; device->oclass[NVDEV_SUBDEV_FUSE ] = &gf100_fuse_oclass;
...@@ -185,7 +185,7 @@ nve0_identify(struct nouveau_device *device) ...@@ -185,7 +185,7 @@ nve0_identify(struct nouveau_device *device)
break; break;
case 0xf0: case 0xf0:
device->cname = "GK110"; device->cname = "GK110";
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_GPIO ] = gk104_gpio_oclass;
device->oclass[NVDEV_SUBDEV_I2C ] = gk104_i2c_oclass; device->oclass[NVDEV_SUBDEV_I2C ] = gk104_i2c_oclass;
device->oclass[NVDEV_SUBDEV_FUSE ] = &gf100_fuse_oclass; device->oclass[NVDEV_SUBDEV_FUSE ] = &gf100_fuse_oclass;
...@@ -219,7 +219,7 @@ nve0_identify(struct nouveau_device *device) ...@@ -219,7 +219,7 @@ nve0_identify(struct nouveau_device *device)
break; break;
case 0xf1: case 0xf1:
device->cname = "GK110B"; device->cname = "GK110B";
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_GPIO ] = gk104_gpio_oclass;
device->oclass[NVDEV_SUBDEV_I2C ] = gf110_i2c_oclass; device->oclass[NVDEV_SUBDEV_I2C ] = gf110_i2c_oclass;
device->oclass[NVDEV_SUBDEV_FUSE ] = &gf100_fuse_oclass; device->oclass[NVDEV_SUBDEV_FUSE ] = &gf100_fuse_oclass;
...@@ -253,7 +253,7 @@ nve0_identify(struct nouveau_device *device) ...@@ -253,7 +253,7 @@ nve0_identify(struct nouveau_device *device)
break; break;
case 0x106: case 0x106:
device->cname = "GK208B"; device->cname = "GK208B";
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_GPIO ] = gk104_gpio_oclass;
device->oclass[NVDEV_SUBDEV_I2C ] = gk104_i2c_oclass; device->oclass[NVDEV_SUBDEV_I2C ] = gk104_i2c_oclass;
device->oclass[NVDEV_SUBDEV_FUSE ] = &gf100_fuse_oclass; device->oclass[NVDEV_SUBDEV_FUSE ] = &gf100_fuse_oclass;
...@@ -286,7 +286,7 @@ nve0_identify(struct nouveau_device *device) ...@@ -286,7 +286,7 @@ nve0_identify(struct nouveau_device *device)
break; break;
case 0x108: case 0x108:
device->cname = "GK208"; device->cname = "GK208";
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_GPIO ] = gk104_gpio_oclass;
device->oclass[NVDEV_SUBDEV_I2C ] = gk104_i2c_oclass; device->oclass[NVDEV_SUBDEV_I2C ] = gk104_i2c_oclass;
device->oclass[NVDEV_SUBDEV_FUSE ] = &gf100_fuse_oclass; device->oclass[NVDEV_SUBDEV_FUSE ] = &gf100_fuse_oclass;
......
...@@ -21,6 +21,7 @@ ...@@ -21,6 +21,7 @@
* *
* Authors: Ben Skeggs * Authors: Ben Skeggs
*/ */
#include "priv.h"
#include <subdev/bios.h> #include <subdev/bios.h>
#include <subdev/bus.h> #include <subdev/bus.h>
...@@ -42,7 +43,6 @@ ...@@ -42,7 +43,6 @@
#include <subdev/pmu.h> #include <subdev/pmu.h>
#include <subdev/volt.h> #include <subdev/volt.h>
#include <engine/device.h>
#include <engine/dmaobj.h> #include <engine/dmaobj.h>
#include <engine/fifo.h> #include <engine/fifo.h>
#include <engine/sw.h> #include <engine/sw.h>
...@@ -56,12 +56,12 @@ ...@@ -56,12 +56,12 @@
#include <engine/pm.h> #include <engine/pm.h>
int int
gm100_identify(struct nouveau_device *device) gm100_identify(struct nvkm_device *device)
{ {
switch (device->chipset) { switch (device->chipset) {
case 0x117: case 0x117:
device->cname = "GM107"; 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_GPIO ] = gk104_gpio_oclass;
device->oclass[NVDEV_SUBDEV_I2C ] = gf110_i2c_oclass; device->oclass[NVDEV_SUBDEV_I2C ] = gf110_i2c_oclass;
device->oclass[NVDEV_SUBDEV_FUSE ] = &gm107_fuse_oclass; device->oclass[NVDEV_SUBDEV_FUSE ] = &gm107_fuse_oclass;
...@@ -101,7 +101,7 @@ gm100_identify(struct nouveau_device *device) ...@@ -101,7 +101,7 @@ gm100_identify(struct nouveau_device *device)
break; break;
case 0x124: case 0x124:
device->cname = "GM204"; 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_GPIO ] = gk104_gpio_oclass;
device->oclass[NVDEV_SUBDEV_I2C ] = gm204_i2c_oclass; device->oclass[NVDEV_SUBDEV_I2C ] = gm204_i2c_oclass;
device->oclass[NVDEV_SUBDEV_FUSE ] = &gm107_fuse_oclass; device->oclass[NVDEV_SUBDEV_FUSE ] = &gm107_fuse_oclass;
......
...@@ -21,6 +21,7 @@ ...@@ -21,6 +21,7 @@
* *
* Authors: Ben Skeggs * Authors: Ben Skeggs
*/ */
#include "priv.h"
#include <subdev/bios.h> #include <subdev/bios.h>
#include <subdev/bus.h> #include <subdev/bus.h>
...@@ -33,7 +34,6 @@ ...@@ -33,7 +34,6 @@
#include <subdev/instmem.h> #include <subdev/instmem.h>
#include <subdev/mmu.h> #include <subdev/mmu.h>
#include <engine/device.h>
#include <engine/dmaobj.h> #include <engine/dmaobj.h>
#include <engine/fifo.h> #include <engine/fifo.h>
#include <engine/sw.h> #include <engine/sw.h>
...@@ -41,12 +41,12 @@ ...@@ -41,12 +41,12 @@
#include <engine/disp.h> #include <engine/disp.h>
int int
nv04_identify(struct nouveau_device *device) nv04_identify(struct nvkm_device *device)
{ {
switch (device->chipset) { switch (device->chipset) {
case 0x04: case 0x04:
device->cname = "NV04"; 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_I2C ] = nv04_i2c_oclass;
device->oclass[NVDEV_SUBDEV_CLK ] = &nv04_clk_oclass; device->oclass[NVDEV_SUBDEV_CLK ] = &nv04_clk_oclass;
device->oclass[NVDEV_SUBDEV_DEVINIT] = nv04_devinit_oclass; device->oclass[NVDEV_SUBDEV_DEVINIT] = nv04_devinit_oclass;
...@@ -64,7 +64,7 @@ nv04_identify(struct nouveau_device *device) ...@@ -64,7 +64,7 @@ nv04_identify(struct nouveau_device *device)
break; break;
case 0x05: case 0x05:
device->cname = "NV05"; 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_I2C ] = nv04_i2c_oclass;
device->oclass[NVDEV_SUBDEV_CLK ] = &nv04_clk_oclass; device->oclass[NVDEV_SUBDEV_CLK ] = &nv04_clk_oclass;
device->oclass[NVDEV_SUBDEV_DEVINIT] = nv05_devinit_oclass; device->oclass[NVDEV_SUBDEV_DEVINIT] = nv05_devinit_oclass;
......
...@@ -21,6 +21,7 @@ ...@@ -21,6 +21,7 @@
* *
* Authors: Ben Skeggs * Authors: Ben Skeggs
*/ */
#include "priv.h"
#include <subdev/bios.h> #include <subdev/bios.h>
#include <subdev/bus.h> #include <subdev/bus.h>
...@@ -34,7 +35,6 @@ ...@@ -34,7 +35,6 @@
#include <subdev/instmem.h> #include <subdev/instmem.h>
#include <subdev/mmu.h> #include <subdev/mmu.h>
#include <engine/device.h>
#include <engine/dmaobj.h> #include <engine/dmaobj.h>
#include <engine/fifo.h> #include <engine/fifo.h>
#include <engine/sw.h> #include <engine/sw.h>
...@@ -42,12 +42,12 @@ ...@@ -42,12 +42,12 @@
#include <engine/disp.h> #include <engine/disp.h>
int int
nv10_identify(struct nouveau_device *device) nv10_identify(struct nvkm_device *device)
{ {
switch (device->chipset) { switch (device->chipset) {
case 0x10: case 0x10:
device->cname = "NV10"; 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_GPIO ] = nv10_gpio_oclass;
device->oclass[NVDEV_SUBDEV_I2C ] = nv04_i2c_oclass; device->oclass[NVDEV_SUBDEV_I2C ] = nv04_i2c_oclass;
device->oclass[NVDEV_SUBDEV_CLK ] = &nv04_clk_oclass; device->oclass[NVDEV_SUBDEV_CLK ] = &nv04_clk_oclass;
...@@ -64,7 +64,7 @@ nv10_identify(struct nouveau_device *device) ...@@ -64,7 +64,7 @@ nv10_identify(struct nouveau_device *device)
break; break;
case 0x15: case 0x15:
device->cname = "NV15"; 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_GPIO ] = nv10_gpio_oclass;
device->oclass[NVDEV_SUBDEV_I2C ] = nv04_i2c_oclass; device->oclass[NVDEV_SUBDEV_I2C ] = nv04_i2c_oclass;
device->oclass[NVDEV_SUBDEV_CLK ] = &nv04_clk_oclass; device->oclass[NVDEV_SUBDEV_CLK ] = &nv04_clk_oclass;
...@@ -83,7 +83,7 @@ nv10_identify(struct nouveau_device *device) ...@@ -83,7 +83,7 @@ nv10_identify(struct nouveau_device *device)
break; break;
case 0x16: case 0x16:
device->cname = "NV16"; 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_GPIO ] = nv10_gpio_oclass;
device->oclass[NVDEV_SUBDEV_I2C ] = nv04_i2c_oclass; device->oclass[NVDEV_SUBDEV_I2C ] = nv04_i2c_oclass;
device->oclass[NVDEV_SUBDEV_CLK ] = &nv04_clk_oclass; device->oclass[NVDEV_SUBDEV_CLK ] = &nv04_clk_oclass;
...@@ -102,7 +102,7 @@ nv10_identify(struct nouveau_device *device) ...@@ -102,7 +102,7 @@ nv10_identify(struct nouveau_device *device)
break; break;
case 0x1a: case 0x1a:
device->cname = "nForce"; 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_GPIO ] = nv10_gpio_oclass;
device->oclass[NVDEV_SUBDEV_I2C ] = nv04_i2c_oclass; device->oclass[NVDEV_SUBDEV_I2C ] = nv04_i2c_oclass;
device->oclass[NVDEV_SUBDEV_CLK ] = &nv04_clk_oclass; device->oclass[NVDEV_SUBDEV_CLK ] = &nv04_clk_oclass;
...@@ -121,7 +121,7 @@ nv10_identify(struct nouveau_device *device) ...@@ -121,7 +121,7 @@ nv10_identify(struct nouveau_device *device)
break; break;
case 0x11: case 0x11:
device->cname = "NV11"; 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_GPIO ] = nv10_gpio_oclass;
device->oclass[NVDEV_SUBDEV_I2C ] = nv04_i2c_oclass; device->oclass[NVDEV_SUBDEV_I2C ] = nv04_i2c_oclass;
device->oclass[NVDEV_SUBDEV_CLK ] = &nv04_clk_oclass; device->oclass[NVDEV_SUBDEV_CLK ] = &nv04_clk_oclass;
...@@ -140,7 +140,7 @@ nv10_identify(struct nouveau_device *device) ...@@ -140,7 +140,7 @@ nv10_identify(struct nouveau_device *device)
break; break;
case 0x17: case 0x17:
device->cname = "NV17"; 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_GPIO ] = nv10_gpio_oclass;
device->oclass[NVDEV_SUBDEV_I2C ] = nv04_i2c_oclass; device->oclass[NVDEV_SUBDEV_I2C ] = nv04_i2c_oclass;
device->oclass[NVDEV_SUBDEV_CLK ] = &nv04_clk_oclass; device->oclass[NVDEV_SUBDEV_CLK ] = &nv04_clk_oclass;
...@@ -159,7 +159,7 @@ nv10_identify(struct nouveau_device *device) ...@@ -159,7 +159,7 @@ nv10_identify(struct nouveau_device *device)
break; break;
case 0x1f: case 0x1f:
device->cname = "nForce2"; 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_GPIO ] = nv10_gpio_oclass;
device->oclass[NVDEV_SUBDEV_I2C ] = nv04_i2c_oclass; device->oclass[NVDEV_SUBDEV_I2C ] = nv04_i2c_oclass;
device->oclass[NVDEV_SUBDEV_CLK ] = &nv04_clk_oclass; device->oclass[NVDEV_SUBDEV_CLK ] = &nv04_clk_oclass;
...@@ -178,7 +178,7 @@ nv10_identify(struct nouveau_device *device) ...@@ -178,7 +178,7 @@ nv10_identify(struct nouveau_device *device)
break; break;
case 0x18: case 0x18:
device->cname = "NV18"; 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_GPIO ] = nv10_gpio_oclass;
device->oclass[NVDEV_SUBDEV_I2C ] = nv04_i2c_oclass; device->oclass[NVDEV_SUBDEV_I2C ] = nv04_i2c_oclass;
device->oclass[NVDEV_SUBDEV_CLK ] = &nv04_clk_oclass; device->oclass[NVDEV_SUBDEV_CLK ] = &nv04_clk_oclass;
......
...@@ -21,6 +21,7 @@ ...@@ -21,6 +21,7 @@
* *
* Authors: Ben Skeggs * Authors: Ben Skeggs
*/ */
#include "priv.h"
#include <subdev/bios.h> #include <subdev/bios.h>
#include <subdev/bus.h> #include <subdev/bus.h>
...@@ -35,7 +36,6 @@ ...@@ -35,7 +36,6 @@
#include <subdev/instmem.h> #include <subdev/instmem.h>
#include <subdev/mmu.h> #include <subdev/mmu.h>
#include <engine/device.h>
#include <engine/dmaobj.h> #include <engine/dmaobj.h>
#include <engine/fifo.h> #include <engine/fifo.h>
#include <engine/sw.h> #include <engine/sw.h>
...@@ -43,12 +43,12 @@ ...@@ -43,12 +43,12 @@
#include <engine/disp.h> #include <engine/disp.h>
int int
nv20_identify(struct nouveau_device *device) nv20_identify(struct nvkm_device *device)
{ {
switch (device->chipset) { switch (device->chipset) {
case 0x20: case 0x20:
device->cname = "NV20"; 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_GPIO ] = nv10_gpio_oclass;
device->oclass[NVDEV_SUBDEV_I2C ] = nv04_i2c_oclass; device->oclass[NVDEV_SUBDEV_I2C ] = nv04_i2c_oclass;
device->oclass[NVDEV_SUBDEV_CLK ] = &nv04_clk_oclass; device->oclass[NVDEV_SUBDEV_CLK ] = &nv04_clk_oclass;
...@@ -67,7 +67,7 @@ nv20_identify(struct nouveau_device *device) ...@@ -67,7 +67,7 @@ nv20_identify(struct nouveau_device *device)
break; break;
case 0x25: case 0x25:
device->cname = "NV25"; 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_GPIO ] = nv10_gpio_oclass;
device->oclass[NVDEV_SUBDEV_I2C ] = nv04_i2c_oclass; device->oclass[NVDEV_SUBDEV_I2C ] = nv04_i2c_oclass;
device->oclass[NVDEV_SUBDEV_CLK ] = &nv04_clk_oclass; device->oclass[NVDEV_SUBDEV_CLK ] = &nv04_clk_oclass;
...@@ -86,7 +86,7 @@ nv20_identify(struct nouveau_device *device) ...@@ -86,7 +86,7 @@ nv20_identify(struct nouveau_device *device)
break; break;
case 0x28: case 0x28:
device->cname = "NV28"; 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_GPIO ] = nv10_gpio_oclass;
device->oclass[NVDEV_SUBDEV_I2C ] = nv04_i2c_oclass; device->oclass[NVDEV_SUBDEV_I2C ] = nv04_i2c_oclass;
device->oclass[NVDEV_SUBDEV_CLK ] = &nv04_clk_oclass; device->oclass[NVDEV_SUBDEV_CLK ] = &nv04_clk_oclass;
...@@ -105,7 +105,7 @@ nv20_identify(struct nouveau_device *device) ...@@ -105,7 +105,7 @@ nv20_identify(struct nouveau_device *device)
break; break;
case 0x2a: case 0x2a:
device->cname = "NV2A"; 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_GPIO ] = nv10_gpio_oclass;
device->oclass[NVDEV_SUBDEV_I2C ] = nv04_i2c_oclass; device->oclass[NVDEV_SUBDEV_I2C ] = nv04_i2c_oclass;
device->oclass[NVDEV_SUBDEV_CLK ] = &nv04_clk_oclass; device->oclass[NVDEV_SUBDEV_CLK ] = &nv04_clk_oclass;
......
...@@ -21,6 +21,7 @@ ...@@ -21,6 +21,7 @@
* *
* Authors: Ben Skeggs * Authors: Ben Skeggs
*/ */
#include "priv.h"
#include <subdev/bios.h> #include <subdev/bios.h>
#include <subdev/bus.h> #include <subdev/bus.h>
...@@ -34,7 +35,6 @@ ...@@ -34,7 +35,6 @@
#include <subdev/instmem.h> #include <subdev/instmem.h>
#include <subdev/mmu.h> #include <subdev/mmu.h>
#include <engine/device.h>
#include <engine/dmaobj.h> #include <engine/dmaobj.h>
#include <engine/fifo.h> #include <engine/fifo.h>
#include <engine/sw.h> #include <engine/sw.h>
...@@ -43,12 +43,12 @@ ...@@ -43,12 +43,12 @@
#include <engine/disp.h> #include <engine/disp.h>
int int
nv30_identify(struct nouveau_device *device) nv30_identify(struct nvkm_device *device)
{ {
switch (device->chipset) { switch (device->chipset) {
case 0x30: case 0x30:
device->cname = "NV30"; 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_GPIO ] = nv10_gpio_oclass;
device->oclass[NVDEV_SUBDEV_I2C ] = nv04_i2c_oclass; device->oclass[NVDEV_SUBDEV_I2C ] = nv04_i2c_oclass;
device->oclass[NVDEV_SUBDEV_CLK ] = &nv04_clk_oclass; device->oclass[NVDEV_SUBDEV_CLK ] = &nv04_clk_oclass;
...@@ -67,7 +67,7 @@ nv30_identify(struct nouveau_device *device) ...@@ -67,7 +67,7 @@ nv30_identify(struct nouveau_device *device)
break; break;
case 0x35: case 0x35:
device->cname = "NV35"; 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_GPIO ] = nv10_gpio_oclass;
device->oclass[NVDEV_SUBDEV_I2C ] = nv04_i2c_oclass; device->oclass[NVDEV_SUBDEV_I2C ] = nv04_i2c_oclass;
device->oclass[NVDEV_SUBDEV_CLK ] = &nv04_clk_oclass; device->oclass[NVDEV_SUBDEV_CLK ] = &nv04_clk_oclass;
...@@ -86,7 +86,7 @@ nv30_identify(struct nouveau_device *device) ...@@ -86,7 +86,7 @@ nv30_identify(struct nouveau_device *device)
break; break;
case 0x31: case 0x31:
device->cname = "NV31"; 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_GPIO ] = nv10_gpio_oclass;
device->oclass[NVDEV_SUBDEV_I2C ] = nv04_i2c_oclass; device->oclass[NVDEV_SUBDEV_I2C ] = nv04_i2c_oclass;
device->oclass[NVDEV_SUBDEV_CLK ] = &nv04_clk_oclass; device->oclass[NVDEV_SUBDEV_CLK ] = &nv04_clk_oclass;
...@@ -106,7 +106,7 @@ nv30_identify(struct nouveau_device *device) ...@@ -106,7 +106,7 @@ nv30_identify(struct nouveau_device *device)
break; break;
case 0x36: case 0x36:
device->cname = "NV36"; 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_GPIO ] = nv10_gpio_oclass;
device->oclass[NVDEV_SUBDEV_I2C ] = nv04_i2c_oclass; device->oclass[NVDEV_SUBDEV_I2C ] = nv04_i2c_oclass;
device->oclass[NVDEV_SUBDEV_CLK ] = &nv04_clk_oclass; device->oclass[NVDEV_SUBDEV_CLK ] = &nv04_clk_oclass;
...@@ -126,7 +126,7 @@ nv30_identify(struct nouveau_device *device) ...@@ -126,7 +126,7 @@ nv30_identify(struct nouveau_device *device)
break; break;
case 0x34: case 0x34:
device->cname = "NV34"; 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_GPIO ] = nv10_gpio_oclass;
device->oclass[NVDEV_SUBDEV_I2C ] = nv04_i2c_oclass; device->oclass[NVDEV_SUBDEV_I2C ] = nv04_i2c_oclass;
device->oclass[NVDEV_SUBDEV_CLK ] = &nv04_clk_oclass; device->oclass[NVDEV_SUBDEV_CLK ] = &nv04_clk_oclass;
......
...@@ -21,6 +21,7 @@ ...@@ -21,6 +21,7 @@
* *
* Authors: Ben Skeggs * Authors: Ben Skeggs
*/ */
#include "priv.h"
#include <subdev/bios.h> #include <subdev/bios.h>
#include <subdev/bus.h> #include <subdev/bus.h>
...@@ -37,7 +38,6 @@ ...@@ -37,7 +38,6 @@
#include <subdev/mmu.h> #include <subdev/mmu.h>
#include <subdev/volt.h> #include <subdev/volt.h>
#include <engine/device.h>
#include <engine/dmaobj.h> #include <engine/dmaobj.h>
#include <engine/fifo.h> #include <engine/fifo.h>
#include <engine/sw.h> #include <engine/sw.h>
...@@ -47,12 +47,12 @@ ...@@ -47,12 +47,12 @@
#include <engine/pm.h> #include <engine/pm.h>
int int
nv40_identify(struct nouveau_device *device) nv40_identify(struct nvkm_device *device)
{ {
switch (device->chipset) { switch (device->chipset) {
case 0x40: case 0x40:
device->cname = "NV40"; 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_GPIO ] = nv10_gpio_oclass;
device->oclass[NVDEV_SUBDEV_I2C ] = nv04_i2c_oclass; device->oclass[NVDEV_SUBDEV_I2C ] = nv04_i2c_oclass;
device->oclass[NVDEV_SUBDEV_CLK ] = &nv40_clk_oclass; device->oclass[NVDEV_SUBDEV_CLK ] = &nv40_clk_oclass;
...@@ -75,7 +75,7 @@ nv40_identify(struct nouveau_device *device) ...@@ -75,7 +75,7 @@ nv40_identify(struct nouveau_device *device)
break; break;
case 0x41: case 0x41:
device->cname = "NV41"; 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_GPIO ] = nv10_gpio_oclass;
device->oclass[NVDEV_SUBDEV_I2C ] = nv04_i2c_oclass; device->oclass[NVDEV_SUBDEV_I2C ] = nv04_i2c_oclass;
device->oclass[NVDEV_SUBDEV_CLK ] = &nv40_clk_oclass; device->oclass[NVDEV_SUBDEV_CLK ] = &nv40_clk_oclass;
...@@ -98,7 +98,7 @@ nv40_identify(struct nouveau_device *device) ...@@ -98,7 +98,7 @@ nv40_identify(struct nouveau_device *device)
break; break;
case 0x42: case 0x42:
device->cname = "NV42"; 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_GPIO ] = nv10_gpio_oclass;
device->oclass[NVDEV_SUBDEV_I2C ] = nv04_i2c_oclass; device->oclass[NVDEV_SUBDEV_I2C ] = nv04_i2c_oclass;
device->oclass[NVDEV_SUBDEV_CLK ] = &nv40_clk_oclass; device->oclass[NVDEV_SUBDEV_CLK ] = &nv40_clk_oclass;
...@@ -121,7 +121,7 @@ nv40_identify(struct nouveau_device *device) ...@@ -121,7 +121,7 @@ nv40_identify(struct nouveau_device *device)
break; break;
case 0x43: case 0x43:
device->cname = "NV43"; 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_GPIO ] = nv10_gpio_oclass;
device->oclass[NVDEV_SUBDEV_I2C ] = nv04_i2c_oclass; device->oclass[NVDEV_SUBDEV_I2C ] = nv04_i2c_oclass;
device->oclass[NVDEV_SUBDEV_CLK ] = &nv40_clk_oclass; device->oclass[NVDEV_SUBDEV_CLK ] = &nv40_clk_oclass;
...@@ -144,7 +144,7 @@ nv40_identify(struct nouveau_device *device) ...@@ -144,7 +144,7 @@ nv40_identify(struct nouveau_device *device)
break; break;
case 0x45: case 0x45:
device->cname = "NV45"; 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_GPIO ] = nv10_gpio_oclass;
device->oclass[NVDEV_SUBDEV_I2C ] = nv04_i2c_oclass; device->oclass[NVDEV_SUBDEV_I2C ] = nv04_i2c_oclass;
device->oclass[NVDEV_SUBDEV_CLK ] = &nv40_clk_oclass; device->oclass[NVDEV_SUBDEV_CLK ] = &nv40_clk_oclass;
...@@ -167,7 +167,7 @@ nv40_identify(struct nouveau_device *device) ...@@ -167,7 +167,7 @@ nv40_identify(struct nouveau_device *device)
break; break;
case 0x47: case 0x47:
device->cname = "G70"; 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_GPIO ] = nv10_gpio_oclass;
device->oclass[NVDEV_SUBDEV_I2C ] = nv04_i2c_oclass; device->oclass[NVDEV_SUBDEV_I2C ] = nv04_i2c_oclass;
device->oclass[NVDEV_SUBDEV_CLK ] = &nv40_clk_oclass; device->oclass[NVDEV_SUBDEV_CLK ] = &nv40_clk_oclass;
...@@ -190,7 +190,7 @@ nv40_identify(struct nouveau_device *device) ...@@ -190,7 +190,7 @@ nv40_identify(struct nouveau_device *device)
break; break;
case 0x49: case 0x49:
device->cname = "G71"; 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_GPIO ] = nv10_gpio_oclass;
device->oclass[NVDEV_SUBDEV_I2C ] = nv04_i2c_oclass; device->oclass[NVDEV_SUBDEV_I2C ] = nv04_i2c_oclass;
device->oclass[NVDEV_SUBDEV_CLK ] = &nv40_clk_oclass; device->oclass[NVDEV_SUBDEV_CLK ] = &nv40_clk_oclass;
...@@ -213,7 +213,7 @@ nv40_identify(struct nouveau_device *device) ...@@ -213,7 +213,7 @@ nv40_identify(struct nouveau_device *device)
break; break;
case 0x4b: case 0x4b:
device->cname = "G73"; 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_GPIO ] = nv10_gpio_oclass;
device->oclass[NVDEV_SUBDEV_I2C ] = nv04_i2c_oclass; device->oclass[NVDEV_SUBDEV_I2C ] = nv04_i2c_oclass;
device->oclass[NVDEV_SUBDEV_CLK ] = &nv40_clk_oclass; device->oclass[NVDEV_SUBDEV_CLK ] = &nv40_clk_oclass;
...@@ -236,7 +236,7 @@ nv40_identify(struct nouveau_device *device) ...@@ -236,7 +236,7 @@ nv40_identify(struct nouveau_device *device)
break; break;
case 0x44: case 0x44:
device->cname = "NV44"; 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_GPIO ] = nv10_gpio_oclass;
device->oclass[NVDEV_SUBDEV_I2C ] = nv04_i2c_oclass; device->oclass[NVDEV_SUBDEV_I2C ] = nv04_i2c_oclass;
device->oclass[NVDEV_SUBDEV_CLK ] = &nv40_clk_oclass; device->oclass[NVDEV_SUBDEV_CLK ] = &nv40_clk_oclass;
...@@ -259,7 +259,7 @@ nv40_identify(struct nouveau_device *device) ...@@ -259,7 +259,7 @@ nv40_identify(struct nouveau_device *device)
break; break;
case 0x46: case 0x46:
device->cname = "G72"; 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_GPIO ] = nv10_gpio_oclass;
device->oclass[NVDEV_SUBDEV_I2C ] = nv04_i2c_oclass; device->oclass[NVDEV_SUBDEV_I2C ] = nv04_i2c_oclass;
device->oclass[NVDEV_SUBDEV_CLK ] = &nv40_clk_oclass; device->oclass[NVDEV_SUBDEV_CLK ] = &nv40_clk_oclass;
...@@ -282,7 +282,7 @@ nv40_identify(struct nouveau_device *device) ...@@ -282,7 +282,7 @@ nv40_identify(struct nouveau_device *device)
break; break;
case 0x4a: case 0x4a:
device->cname = "NV44A"; 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_GPIO ] = nv10_gpio_oclass;
device->oclass[NVDEV_SUBDEV_I2C ] = nv04_i2c_oclass; device->oclass[NVDEV_SUBDEV_I2C ] = nv04_i2c_oclass;
device->oclass[NVDEV_SUBDEV_CLK ] = &nv40_clk_oclass; device->oclass[NVDEV_SUBDEV_CLK ] = &nv40_clk_oclass;
...@@ -305,7 +305,7 @@ nv40_identify(struct nouveau_device *device) ...@@ -305,7 +305,7 @@ nv40_identify(struct nouveau_device *device)
break; break;
case 0x4c: case 0x4c:
device->cname = "C61"; 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_GPIO ] = nv10_gpio_oclass;
device->oclass[NVDEV_SUBDEV_I2C ] = nv04_i2c_oclass; device->oclass[NVDEV_SUBDEV_I2C ] = nv04_i2c_oclass;
device->oclass[NVDEV_SUBDEV_CLK ] = &nv40_clk_oclass; device->oclass[NVDEV_SUBDEV_CLK ] = &nv40_clk_oclass;
...@@ -328,7 +328,7 @@ nv40_identify(struct nouveau_device *device) ...@@ -328,7 +328,7 @@ nv40_identify(struct nouveau_device *device)
break; break;
case 0x4e: case 0x4e:
device->cname = "C51"; 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_GPIO ] = nv10_gpio_oclass;
device->oclass[NVDEV_SUBDEV_I2C ] = nv4e_i2c_oclass; device->oclass[NVDEV_SUBDEV_I2C ] = nv4e_i2c_oclass;
device->oclass[NVDEV_SUBDEV_CLK ] = &nv40_clk_oclass; device->oclass[NVDEV_SUBDEV_CLK ] = &nv40_clk_oclass;
...@@ -351,7 +351,7 @@ nv40_identify(struct nouveau_device *device) ...@@ -351,7 +351,7 @@ nv40_identify(struct nouveau_device *device)
break; break;
case 0x63: case 0x63:
device->cname = "C73"; 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_GPIO ] = nv10_gpio_oclass;
device->oclass[NVDEV_SUBDEV_I2C ] = nv04_i2c_oclass; device->oclass[NVDEV_SUBDEV_I2C ] = nv04_i2c_oclass;
device->oclass[NVDEV_SUBDEV_CLK ] = &nv40_clk_oclass; device->oclass[NVDEV_SUBDEV_CLK ] = &nv40_clk_oclass;
...@@ -374,7 +374,7 @@ nv40_identify(struct nouveau_device *device) ...@@ -374,7 +374,7 @@ nv40_identify(struct nouveau_device *device)
break; break;
case 0x67: case 0x67:
device->cname = "C67"; 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_GPIO ] = nv10_gpio_oclass;
device->oclass[NVDEV_SUBDEV_I2C ] = nv04_i2c_oclass; device->oclass[NVDEV_SUBDEV_I2C ] = nv04_i2c_oclass;
device->oclass[NVDEV_SUBDEV_CLK ] = &nv40_clk_oclass; device->oclass[NVDEV_SUBDEV_CLK ] = &nv40_clk_oclass;
...@@ -397,7 +397,7 @@ nv40_identify(struct nouveau_device *device) ...@@ -397,7 +397,7 @@ nv40_identify(struct nouveau_device *device)
break; break;
case 0x68: case 0x68:
device->cname = "C68"; 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_GPIO ] = nv10_gpio_oclass;
device->oclass[NVDEV_SUBDEV_I2C ] = nv04_i2c_oclass; device->oclass[NVDEV_SUBDEV_I2C ] = nv04_i2c_oclass;
device->oclass[NVDEV_SUBDEV_CLK ] = &nv40_clk_oclass; device->oclass[NVDEV_SUBDEV_CLK ] = &nv40_clk_oclass;
......
...@@ -21,6 +21,7 @@ ...@@ -21,6 +21,7 @@
* *
* Authors: Ben Skeggs * Authors: Ben Skeggs
*/ */
#include "priv.h"
#include <subdev/bios.h> #include <subdev/bios.h>
#include <subdev/bus.h> #include <subdev/bus.h>
...@@ -40,7 +41,6 @@ ...@@ -40,7 +41,6 @@
#include <subdev/pmu.h> #include <subdev/pmu.h>
#include <subdev/volt.h> #include <subdev/volt.h>
#include <engine/device.h>
#include <engine/dmaobj.h> #include <engine/dmaobj.h>
#include <engine/fifo.h> #include <engine/fifo.h>
#include <engine/sw.h> #include <engine/sw.h>
...@@ -58,12 +58,12 @@ ...@@ -58,12 +58,12 @@
#include <engine/pm.h> #include <engine/pm.h>
int int
nv50_identify(struct nouveau_device *device) nv50_identify(struct nvkm_device *device)
{ {
switch (device->chipset) { switch (device->chipset) {
case 0x50: case 0x50:
device->cname = "G80"; 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_GPIO ] = nv50_gpio_oclass;
device->oclass[NVDEV_SUBDEV_I2C ] = nv50_i2c_oclass; device->oclass[NVDEV_SUBDEV_I2C ] = nv50_i2c_oclass;
device->oclass[NVDEV_SUBDEV_FUSE ] = &nv50_fuse_oclass; device->oclass[NVDEV_SUBDEV_FUSE ] = &nv50_fuse_oclass;
...@@ -89,7 +89,7 @@ nv50_identify(struct nouveau_device *device) ...@@ -89,7 +89,7 @@ nv50_identify(struct nouveau_device *device)
break; break;
case 0x84: case 0x84:
device->cname = "G84"; 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_GPIO ] = nv50_gpio_oclass;
device->oclass[NVDEV_SUBDEV_I2C ] = nv50_i2c_oclass; device->oclass[NVDEV_SUBDEV_I2C ] = nv50_i2c_oclass;
device->oclass[NVDEV_SUBDEV_FUSE ] = &nv50_fuse_oclass; device->oclass[NVDEV_SUBDEV_FUSE ] = &nv50_fuse_oclass;
...@@ -118,7 +118,7 @@ nv50_identify(struct nouveau_device *device) ...@@ -118,7 +118,7 @@ nv50_identify(struct nouveau_device *device)
break; break;
case 0x86: case 0x86:
device->cname = "G86"; 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_GPIO ] = nv50_gpio_oclass;
device->oclass[NVDEV_SUBDEV_I2C ] = nv50_i2c_oclass; device->oclass[NVDEV_SUBDEV_I2C ] = nv50_i2c_oclass;
device->oclass[NVDEV_SUBDEV_FUSE ] = &nv50_fuse_oclass; device->oclass[NVDEV_SUBDEV_FUSE ] = &nv50_fuse_oclass;
...@@ -147,7 +147,7 @@ nv50_identify(struct nouveau_device *device) ...@@ -147,7 +147,7 @@ nv50_identify(struct nouveau_device *device)
break; break;
case 0x92: case 0x92:
device->cname = "G92"; 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_GPIO ] = nv50_gpio_oclass;
device->oclass[NVDEV_SUBDEV_I2C ] = nv50_i2c_oclass; device->oclass[NVDEV_SUBDEV_I2C ] = nv50_i2c_oclass;
device->oclass[NVDEV_SUBDEV_FUSE ] = &nv50_fuse_oclass; device->oclass[NVDEV_SUBDEV_FUSE ] = &nv50_fuse_oclass;
...@@ -176,7 +176,7 @@ nv50_identify(struct nouveau_device *device) ...@@ -176,7 +176,7 @@ nv50_identify(struct nouveau_device *device)
break; break;
case 0x94: case 0x94:
device->cname = "G94"; 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_GPIO ] = g94_gpio_oclass;
device->oclass[NVDEV_SUBDEV_I2C ] = g94_i2c_oclass; device->oclass[NVDEV_SUBDEV_I2C ] = g94_i2c_oclass;
device->oclass[NVDEV_SUBDEV_FUSE ] = &nv50_fuse_oclass; device->oclass[NVDEV_SUBDEV_FUSE ] = &nv50_fuse_oclass;
...@@ -205,7 +205,7 @@ nv50_identify(struct nouveau_device *device) ...@@ -205,7 +205,7 @@ nv50_identify(struct nouveau_device *device)
break; break;
case 0x96: case 0x96:
device->cname = "G96"; 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_GPIO ] = g94_gpio_oclass;
device->oclass[NVDEV_SUBDEV_I2C ] = g94_i2c_oclass; device->oclass[NVDEV_SUBDEV_I2C ] = g94_i2c_oclass;
device->oclass[NVDEV_SUBDEV_FUSE ] = &nv50_fuse_oclass; device->oclass[NVDEV_SUBDEV_FUSE ] = &nv50_fuse_oclass;
...@@ -234,7 +234,7 @@ nv50_identify(struct nouveau_device *device) ...@@ -234,7 +234,7 @@ nv50_identify(struct nouveau_device *device)
break; break;
case 0x98: case 0x98:
device->cname = "G98"; 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_GPIO ] = g94_gpio_oclass;
device->oclass[NVDEV_SUBDEV_I2C ] = g94_i2c_oclass; device->oclass[NVDEV_SUBDEV_I2C ] = g94_i2c_oclass;
device->oclass[NVDEV_SUBDEV_FUSE ] = &nv50_fuse_oclass; device->oclass[NVDEV_SUBDEV_FUSE ] = &nv50_fuse_oclass;
...@@ -263,7 +263,7 @@ nv50_identify(struct nouveau_device *device) ...@@ -263,7 +263,7 @@ nv50_identify(struct nouveau_device *device)
break; break;
case 0xa0: case 0xa0:
device->cname = "G200"; 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_GPIO ] = g94_gpio_oclass;
device->oclass[NVDEV_SUBDEV_I2C ] = nv50_i2c_oclass; device->oclass[NVDEV_SUBDEV_I2C ] = nv50_i2c_oclass;
device->oclass[NVDEV_SUBDEV_FUSE ] = &nv50_fuse_oclass; device->oclass[NVDEV_SUBDEV_FUSE ] = &nv50_fuse_oclass;
...@@ -292,7 +292,7 @@ nv50_identify(struct nouveau_device *device) ...@@ -292,7 +292,7 @@ nv50_identify(struct nouveau_device *device)
break; break;
case 0xaa: case 0xaa:
device->cname = "MCP77/MCP78"; 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_GPIO ] = g94_gpio_oclass;
device->oclass[NVDEV_SUBDEV_I2C ] = g94_i2c_oclass; device->oclass[NVDEV_SUBDEV_I2C ] = g94_i2c_oclass;
device->oclass[NVDEV_SUBDEV_FUSE ] = &nv50_fuse_oclass; device->oclass[NVDEV_SUBDEV_FUSE ] = &nv50_fuse_oclass;
...@@ -321,7 +321,7 @@ nv50_identify(struct nouveau_device *device) ...@@ -321,7 +321,7 @@ nv50_identify(struct nouveau_device *device)
break; break;
case 0xac: case 0xac:
device->cname = "MCP79/MCP7A"; 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_GPIO ] = g94_gpio_oclass;
device->oclass[NVDEV_SUBDEV_I2C ] = g94_i2c_oclass; device->oclass[NVDEV_SUBDEV_I2C ] = g94_i2c_oclass;
device->oclass[NVDEV_SUBDEV_FUSE ] = &nv50_fuse_oclass; device->oclass[NVDEV_SUBDEV_FUSE ] = &nv50_fuse_oclass;
...@@ -350,7 +350,7 @@ nv50_identify(struct nouveau_device *device) ...@@ -350,7 +350,7 @@ nv50_identify(struct nouveau_device *device)
break; break;
case 0xa3: case 0xa3:
device->cname = "GT215"; 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_GPIO ] = g94_gpio_oclass;
device->oclass[NVDEV_SUBDEV_I2C ] = g94_i2c_oclass; device->oclass[NVDEV_SUBDEV_I2C ] = g94_i2c_oclass;
device->oclass[NVDEV_SUBDEV_FUSE ] = &nv50_fuse_oclass; device->oclass[NVDEV_SUBDEV_FUSE ] = &nv50_fuse_oclass;
...@@ -381,7 +381,7 @@ nv50_identify(struct nouveau_device *device) ...@@ -381,7 +381,7 @@ nv50_identify(struct nouveau_device *device)
break; break;
case 0xa5: case 0xa5:
device->cname = "GT216"; 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_GPIO ] = g94_gpio_oclass;
device->oclass[NVDEV_SUBDEV_I2C ] = g94_i2c_oclass; device->oclass[NVDEV_SUBDEV_I2C ] = g94_i2c_oclass;
device->oclass[NVDEV_SUBDEV_FUSE ] = &nv50_fuse_oclass; device->oclass[NVDEV_SUBDEV_FUSE ] = &nv50_fuse_oclass;
...@@ -411,7 +411,7 @@ nv50_identify(struct nouveau_device *device) ...@@ -411,7 +411,7 @@ nv50_identify(struct nouveau_device *device)
break; break;
case 0xa8: case 0xa8:
device->cname = "GT218"; 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_GPIO ] = g94_gpio_oclass;
device->oclass[NVDEV_SUBDEV_I2C ] = g94_i2c_oclass; device->oclass[NVDEV_SUBDEV_I2C ] = g94_i2c_oclass;
device->oclass[NVDEV_SUBDEV_FUSE ] = &nv50_fuse_oclass; device->oclass[NVDEV_SUBDEV_FUSE ] = &nv50_fuse_oclass;
...@@ -441,7 +441,7 @@ nv50_identify(struct nouveau_device *device) ...@@ -441,7 +441,7 @@ nv50_identify(struct nouveau_device *device)
break; break;
case 0xaf: case 0xaf:
device->cname = "MCP89"; 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_GPIO ] = g94_gpio_oclass;
device->oclass[NVDEV_SUBDEV_I2C ] = g94_i2c_oclass; device->oclass[NVDEV_SUBDEV_I2C ] = g94_i2c_oclass;
device->oclass[NVDEV_SUBDEV_FUSE ] = &nv50_fuse_oclass; device->oclass[NVDEV_SUBDEV_FUSE ] = &nv50_fuse_oclass;
......
#ifndef __NVKM_DEVICE_PRIV_H__ #ifndef __NVKM_DEVICE_PRIV_H__
#define __NVKM_DEVICE_PRIV_H__ #define __NVKM_DEVICE_PRIV_H__
#include <core/device.h>
#include <engine/device.h> extern struct nvkm_oclass nvkm_control_oclass[];
extern struct nouveau_oclass nouveau_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 #endif
#ifndef __NV40_GR_H__ #ifndef __NV40_GR_H__
#define __NV40_GR_H__ #define __NV40_GR_H__
#include <engine/gr.h> #include <engine/gr.h>
#include <engine/device.h>
#include <core/device.h>
struct nvkm_gpuobj; struct nvkm_gpuobj;
/* returns 1 if device is one of the nv4x using the 0x4497 object class, /* returns 1 if device is one of the nv4x using the 0x4497 object class,
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment