Commit 4a34fd0e authored by Ben Skeggs's avatar Ben Skeggs

drm/nouveau/devinit: switch to instanced constructor

Signed-off-by: default avatarBen Skeggs <bskeggs@redhat.com>
Reviewed-by: default avatarLyude Paul <lyude@redhat.com>
parent 98fd7f83
......@@ -60,7 +60,6 @@ struct nvkm_device {
struct notifier_block nb;
} acpi;
struct nvkm_devinit *devinit;
struct nvkm_fault *fault;
struct nvkm_fb *fb;
struct nvkm_fuse *fuse;
......@@ -143,7 +142,6 @@ struct nvkm_device_chip {
#include <core/layout.h>
#undef NVKM_LAYOUT_INST
#undef NVKM_LAYOUT_ONCE
int (*devinit )(struct nvkm_device *, int idx, struct nvkm_devinit **);
int (*fault )(struct nvkm_device *, int idx, struct nvkm_fault **);
int (*fb )(struct nvkm_device *, int idx, struct nvkm_fb **);
int (*fuse )(struct nvkm_device *, int idx, struct nvkm_fuse **);
......
/* SPDX-License-Identifier: MIT */
NVKM_LAYOUT_ONCE(NVKM_SUBDEV_VBIOS , struct nvkm_bios , bios)
NVKM_LAYOUT_ONCE(NVKM_SUBDEV_DEVINIT , struct nvkm_devinit , devinit)
NVKM_LAYOUT_ONCE(NVKM_SUBDEV_BUS , struct nvkm_bus , bus)
NVKM_LAYOUT_ONCE(NVKM_SUBDEV_BAR , struct nvkm_bar , bar)
NVKM_LAYOUT_ONCE(NVKM_SUBDEV_ACR , struct nvkm_acr , acr)
......
......@@ -17,20 +17,20 @@ void nvkm_devinit_meminit(struct nvkm_devinit *);
u64 nvkm_devinit_disable(struct nvkm_devinit *);
int nvkm_devinit_post(struct nvkm_devinit *, u64 *disable);
int nv04_devinit_new(struct nvkm_device *, int, struct nvkm_devinit **);
int nv05_devinit_new(struct nvkm_device *, int, struct nvkm_devinit **);
int nv10_devinit_new(struct nvkm_device *, int, struct nvkm_devinit **);
int nv1a_devinit_new(struct nvkm_device *, int, struct nvkm_devinit **);
int nv20_devinit_new(struct nvkm_device *, int, struct nvkm_devinit **);
int nv50_devinit_new(struct nvkm_device *, int, struct nvkm_devinit **);
int g84_devinit_new(struct nvkm_device *, int, struct nvkm_devinit **);
int g98_devinit_new(struct nvkm_device *, int, struct nvkm_devinit **);
int gt215_devinit_new(struct nvkm_device *, int, struct nvkm_devinit **);
int mcp89_devinit_new(struct nvkm_device *, int, struct nvkm_devinit **);
int gf100_devinit_new(struct nvkm_device *, int, struct nvkm_devinit **);
int gm107_devinit_new(struct nvkm_device *, int, struct nvkm_devinit **);
int gm200_devinit_new(struct nvkm_device *, int, struct nvkm_devinit **);
int gv100_devinit_new(struct nvkm_device *, int, struct nvkm_devinit **);
int tu102_devinit_new(struct nvkm_device *, int, struct nvkm_devinit **);
int ga100_devinit_new(struct nvkm_device *, int, struct nvkm_devinit **);
int nv04_devinit_new(struct nvkm_device *, enum nvkm_subdev_type, int, struct nvkm_devinit **);
int nv05_devinit_new(struct nvkm_device *, enum nvkm_subdev_type, int, struct nvkm_devinit **);
int nv10_devinit_new(struct nvkm_device *, enum nvkm_subdev_type, int, struct nvkm_devinit **);
int nv1a_devinit_new(struct nvkm_device *, enum nvkm_subdev_type, int, struct nvkm_devinit **);
int nv20_devinit_new(struct nvkm_device *, enum nvkm_subdev_type, int, struct nvkm_devinit **);
int nv50_devinit_new(struct nvkm_device *, enum nvkm_subdev_type, int, struct nvkm_devinit **);
int g84_devinit_new(struct nvkm_device *, enum nvkm_subdev_type, int, struct nvkm_devinit **);
int g98_devinit_new(struct nvkm_device *, enum nvkm_subdev_type, int, struct nvkm_devinit **);
int gt215_devinit_new(struct nvkm_device *, enum nvkm_subdev_type, int, struct nvkm_devinit **);
int mcp89_devinit_new(struct nvkm_device *, enum nvkm_subdev_type, int, struct nvkm_devinit **);
int gf100_devinit_new(struct nvkm_device *, enum nvkm_subdev_type, int, struct nvkm_devinit **);
int gm107_devinit_new(struct nvkm_device *, enum nvkm_subdev_type, int, struct nvkm_devinit **);
int gm200_devinit_new(struct nvkm_device *, enum nvkm_subdev_type, int, struct nvkm_devinit **);
int gv100_devinit_new(struct nvkm_device *, enum nvkm_subdev_type, int, struct nvkm_devinit **);
int tu102_devinit_new(struct nvkm_device *, enum nvkm_subdev_type, int, struct nvkm_devinit **);
int ga100_devinit_new(struct nvkm_device *, enum nvkm_subdev_type, int, struct nvkm_devinit **);
#endif
......@@ -33,7 +33,6 @@ nvkm_subdev_type[NVKM_SUBDEV_NR] = {
#include <core/layout.h>
#undef NVKM_LAYOUT_ONCE
#undef NVKM_LAYOUT_INST
[NVKM_SUBDEV_DEVINIT ] = "devinit",
[NVKM_SUBDEV_FAULT ] = "fault",
[NVKM_SUBDEV_FB ] = "fb",
[NVKM_SUBDEV_FUSE ] = "fuse",
......
......@@ -80,7 +80,7 @@ nv4_chipset = {
.bios = { 0x00000001, nvkm_bios_new },
.bus = { 0x00000001, nv04_bus_new },
.clk = { 0x00000001, nv04_clk_new },
.devinit = nv04_devinit_new,
.devinit = { 0x00000001, nv04_devinit_new },
.fb = nv04_fb_new,
.i2c = nv04_i2c_new,
.imem = nv04_instmem_new,
......@@ -101,7 +101,7 @@ nv5_chipset = {
.bios = { 0x00000001, nvkm_bios_new },
.bus = { 0x00000001, nv04_bus_new },
.clk = { 0x00000001, nv04_clk_new },
.devinit = nv05_devinit_new,
.devinit = { 0x00000001, nv05_devinit_new },
.fb = nv04_fb_new,
.i2c = nv04_i2c_new,
.imem = nv04_instmem_new,
......@@ -122,7 +122,7 @@ nv10_chipset = {
.bios = { 0x00000001, nvkm_bios_new },
.bus = { 0x00000001, nv04_bus_new },
.clk = { 0x00000001, nv04_clk_new },
.devinit = nv10_devinit_new,
.devinit = { 0x00000001, nv10_devinit_new },
.fb = nv10_fb_new,
.gpio = nv10_gpio_new,
.i2c = nv04_i2c_new,
......@@ -142,7 +142,7 @@ nv11_chipset = {
.bios = { 0x00000001, nvkm_bios_new },
.bus = { 0x00000001, nv04_bus_new },
.clk = { 0x00000001, nv04_clk_new },
.devinit = nv10_devinit_new,
.devinit = { 0x00000001, nv10_devinit_new },
.fb = nv10_fb_new,
.gpio = nv10_gpio_new,
.i2c = nv04_i2c_new,
......@@ -164,7 +164,7 @@ nv15_chipset = {
.bios = { 0x00000001, nvkm_bios_new },
.bus = { 0x00000001, nv04_bus_new },
.clk = { 0x00000001, nv04_clk_new },
.devinit = nv10_devinit_new,
.devinit = { 0x00000001, nv10_devinit_new },
.fb = nv10_fb_new,
.gpio = nv10_gpio_new,
.i2c = nv04_i2c_new,
......@@ -186,7 +186,7 @@ nv17_chipset = {
.bios = { 0x00000001, nvkm_bios_new },
.bus = { 0x00000001, nv04_bus_new },
.clk = { 0x00000001, nv04_clk_new },
.devinit = nv10_devinit_new,
.devinit = { 0x00000001, nv10_devinit_new },
.fb = nv10_fb_new,
.gpio = nv10_gpio_new,
.i2c = nv04_i2c_new,
......@@ -208,7 +208,7 @@ nv18_chipset = {
.bios = { 0x00000001, nvkm_bios_new },
.bus = { 0x00000001, nv04_bus_new },
.clk = { 0x00000001, nv04_clk_new },
.devinit = nv10_devinit_new,
.devinit = { 0x00000001, nv10_devinit_new },
.fb = nv10_fb_new,
.gpio = nv10_gpio_new,
.i2c = nv04_i2c_new,
......@@ -230,7 +230,7 @@ nv1a_chipset = {
.bios = { 0x00000001, nvkm_bios_new },
.bus = { 0x00000001, nv04_bus_new },
.clk = { 0x00000001, nv04_clk_new },
.devinit = nv1a_devinit_new,
.devinit = { 0x00000001, nv1a_devinit_new },
.fb = nv1a_fb_new,
.gpio = nv10_gpio_new,
.i2c = nv04_i2c_new,
......@@ -252,7 +252,7 @@ nv1f_chipset = {
.bios = { 0x00000001, nvkm_bios_new },
.bus = { 0x00000001, nv04_bus_new },
.clk = { 0x00000001, nv04_clk_new },
.devinit = nv1a_devinit_new,
.devinit = { 0x00000001, nv1a_devinit_new },
.fb = nv1a_fb_new,
.gpio = nv10_gpio_new,
.i2c = nv04_i2c_new,
......@@ -274,7 +274,7 @@ nv20_chipset = {
.bios = { 0x00000001, nvkm_bios_new },
.bus = { 0x00000001, nv04_bus_new },
.clk = { 0x00000001, nv04_clk_new },
.devinit = nv20_devinit_new,
.devinit = { 0x00000001, nv20_devinit_new },
.fb = nv20_fb_new,
.gpio = nv10_gpio_new,
.i2c = nv04_i2c_new,
......@@ -296,7 +296,7 @@ nv25_chipset = {
.bios = { 0x00000001, nvkm_bios_new },
.bus = { 0x00000001, nv04_bus_new },
.clk = { 0x00000001, nv04_clk_new },
.devinit = nv20_devinit_new,
.devinit = { 0x00000001, nv20_devinit_new },
.fb = nv25_fb_new,
.gpio = nv10_gpio_new,
.i2c = nv04_i2c_new,
......@@ -318,7 +318,7 @@ nv28_chipset = {
.bios = { 0x00000001, nvkm_bios_new },
.bus = { 0x00000001, nv04_bus_new },
.clk = { 0x00000001, nv04_clk_new },
.devinit = nv20_devinit_new,
.devinit = { 0x00000001, nv20_devinit_new },
.fb = nv25_fb_new,
.gpio = nv10_gpio_new,
.i2c = nv04_i2c_new,
......@@ -340,7 +340,7 @@ nv2a_chipset = {
.bios = { 0x00000001, nvkm_bios_new },
.bus = { 0x00000001, nv04_bus_new },
.clk = { 0x00000001, nv04_clk_new },
.devinit = nv20_devinit_new,
.devinit = { 0x00000001, nv20_devinit_new },
.fb = nv25_fb_new,
.gpio = nv10_gpio_new,
.i2c = nv04_i2c_new,
......@@ -362,7 +362,7 @@ nv30_chipset = {
.bios = { 0x00000001, nvkm_bios_new },
.bus = { 0x00000001, nv04_bus_new },
.clk = { 0x00000001, nv04_clk_new },
.devinit = nv20_devinit_new,
.devinit = { 0x00000001, nv20_devinit_new },
.fb = nv30_fb_new,
.gpio = nv10_gpio_new,
.i2c = nv04_i2c_new,
......@@ -384,7 +384,7 @@ nv31_chipset = {
.bios = { 0x00000001, nvkm_bios_new },
.bus = { 0x00000001, nv31_bus_new },
.clk = { 0x00000001, nv04_clk_new },
.devinit = nv20_devinit_new,
.devinit = { 0x00000001, nv20_devinit_new },
.fb = nv30_fb_new,
.gpio = nv10_gpio_new,
.i2c = nv04_i2c_new,
......@@ -407,7 +407,7 @@ nv34_chipset = {
.bios = { 0x00000001, nvkm_bios_new },
.bus = { 0x00000001, nv31_bus_new },
.clk = { 0x00000001, nv04_clk_new },
.devinit = nv10_devinit_new,
.devinit = { 0x00000001, nv10_devinit_new },
.fb = nv10_fb_new,
.gpio = nv10_gpio_new,
.i2c = nv04_i2c_new,
......@@ -430,7 +430,7 @@ nv35_chipset = {
.bios = { 0x00000001, nvkm_bios_new },
.bus = { 0x00000001, nv04_bus_new },
.clk = { 0x00000001, nv04_clk_new },
.devinit = nv20_devinit_new,
.devinit = { 0x00000001, nv20_devinit_new },
.fb = nv35_fb_new,
.gpio = nv10_gpio_new,
.i2c = nv04_i2c_new,
......@@ -452,7 +452,7 @@ nv36_chipset = {
.bios = { 0x00000001, nvkm_bios_new },
.bus = { 0x00000001, nv31_bus_new },
.clk = { 0x00000001, nv04_clk_new },
.devinit = nv20_devinit_new,
.devinit = { 0x00000001, nv20_devinit_new },
.fb = nv36_fb_new,
.gpio = nv10_gpio_new,
.i2c = nv04_i2c_new,
......@@ -475,7 +475,7 @@ nv40_chipset = {
.bios = { 0x00000001, nvkm_bios_new },
.bus = { 0x00000001, nv31_bus_new },
.clk = { 0x00000001, nv40_clk_new },
.devinit = nv1a_devinit_new,
.devinit = { 0x00000001, nv1a_devinit_new },
.fb = nv40_fb_new,
.gpio = nv10_gpio_new,
.i2c = nv04_i2c_new,
......@@ -501,7 +501,7 @@ nv41_chipset = {
.bios = { 0x00000001, nvkm_bios_new },
.bus = { 0x00000001, nv31_bus_new },
.clk = { 0x00000001, nv40_clk_new },
.devinit = nv1a_devinit_new,
.devinit = { 0x00000001, nv1a_devinit_new },
.fb = nv41_fb_new,
.gpio = nv10_gpio_new,
.i2c = nv04_i2c_new,
......@@ -527,7 +527,7 @@ nv42_chipset = {
.bios = { 0x00000001, nvkm_bios_new },
.bus = { 0x00000001, nv31_bus_new },
.clk = { 0x00000001, nv40_clk_new },
.devinit = nv1a_devinit_new,
.devinit = { 0x00000001, nv1a_devinit_new },
.fb = nv41_fb_new,
.gpio = nv10_gpio_new,
.i2c = nv04_i2c_new,
......@@ -553,7 +553,7 @@ nv43_chipset = {
.bios = { 0x00000001, nvkm_bios_new },
.bus = { 0x00000001, nv31_bus_new },
.clk = { 0x00000001, nv40_clk_new },
.devinit = nv1a_devinit_new,
.devinit = { 0x00000001, nv1a_devinit_new },
.fb = nv41_fb_new,
.gpio = nv10_gpio_new,
.i2c = nv04_i2c_new,
......@@ -579,7 +579,7 @@ nv44_chipset = {
.bios = { 0x00000001, nvkm_bios_new },
.bus = { 0x00000001, nv31_bus_new },
.clk = { 0x00000001, nv40_clk_new },
.devinit = nv1a_devinit_new,
.devinit = { 0x00000001, nv1a_devinit_new },
.fb = nv44_fb_new,
.gpio = nv10_gpio_new,
.i2c = nv04_i2c_new,
......@@ -605,7 +605,7 @@ nv45_chipset = {
.bios = { 0x00000001, nvkm_bios_new },
.bus = { 0x00000001, nv31_bus_new },
.clk = { 0x00000001, nv40_clk_new },
.devinit = nv1a_devinit_new,
.devinit = { 0x00000001, nv1a_devinit_new },
.fb = nv40_fb_new,
.gpio = nv10_gpio_new,
.i2c = nv04_i2c_new,
......@@ -631,7 +631,7 @@ nv46_chipset = {
.bios = { 0x00000001, nvkm_bios_new },
.bus = { 0x00000001, nv31_bus_new },
.clk = { 0x00000001, nv40_clk_new },
.devinit = nv1a_devinit_new,
.devinit = { 0x00000001, nv1a_devinit_new },
.fb = nv46_fb_new,
.gpio = nv10_gpio_new,
.i2c = nv04_i2c_new,
......@@ -657,7 +657,7 @@ nv47_chipset = {
.bios = { 0x00000001, nvkm_bios_new },
.bus = { 0x00000001, nv31_bus_new },
.clk = { 0x00000001, nv40_clk_new },
.devinit = nv1a_devinit_new,
.devinit = { 0x00000001, nv1a_devinit_new },
.fb = nv47_fb_new,
.gpio = nv10_gpio_new,
.i2c = nv04_i2c_new,
......@@ -683,7 +683,7 @@ nv49_chipset = {
.bios = { 0x00000001, nvkm_bios_new },
.bus = { 0x00000001, nv31_bus_new },
.clk = { 0x00000001, nv40_clk_new },
.devinit = nv1a_devinit_new,
.devinit = { 0x00000001, nv1a_devinit_new },
.fb = nv49_fb_new,
.gpio = nv10_gpio_new,
.i2c = nv04_i2c_new,
......@@ -709,7 +709,7 @@ nv4a_chipset = {
.bios = { 0x00000001, nvkm_bios_new },
.bus = { 0x00000001, nv31_bus_new },
.clk = { 0x00000001, nv40_clk_new },
.devinit = nv1a_devinit_new,
.devinit = { 0x00000001, nv1a_devinit_new },
.fb = nv44_fb_new,
.gpio = nv10_gpio_new,
.i2c = nv04_i2c_new,
......@@ -735,7 +735,7 @@ nv4b_chipset = {
.bios = { 0x00000001, nvkm_bios_new },
.bus = { 0x00000001, nv31_bus_new },
.clk = { 0x00000001, nv40_clk_new },
.devinit = nv1a_devinit_new,
.devinit = { 0x00000001, nv1a_devinit_new },
.fb = nv49_fb_new,
.gpio = nv10_gpio_new,
.i2c = nv04_i2c_new,
......@@ -761,7 +761,7 @@ nv4c_chipset = {
.bios = { 0x00000001, nvkm_bios_new },
.bus = { 0x00000001, nv31_bus_new },
.clk = { 0x00000001, nv40_clk_new },
.devinit = nv1a_devinit_new,
.devinit = { 0x00000001, nv1a_devinit_new },
.fb = nv46_fb_new,
.gpio = nv10_gpio_new,
.i2c = nv04_i2c_new,
......@@ -787,7 +787,7 @@ nv4e_chipset = {
.bios = { 0x00000001, nvkm_bios_new },
.bus = { 0x00000001, nv31_bus_new },
.clk = { 0x00000001, nv40_clk_new },
.devinit = nv1a_devinit_new,
.devinit = { 0x00000001, nv1a_devinit_new },
.fb = nv4e_fb_new,
.gpio = nv10_gpio_new,
.i2c = nv4e_i2c_new,
......@@ -814,7 +814,7 @@ nv50_chipset = {
.bios = { 0x00000001, nvkm_bios_new },
.bus = { 0x00000001, nv50_bus_new },
.clk = { 0x00000001, nv50_clk_new },
.devinit = nv50_devinit_new,
.devinit = { 0x00000001, nv50_devinit_new },
.fb = nv50_fb_new,
.fuse = nv50_fuse_new,
.gpio = nv50_gpio_new,
......@@ -842,7 +842,7 @@ nv63_chipset = {
.bios = { 0x00000001, nvkm_bios_new },
.bus = { 0x00000001, nv31_bus_new },
.clk = { 0x00000001, nv40_clk_new },
.devinit = nv1a_devinit_new,
.devinit = { 0x00000001, nv1a_devinit_new },
.fb = nv46_fb_new,
.gpio = nv10_gpio_new,
.i2c = nv04_i2c_new,
......@@ -868,7 +868,7 @@ nv67_chipset = {
.bios = { 0x00000001, nvkm_bios_new },
.bus = { 0x00000001, nv31_bus_new },
.clk = { 0x00000001, nv40_clk_new },
.devinit = nv1a_devinit_new,
.devinit = { 0x00000001, nv1a_devinit_new },
.fb = nv46_fb_new,
.gpio = nv10_gpio_new,
.i2c = nv04_i2c_new,
......@@ -894,7 +894,7 @@ nv68_chipset = {
.bios = { 0x00000001, nvkm_bios_new },
.bus = { 0x00000001, nv31_bus_new },
.clk = { 0x00000001, nv40_clk_new },
.devinit = nv1a_devinit_new,
.devinit = { 0x00000001, nv1a_devinit_new },
.fb = nv46_fb_new,
.gpio = nv10_gpio_new,
.i2c = nv04_i2c_new,
......@@ -921,7 +921,7 @@ nv84_chipset = {
.bios = { 0x00000001, nvkm_bios_new },
.bus = { 0x00000001, nv50_bus_new },
.clk = { 0x00000001, g84_clk_new },
.devinit = g84_devinit_new,
.devinit = { 0x00000001, g84_devinit_new },
.fb = g84_fb_new,
.fuse = nv50_fuse_new,
.gpio = nv50_gpio_new,
......@@ -953,7 +953,7 @@ nv86_chipset = {
.bios = { 0x00000001, nvkm_bios_new },
.bus = { 0x00000001, nv50_bus_new },
.clk = { 0x00000001, g84_clk_new },
.devinit = g84_devinit_new,
.devinit = { 0x00000001, g84_devinit_new },
.fb = g84_fb_new,
.fuse = nv50_fuse_new,
.gpio = nv50_gpio_new,
......@@ -985,7 +985,7 @@ nv92_chipset = {
.bios = { 0x00000001, nvkm_bios_new },
.bus = { 0x00000001, nv50_bus_new },
.clk = { 0x00000001, g84_clk_new },
.devinit = g84_devinit_new,
.devinit = { 0x00000001, g84_devinit_new },
.fb = g84_fb_new,
.fuse = nv50_fuse_new,
.gpio = nv50_gpio_new,
......@@ -1017,7 +1017,7 @@ nv94_chipset = {
.bios = { 0x00000001, nvkm_bios_new },
.bus = { 0x00000001, g94_bus_new },
.clk = { 0x00000001, g84_clk_new },
.devinit = g84_devinit_new,
.devinit = { 0x00000001, g84_devinit_new },
.fb = g84_fb_new,
.fuse = nv50_fuse_new,
.gpio = g94_gpio_new,
......@@ -1049,7 +1049,7 @@ nv96_chipset = {
.bios = { 0x00000001, nvkm_bios_new },
.bus = { 0x00000001, g94_bus_new },
.clk = { 0x00000001, g84_clk_new },
.devinit = g84_devinit_new,
.devinit = { 0x00000001, g84_devinit_new },
.fb = g84_fb_new,
.fuse = nv50_fuse_new,
.gpio = g94_gpio_new,
......@@ -1081,7 +1081,7 @@ nv98_chipset = {
.bios = { 0x00000001, nvkm_bios_new },
.bus = { 0x00000001, g94_bus_new },
.clk = { 0x00000001, g84_clk_new },
.devinit = g98_devinit_new,
.devinit = { 0x00000001, g98_devinit_new },
.fb = g84_fb_new,
.fuse = nv50_fuse_new,
.gpio = g94_gpio_new,
......@@ -1113,7 +1113,7 @@ nva0_chipset = {
.bios = { 0x00000001, nvkm_bios_new },
.bus = { 0x00000001, g94_bus_new },
.clk = { 0x00000001, g84_clk_new },
.devinit = g84_devinit_new,
.devinit = { 0x00000001, g84_devinit_new },
.fb = g84_fb_new,
.fuse = nv50_fuse_new,
.gpio = g94_gpio_new,
......@@ -1145,7 +1145,7 @@ nva3_chipset = {
.bios = { 0x00000001, nvkm_bios_new },
.bus = { 0x00000001, g94_bus_new },
.clk = { 0x00000001, gt215_clk_new },
.devinit = gt215_devinit_new,
.devinit = { 0x00000001, gt215_devinit_new },
.fb = gt215_fb_new,
.fuse = nv50_fuse_new,
.gpio = g94_gpio_new,
......@@ -1179,7 +1179,7 @@ nva5_chipset = {
.bios = { 0x00000001, nvkm_bios_new },
.bus = { 0x00000001, g94_bus_new },
.clk = { 0x00000001, gt215_clk_new },
.devinit = gt215_devinit_new,
.devinit = { 0x00000001, gt215_devinit_new },
.fb = gt215_fb_new,
.fuse = nv50_fuse_new,
.gpio = g94_gpio_new,
......@@ -1212,7 +1212,7 @@ nva8_chipset = {
.bios = { 0x00000001, nvkm_bios_new },
.bus = { 0x00000001, g94_bus_new },
.clk = { 0x00000001, gt215_clk_new },
.devinit = gt215_devinit_new,
.devinit = { 0x00000001, gt215_devinit_new },
.fb = gt215_fb_new,
.fuse = nv50_fuse_new,
.gpio = g94_gpio_new,
......@@ -1245,7 +1245,7 @@ nvaa_chipset = {
.bios = { 0x00000001, nvkm_bios_new },
.bus = { 0x00000001, g94_bus_new },
.clk = { 0x00000001, mcp77_clk_new },
.devinit = g98_devinit_new,
.devinit = { 0x00000001, g98_devinit_new },
.fb = mcp77_fb_new,
.fuse = nv50_fuse_new,
.gpio = g94_gpio_new,
......@@ -1277,7 +1277,7 @@ nvac_chipset = {
.bios = { 0x00000001, nvkm_bios_new },
.bus = { 0x00000001, g94_bus_new },
.clk = { 0x00000001, mcp77_clk_new },
.devinit = g98_devinit_new,
.devinit = { 0x00000001, g98_devinit_new },
.fb = mcp77_fb_new,
.fuse = nv50_fuse_new,
.gpio = g94_gpio_new,
......@@ -1309,7 +1309,7 @@ nvaf_chipset = {
.bios = { 0x00000001, nvkm_bios_new },
.bus = { 0x00000001, g94_bus_new },
.clk = { 0x00000001, gt215_clk_new },
.devinit = mcp89_devinit_new,
.devinit = { 0x00000001, mcp89_devinit_new },
.fb = mcp89_fb_new,
.fuse = nv50_fuse_new,
.gpio = g94_gpio_new,
......@@ -1342,7 +1342,7 @@ nvc0_chipset = {
.bios = { 0x00000001, nvkm_bios_new },
.bus = { 0x00000001, gf100_bus_new },
.clk = { 0x00000001, gf100_clk_new },
.devinit = gf100_devinit_new,
.devinit = { 0x00000001, gf100_devinit_new },
.fb = gf100_fb_new,
.fuse = gf100_fuse_new,
.gpio = g94_gpio_new,
......@@ -1379,7 +1379,7 @@ nvc1_chipset = {
.bios = { 0x00000001, nvkm_bios_new },
.bus = { 0x00000001, gf100_bus_new },
.clk = { 0x00000001, gf100_clk_new },
.devinit = gf100_devinit_new,
.devinit = { 0x00000001, gf100_devinit_new },
.fb = gf108_fb_new,
.fuse = gf100_fuse_new,
.gpio = g94_gpio_new,
......@@ -1415,7 +1415,7 @@ nvc3_chipset = {
.bios = { 0x00000001, nvkm_bios_new },
.bus = { 0x00000001, gf100_bus_new },
.clk = { 0x00000001, gf100_clk_new },
.devinit = gf100_devinit_new,
.devinit = { 0x00000001, gf100_devinit_new },
.fb = gf100_fb_new,
.fuse = gf100_fuse_new,
.gpio = g94_gpio_new,
......@@ -1451,7 +1451,7 @@ nvc4_chipset = {
.bios = { 0x00000001, nvkm_bios_new },
.bus = { 0x00000001, gf100_bus_new },
.clk = { 0x00000001, gf100_clk_new },
.devinit = gf100_devinit_new,
.devinit = { 0x00000001, gf100_devinit_new },
.fb = gf100_fb_new,
.fuse = gf100_fuse_new,
.gpio = g94_gpio_new,
......@@ -1488,7 +1488,7 @@ nvc8_chipset = {
.bios = { 0x00000001, nvkm_bios_new },
.bus = { 0x00000001, gf100_bus_new },
.clk = { 0x00000001, gf100_clk_new },
.devinit = gf100_devinit_new,
.devinit = { 0x00000001, gf100_devinit_new },
.fb = gf100_fb_new,
.fuse = gf100_fuse_new,
.gpio = g94_gpio_new,
......@@ -1525,7 +1525,7 @@ nvce_chipset = {
.bios = { 0x00000001, nvkm_bios_new },
.bus = { 0x00000001, gf100_bus_new },
.clk = { 0x00000001, gf100_clk_new },
.devinit = gf100_devinit_new,
.devinit = { 0x00000001, gf100_devinit_new },
.fb = gf100_fb_new,
.fuse = gf100_fuse_new,
.gpio = g94_gpio_new,
......@@ -1562,7 +1562,7 @@ nvcf_chipset = {
.bios = { 0x00000001, nvkm_bios_new },
.bus = { 0x00000001, gf100_bus_new },
.clk = { 0x00000001, gf100_clk_new },
.devinit = gf100_devinit_new,
.devinit = { 0x00000001, gf100_devinit_new },
.fb = gf100_fb_new,
.fuse = gf100_fuse_new,
.gpio = g94_gpio_new,
......@@ -1598,7 +1598,7 @@ nvd7_chipset = {
.bios = { 0x00000001, nvkm_bios_new },
.bus = { 0x00000001, gf100_bus_new },
.clk = { 0x00000001, gf100_clk_new },
.devinit = gf100_devinit_new,
.devinit = { 0x00000001, gf100_devinit_new },
.fb = gf100_fb_new,
.fuse = gf100_fuse_new,
.gpio = gf119_gpio_new,
......@@ -1633,7 +1633,7 @@ nvd9_chipset = {
.bios = { 0x00000001, nvkm_bios_new },
.bus = { 0x00000001, gf100_bus_new },
.clk = { 0x00000001, gf100_clk_new },
.devinit = gf100_devinit_new,
.devinit = { 0x00000001, gf100_devinit_new },
.fb = gf100_fb_new,
.fuse = gf100_fuse_new,
.gpio = gf119_gpio_new,
......@@ -1669,7 +1669,7 @@ nve4_chipset = {
.bios = { 0x00000001, nvkm_bios_new },
.bus = { 0x00000001, gf100_bus_new },
.clk = { 0x00000001, gk104_clk_new },
.devinit = gf100_devinit_new,
.devinit = { 0x00000001, gf100_devinit_new },
.fb = gk104_fb_new,
.fuse = gf100_fuse_new,
.gpio = gk104_gpio_new,
......@@ -1708,7 +1708,7 @@ nve6_chipset = {
.bios = { 0x00000001, nvkm_bios_new },
.bus = { 0x00000001, gf100_bus_new },
.clk = { 0x00000001, gk104_clk_new },
.devinit = gf100_devinit_new,
.devinit = { 0x00000001, gf100_devinit_new },
.fb = gk104_fb_new,
.fuse = gf100_fuse_new,
.gpio = gk104_gpio_new,
......@@ -1747,7 +1747,7 @@ nve7_chipset = {
.bios = { 0x00000001, nvkm_bios_new },
.bus = { 0x00000001, gf100_bus_new },
.clk = { 0x00000001, gk104_clk_new },
.devinit = gf100_devinit_new,
.devinit = { 0x00000001, gf100_devinit_new },
.fb = gk104_fb_new,
.fuse = gf100_fuse_new,
.gpio = gk104_gpio_new,
......@@ -1811,7 +1811,7 @@ nvf0_chipset = {
.bios = { 0x00000001, nvkm_bios_new },
.bus = { 0x00000001, gf100_bus_new },
.clk = { 0x00000001, gk104_clk_new },
.devinit = gf100_devinit_new,
.devinit = { 0x00000001, gf100_devinit_new },
.fb = gk110_fb_new,
.fuse = gf100_fuse_new,
.gpio = gk104_gpio_new,
......@@ -1849,7 +1849,7 @@ nvf1_chipset = {
.bios = { 0x00000001, nvkm_bios_new },
.bus = { 0x00000001, gf100_bus_new },
.clk = { 0x00000001, gk104_clk_new },
.devinit = gf100_devinit_new,
.devinit = { 0x00000001, gf100_devinit_new },
.fb = gk110_fb_new,
.fuse = gf100_fuse_new,
.gpio = gk104_gpio_new,
......@@ -1887,7 +1887,7 @@ nv106_chipset = {
.bios = { 0x00000001, nvkm_bios_new },
.bus = { 0x00000001, gf100_bus_new },
.clk = { 0x00000001, gk104_clk_new },
.devinit = gf100_devinit_new,
.devinit = { 0x00000001, gf100_devinit_new },
.fb = gk110_fb_new,
.fuse = gf100_fuse_new,
.gpio = gk104_gpio_new,
......@@ -1925,7 +1925,7 @@ nv108_chipset = {
.bios = { 0x00000001, nvkm_bios_new },
.bus = { 0x00000001, gf100_bus_new },
.clk = { 0x00000001, gk104_clk_new },
.devinit = gf100_devinit_new,
.devinit = { 0x00000001, gf100_devinit_new },
.fb = gk110_fb_new,
.fuse = gf100_fuse_new,
.gpio = gk104_gpio_new,
......@@ -1963,7 +1963,7 @@ nv117_chipset = {
.bios = { 0x00000001, nvkm_bios_new },
.bus = { 0x00000001, gf100_bus_new },
.clk = { 0x00000001, gk104_clk_new },
.devinit = gm107_devinit_new,
.devinit = { 0x00000001, gm107_devinit_new },
.fb = gm107_fb_new,
.fuse = gm107_fuse_new,
.gpio = gk104_gpio_new,
......@@ -1999,7 +1999,7 @@ nv118_chipset = {
.bios = { 0x00000001, nvkm_bios_new },
.bus = { 0x00000001, gf100_bus_new },
.clk = { 0x00000001, gk104_clk_new },
.devinit = gm107_devinit_new,
.devinit = { 0x00000001, gm107_devinit_new },
.fb = gm107_fb_new,
.fuse = gm107_fuse_new,
.gpio = gk104_gpio_new,
......@@ -2033,7 +2033,7 @@ nv120_chipset = {
.bar = { 0x00000001, gm107_bar_new },
.bios = { 0x00000001, nvkm_bios_new },
.bus = { 0x00000001, gf100_bus_new },
.devinit = gm200_devinit_new,
.devinit = { 0x00000001, gm200_devinit_new },
.fb = gm200_fb_new,
.fuse = gm107_fuse_new,
.gpio = gk104_gpio_new,
......@@ -2071,7 +2071,7 @@ nv124_chipset = {
.bar = { 0x00000001, gm107_bar_new },
.bios = { 0x00000001, nvkm_bios_new },
.bus = { 0x00000001, gf100_bus_new },
.devinit = gm200_devinit_new,
.devinit = { 0x00000001, gm200_devinit_new },
.fb = gm200_fb_new,
.fuse = gm107_fuse_new,
.gpio = gk104_gpio_new,
......@@ -2109,7 +2109,7 @@ nv126_chipset = {
.bar = { 0x00000001, gm107_bar_new },
.bios = { 0x00000001, nvkm_bios_new },
.bus = { 0x00000001, gf100_bus_new },
.devinit = gm200_devinit_new,
.devinit = { 0x00000001, gm200_devinit_new },
.fb = gm200_fb_new,
.fuse = gm107_fuse_new,
.gpio = gk104_gpio_new,
......@@ -2171,7 +2171,7 @@ nv130_chipset = {
.bar = { 0x00000001, gm107_bar_new },
.bios = { 0x00000001, nvkm_bios_new },
.bus = { 0x00000001, gf100_bus_new },
.devinit = gm200_devinit_new,
.devinit = { 0x00000001, gm200_devinit_new },
.fault = gp100_fault_new,
.fb = gp100_fb_new,
.fuse = gm107_fuse_new,
......@@ -2211,7 +2211,7 @@ nv132_chipset = {
.bar = { 0x00000001, gm107_bar_new },
.bios = { 0x00000001, nvkm_bios_new },
.bus = { 0x00000001, gf100_bus_new },
.devinit = gm200_devinit_new,
.devinit = { 0x00000001, gm200_devinit_new },
.fault = gp100_fault_new,
.fb = gp102_fb_new,
.fuse = gm107_fuse_new,
......@@ -2249,7 +2249,7 @@ nv134_chipset = {
.bar = { 0x00000001, gm107_bar_new },
.bios = { 0x00000001, nvkm_bios_new },
.bus = { 0x00000001, gf100_bus_new },
.devinit = gm200_devinit_new,
.devinit = { 0x00000001, gm200_devinit_new },
.fault = gp100_fault_new,
.fb = gp102_fb_new,
.fuse = gm107_fuse_new,
......@@ -2287,7 +2287,7 @@ nv136_chipset = {
.bar = { 0x00000001, gm107_bar_new },
.bios = { 0x00000001, nvkm_bios_new },
.bus = { 0x00000001, gf100_bus_new },
.devinit = gm200_devinit_new,
.devinit = { 0x00000001, gm200_devinit_new },
.fault = gp100_fault_new,
.fb = gp102_fb_new,
.fuse = gm107_fuse_new,
......@@ -2324,7 +2324,7 @@ nv137_chipset = {
.bar = { 0x00000001, gm107_bar_new },
.bios = { 0x00000001, nvkm_bios_new },
.bus = { 0x00000001, gf100_bus_new },
.devinit = gm200_devinit_new,
.devinit = { 0x00000001, gm200_devinit_new },
.fault = gp100_fault_new,
.fb = gp102_fb_new,
.fuse = gm107_fuse_new,
......@@ -2362,7 +2362,7 @@ nv138_chipset = {
.bar = { 0x00000001, gm107_bar_new },
.bios = { 0x00000001, nvkm_bios_new },
.bus = { 0x00000001, gf100_bus_new },
.devinit = gm200_devinit_new,
.devinit = { 0x00000001, gm200_devinit_new },
.fault = gp100_fault_new,
.fb = gp102_fb_new,
.fuse = gm107_fuse_new,
......@@ -2422,7 +2422,7 @@ nv140_chipset = {
.bar = { 0x00000001, gm107_bar_new },
.bios = { 0x00000001, nvkm_bios_new },
.bus = { 0x00000001, gf100_bus_new },
.devinit = gv100_devinit_new,
.devinit = { 0x00000001, gv100_devinit_new },
.fault = gv100_fault_new,
.fb = gv100_fb_new,
.fuse = gm107_fuse_new,
......@@ -2466,7 +2466,7 @@ nv162_chipset = {
.bar = { 0x00000001, tu102_bar_new },
.bios = { 0x00000001, nvkm_bios_new },
.bus = { 0x00000001, gf100_bus_new },
.devinit = tu102_devinit_new,
.devinit = { 0x00000001, tu102_devinit_new },
.fault = tu102_fault_new,
.fb = gv100_fb_new,
.fuse = gm107_fuse_new,
......@@ -2504,7 +2504,7 @@ nv164_chipset = {
.bar = { 0x00000001, tu102_bar_new },
.bios = { 0x00000001, nvkm_bios_new },
.bus = { 0x00000001, gf100_bus_new },
.devinit = tu102_devinit_new,
.devinit = { 0x00000001, tu102_devinit_new },
.fault = tu102_fault_new,
.fb = gv100_fb_new,
.fuse = gm107_fuse_new,
......@@ -2543,7 +2543,7 @@ nv166_chipset = {
.bar = { 0x00000001, tu102_bar_new },
.bios = { 0x00000001, nvkm_bios_new },
.bus = { 0x00000001, gf100_bus_new },
.devinit = tu102_devinit_new,
.devinit = { 0x00000001, tu102_devinit_new },
.fault = tu102_fault_new,
.fb = gv100_fb_new,
.fuse = gm107_fuse_new,
......@@ -2583,7 +2583,7 @@ nv167_chipset = {
.bar = { 0x00000001, tu102_bar_new },
.bios = { 0x00000001, nvkm_bios_new },
.bus = { 0x00000001, gf100_bus_new },
.devinit = tu102_devinit_new,
.devinit = { 0x00000001, tu102_devinit_new },
.fault = tu102_fault_new,
.fb = gv100_fb_new,
.fuse = gm107_fuse_new,
......@@ -2621,7 +2621,7 @@ nv168_chipset = {
.bar = { 0x00000001, tu102_bar_new },
.bios = { 0x00000001, nvkm_bios_new },
.bus = { 0x00000001, gf100_bus_new },
.devinit = tu102_devinit_new,
.devinit = { 0x00000001, tu102_devinit_new },
.fault = tu102_fault_new,
.fb = gv100_fb_new,
.fuse = gm107_fuse_new,
......@@ -2657,7 +2657,7 @@ nv170_chipset = {
.name = "GA100",
.bar = { 0x00000001, tu102_bar_new },
.bios = { 0x00000001, nvkm_bios_new },
.devinit = ga100_devinit_new,
.devinit = { 0x00000001, ga100_devinit_new },
.fb = ga100_fb_new,
.gpio = gk104_gpio_new,
.i2c = gm200_i2c_new,
......@@ -2674,7 +2674,7 @@ nv172_chipset = {
.name = "GA102",
.bar = { 0x00000001, tu102_bar_new },
.bios = { 0x00000001, nvkm_bios_new },
.devinit = ga100_devinit_new,
.devinit = { 0x00000001, ga100_devinit_new },
.fb = ga102_fb_new,
.gpio = ga102_gpio_new,
.i2c = gm200_i2c_new,
......@@ -2693,7 +2693,7 @@ nv174_chipset = {
.name = "GA104",
.bar = { 0x00000001, tu102_bar_new },
.bios = { 0x00000001, nvkm_bios_new },
.devinit = ga100_devinit_new,
.devinit = { 0x00000001, ga100_devinit_new },
.fb = ga102_fb_new,
.gpio = ga102_gpio_new,
.i2c = gm200_i2c_new,
......@@ -3248,7 +3248,6 @@ nvkm_device_ctor(const struct nvkm_device_func *func,
#include <core/layout.h>
#undef NVKM_LAYOUT_INST
#undef NVKM_LAYOUT_ONCE
_(NVKM_SUBDEV_DEVINIT , devinit);
_(NVKM_SUBDEV_FAULT , fault);
_(NVKM_SUBDEV_FB , fb);
_(NVKM_SUBDEV_FUSE , fuse);
......
......@@ -126,11 +126,10 @@ nvkm_devinit = {
};
void
nvkm_devinit_ctor(const struct nvkm_devinit_func *func,
struct nvkm_device *device, int index,
struct nvkm_devinit *init)
nvkm_devinit_ctor(const struct nvkm_devinit_func *func, struct nvkm_device *device,
enum nvkm_subdev_type type, int inst, struct nvkm_devinit *init)
{
nvkm_subdev_ctor(&nvkm_devinit, device, index, &init->subdev);
nvkm_subdev_ctor(&nvkm_devinit, device, type, inst, &init->subdev);
init->func = func;
init->force_post = nvkm_boolopt(device->cfgopt, "NvForcePost", false);
}
......@@ -61,8 +61,8 @@ g84_devinit = {
};
int
g84_devinit_new(struct nvkm_device *device, int index,
g84_devinit_new(struct nvkm_device *device, enum nvkm_subdev_type type, int inst,
struct nvkm_devinit **pinit)
{
return nv50_devinit_new_(&g84_devinit, device, index, pinit);
return nv50_devinit_new_(&g84_devinit, device, type, inst, pinit);
}
......@@ -60,8 +60,8 @@ g98_devinit = {
};
int
g98_devinit_new(struct nvkm_device *device, int index,
g98_devinit_new(struct nvkm_device *device, enum nvkm_subdev_type type, int inst,
struct nvkm_devinit **pinit)
{
return nv50_devinit_new_(&g98_devinit, device, index, pinit);
return nv50_devinit_new_(&g98_devinit, device, type, inst, pinit);
}
......@@ -70,7 +70,8 @@ ga100_devinit = {
};
int
ga100_devinit_new(struct nvkm_device *device, int index, struct nvkm_devinit **pinit)
ga100_devinit_new(struct nvkm_device *device, enum nvkm_subdev_type type, int inst,
struct nvkm_devinit **pinit)
{
return nv50_devinit_new_(&ga100_devinit, device, index, pinit);
return nv50_devinit_new_(&ga100_devinit, device, type, inst, pinit);
}
......@@ -114,8 +114,8 @@ gf100_devinit = {
};
int
gf100_devinit_new(struct nvkm_device *device, int index,
gf100_devinit_new(struct nvkm_device *device, enum nvkm_subdev_type type, int inst,
struct nvkm_devinit **pinit)
{
return nv50_devinit_new_(&gf100_devinit, device, index, pinit);
return nv50_devinit_new_(&gf100_devinit, device, type, inst, pinit);
}
......@@ -54,8 +54,8 @@ gm107_devinit = {
};
int
gm107_devinit_new(struct nvkm_device *device, int index,
gm107_devinit_new(struct nvkm_device *device, enum nvkm_subdev_type type, int inst,
struct nvkm_devinit **pinit)
{
return nv50_devinit_new_(&gm107_devinit, device, index, pinit);
return nv50_devinit_new_(&gm107_devinit, device, type, inst, pinit);
}
......@@ -179,8 +179,8 @@ gm200_devinit = {
};
int
gm200_devinit_new(struct nvkm_device *device, int index,
gm200_devinit_new(struct nvkm_device *device, enum nvkm_subdev_type type, int inst,
struct nvkm_devinit **pinit)
{
return nv50_devinit_new_(&gm200_devinit, device, index, pinit);
return nv50_devinit_new_(&gm200_devinit, device, type, inst, pinit);
}
......@@ -146,8 +146,8 @@ gt215_devinit = {
};
int
gt215_devinit_new(struct nvkm_device *device, int index,
gt215_devinit_new(struct nvkm_device *device, enum nvkm_subdev_type type, int inst,
struct nvkm_devinit **pinit)
{
return nv50_devinit_new_(&gt215_devinit, device, index, pinit);
return nv50_devinit_new_(&gt215_devinit, device, type, inst, pinit);
}
......@@ -72,8 +72,8 @@ gv100_devinit = {
};
int
gv100_devinit_new(struct nvkm_device *device, int index,
gv100_devinit_new(struct nvkm_device *device, enum nvkm_subdev_type type, int inst,
struct nvkm_devinit **pinit)
{
return nv50_devinit_new_(&gv100_devinit, device, index, pinit);
return nv50_devinit_new_(&gv100_devinit, device, type, inst, pinit);
}
......@@ -61,8 +61,8 @@ mcp89_devinit = {
};
int
mcp89_devinit_new(struct nvkm_device *device, int index,
mcp89_devinit_new(struct nvkm_device *device, enum nvkm_subdev_type type, int inst,
struct nvkm_devinit **pinit)
{
return nv50_devinit_new_(&mcp89_devinit, device, index, pinit);
return nv50_devinit_new_(&mcp89_devinit, device, type, inst, pinit);
}
......@@ -434,9 +434,8 @@ nv04_devinit_dtor(struct nvkm_devinit *base)
}
int
nv04_devinit_new_(const struct nvkm_devinit_func *func,
struct nvkm_device *device, int index,
struct nvkm_devinit **pinit)
nv04_devinit_new_(const struct nvkm_devinit_func *func, struct nvkm_device *device,
enum nvkm_subdev_type type, int inst, struct nvkm_devinit **pinit)
{
struct nv04_devinit *init;
......@@ -444,7 +443,7 @@ nv04_devinit_new_(const struct nvkm_devinit_func *func,
return -ENOMEM;
*pinit = &init->base;
nvkm_devinit_ctor(func, device, index, &init->base);
nvkm_devinit_ctor(func, device, type, inst, &init->base);
init->owner = -1;
return 0;
}
......@@ -459,8 +458,8 @@ nv04_devinit = {
};
int
nv04_devinit_new(struct nvkm_device *device, int index,
nv04_devinit_new(struct nvkm_device *device, enum nvkm_subdev_type type, int inst,
struct nvkm_devinit **pinit)
{
return nv04_devinit_new_(&nv04_devinit, device, index, pinit);
return nv04_devinit_new_(&nv04_devinit, device, type, inst, pinit);
}
......@@ -11,7 +11,7 @@ struct nv04_devinit {
};
int nv04_devinit_new_(const struct nvkm_devinit_func *, struct nvkm_device *,
int, struct nvkm_devinit **);
enum nvkm_subdev_type, int, struct nvkm_devinit **);
void *nv04_devinit_dtor(struct nvkm_devinit *);
void nv04_devinit_preinit(struct nvkm_devinit *);
void nv04_devinit_fini(struct nvkm_devinit *);
......
......@@ -136,8 +136,8 @@ nv05_devinit = {
};
int
nv05_devinit_new(struct nvkm_device *device, int index,
nv05_devinit_new(struct nvkm_device *device, enum nvkm_subdev_type type, int inst,
struct nvkm_devinit **pinit)
{
return nv04_devinit_new_(&nv05_devinit, device, index, pinit);
return nv04_devinit_new_(&nv05_devinit, device, type, inst, pinit);
}
......@@ -106,8 +106,8 @@ nv10_devinit = {
};
int
nv10_devinit_new(struct nvkm_device *device, int index,
nv10_devinit_new(struct nvkm_device *device, enum nvkm_subdev_type type, int inst,
struct nvkm_devinit **pinit)
{
return nv04_devinit_new_(&nv10_devinit, device, index, pinit);
return nv04_devinit_new_(&nv10_devinit, device, type, inst, pinit);
}
......@@ -35,8 +35,8 @@ nv1a_devinit = {
};
int
nv1a_devinit_new(struct nvkm_device *device, int index,
nv1a_devinit_new(struct nvkm_device *device, enum nvkm_subdev_type type, int inst,
struct nvkm_devinit **pinit)
{
return nv04_devinit_new_(&nv1a_devinit, device, index, pinit);
return nv04_devinit_new_(&nv1a_devinit, device, type, inst, pinit);
}
......@@ -72,8 +72,8 @@ nv20_devinit = {
};
int
nv20_devinit_new(struct nvkm_device *device, int index,
nv20_devinit_new(struct nvkm_device *device, enum nvkm_subdev_type type, int inst,
struct nvkm_devinit **pinit)
{
return nv04_devinit_new_(&nv20_devinit, device, index, pinit);
return nv04_devinit_new_(&nv20_devinit, device, type, inst, pinit);
}
......@@ -148,9 +148,8 @@ nv50_devinit_init(struct nvkm_devinit *base)
}
int
nv50_devinit_new_(const struct nvkm_devinit_func *func,
struct nvkm_device *device, int index,
struct nvkm_devinit **pinit)
nv50_devinit_new_(const struct nvkm_devinit_func *func, struct nvkm_device *device,
enum nvkm_subdev_type type, int inst, struct nvkm_devinit **pinit)
{
struct nv50_devinit *init;
......@@ -158,7 +157,7 @@ nv50_devinit_new_(const struct nvkm_devinit_func *func,
return -ENOMEM;
*pinit = &init->base;
nvkm_devinit_ctor(func, device, index, &init->base);
nvkm_devinit_ctor(func, device, type, inst, &init->base);
return 0;
}
......@@ -172,8 +171,8 @@ nv50_devinit = {
};
int
nv50_devinit_new(struct nvkm_device *device, int index,
nv50_devinit_new(struct nvkm_device *device, enum nvkm_subdev_type type, int inst,
struct nvkm_devinit **pinit)
{
return nv50_devinit_new_(&nv50_devinit, device, index, pinit);
return nv50_devinit_new_(&nv50_devinit, device, type, inst, pinit);
}
......@@ -9,7 +9,7 @@ struct nv50_devinit {
u32 r001540;
};
int nv50_devinit_new_(const struct nvkm_devinit_func *, struct nvkm_device *,
int nv50_devinit_new_(const struct nvkm_devinit_func *, struct nvkm_device *, enum nvkm_subdev_type,
int, struct nvkm_devinit **);
void nv50_devinit_preinit(struct nvkm_devinit *);
void nv50_devinit_init(struct nvkm_devinit *);
......
......@@ -16,7 +16,7 @@ struct nvkm_devinit_func {
};
void nvkm_devinit_ctor(const struct nvkm_devinit_func *, struct nvkm_device *,
int index, struct nvkm_devinit *);
enum nvkm_subdev_type, int inst, struct nvkm_devinit *);
int nv04_devinit_post(struct nvkm_devinit *, bool);
int tu102_devinit_post(struct nvkm_devinit *, bool);
......
......@@ -82,8 +82,8 @@ tu102_devinit = {
};
int
tu102_devinit_new(struct nvkm_device *device, int index,
tu102_devinit_new(struct nvkm_device *device, enum nvkm_subdev_type type, int inst,
struct nvkm_devinit **pinit)
{
return nv50_devinit_new_(&tu102_devinit, device, index, pinit);
return nv50_devinit_new_(&tu102_devinit, device, type, inst, pinit);
}
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