Commit 8d056d99 authored by Ben Skeggs's avatar Ben Skeggs

drm/nouveau/fuse: switch to instanced constructor

Signed-off-by: default avatarBen Skeggs <bskeggs@redhat.com>
Reviewed-by: default avatarLyude Paul <lyude@redhat.com>
parent b7a9369a
...@@ -60,7 +60,6 @@ struct nvkm_device { ...@@ -60,7 +60,6 @@ struct nvkm_device {
struct notifier_block nb; struct notifier_block nb;
} acpi; } acpi;
struct nvkm_fuse *fuse;
struct nvkm_gpio *gpio; struct nvkm_gpio *gpio;
struct nvkm_gsp *gsp; struct nvkm_gsp *gsp;
struct nvkm_i2c *i2c; struct nvkm_i2c *i2c;
...@@ -140,7 +139,6 @@ struct nvkm_device_chip { ...@@ -140,7 +139,6 @@ struct nvkm_device_chip {
#include <core/layout.h> #include <core/layout.h>
#undef NVKM_LAYOUT_INST #undef NVKM_LAYOUT_INST
#undef NVKM_LAYOUT_ONCE #undef NVKM_LAYOUT_ONCE
int (*fuse )(struct nvkm_device *, int idx, struct nvkm_fuse **);
int (*gpio )(struct nvkm_device *, int idx, struct nvkm_gpio **); int (*gpio )(struct nvkm_device *, int idx, struct nvkm_gpio **);
int (*gsp )(struct nvkm_device *, int idx, struct nvkm_gsp **); int (*gsp )(struct nvkm_device *, int idx, struct nvkm_gsp **);
int (*i2c )(struct nvkm_device *, int idx, struct nvkm_i2c **); int (*i2c )(struct nvkm_device *, int idx, struct nvkm_i2c **);
......
/* SPDX-License-Identifier: MIT */ /* SPDX-License-Identifier: MIT */
NVKM_LAYOUT_ONCE(NVKM_SUBDEV_VBIOS , struct nvkm_bios , bios) 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_DEVINIT , struct nvkm_devinit , devinit)
NVKM_LAYOUT_ONCE(NVKM_SUBDEV_FUSE , struct nvkm_fuse , fuse)
NVKM_LAYOUT_ONCE(NVKM_SUBDEV_BUS , struct nvkm_bus , bus) NVKM_LAYOUT_ONCE(NVKM_SUBDEV_BUS , struct nvkm_bus , bus)
NVKM_LAYOUT_ONCE(NVKM_SUBDEV_FB , struct nvkm_fb , fb) NVKM_LAYOUT_ONCE(NVKM_SUBDEV_FB , struct nvkm_fb , fb)
NVKM_LAYOUT_ONCE(NVKM_SUBDEV_BAR , struct nvkm_bar , bar) NVKM_LAYOUT_ONCE(NVKM_SUBDEV_BAR , struct nvkm_bar , bar)
......
...@@ -11,7 +11,7 @@ struct nvkm_fuse { ...@@ -11,7 +11,7 @@ struct nvkm_fuse {
u32 nvkm_fuse_read(struct nvkm_fuse *, u32 addr); u32 nvkm_fuse_read(struct nvkm_fuse *, u32 addr);
int nv50_fuse_new(struct nvkm_device *, int, struct nvkm_fuse **); int nv50_fuse_new(struct nvkm_device *, enum nvkm_subdev_type, int inst, struct nvkm_fuse **);
int gf100_fuse_new(struct nvkm_device *, int, struct nvkm_fuse **); int gf100_fuse_new(struct nvkm_device *, enum nvkm_subdev_type, int inst, struct nvkm_fuse **);
int gm107_fuse_new(struct nvkm_device *, int, struct nvkm_fuse **); int gm107_fuse_new(struct nvkm_device *, enum nvkm_subdev_type, int inst, struct nvkm_fuse **);
#endif #endif
...@@ -33,7 +33,6 @@ nvkm_subdev_type[NVKM_SUBDEV_NR] = { ...@@ -33,7 +33,6 @@ nvkm_subdev_type[NVKM_SUBDEV_NR] = {
#include <core/layout.h> #include <core/layout.h>
#undef NVKM_LAYOUT_ONCE #undef NVKM_LAYOUT_ONCE
#undef NVKM_LAYOUT_INST #undef NVKM_LAYOUT_INST
[NVKM_SUBDEV_FUSE ] = "fuse",
[NVKM_SUBDEV_GPIO ] = "gpio", [NVKM_SUBDEV_GPIO ] = "gpio",
[NVKM_SUBDEV_GSP ] = "gsp", [NVKM_SUBDEV_GSP ] = "gsp",
[NVKM_SUBDEV_I2C ] = "i2c", [NVKM_SUBDEV_I2C ] = "i2c",
......
...@@ -816,7 +816,7 @@ nv50_chipset = { ...@@ -816,7 +816,7 @@ nv50_chipset = {
.clk = { 0x00000001, nv50_clk_new }, .clk = { 0x00000001, nv50_clk_new },
.devinit = { 0x00000001, nv50_devinit_new }, .devinit = { 0x00000001, nv50_devinit_new },
.fb = { 0x00000001, nv50_fb_new }, .fb = { 0x00000001, nv50_fb_new },
.fuse = nv50_fuse_new, .fuse = { 0x00000001, nv50_fuse_new },
.gpio = nv50_gpio_new, .gpio = nv50_gpio_new,
.i2c = nv50_i2c_new, .i2c = nv50_i2c_new,
.imem = nv50_instmem_new, .imem = nv50_instmem_new,
...@@ -923,7 +923,7 @@ nv84_chipset = { ...@@ -923,7 +923,7 @@ nv84_chipset = {
.clk = { 0x00000001, g84_clk_new }, .clk = { 0x00000001, g84_clk_new },
.devinit = { 0x00000001, g84_devinit_new }, .devinit = { 0x00000001, g84_devinit_new },
.fb = { 0x00000001, g84_fb_new }, .fb = { 0x00000001, g84_fb_new },
.fuse = nv50_fuse_new, .fuse = { 0x00000001, nv50_fuse_new },
.gpio = nv50_gpio_new, .gpio = nv50_gpio_new,
.i2c = nv50_i2c_new, .i2c = nv50_i2c_new,
.imem = nv50_instmem_new, .imem = nv50_instmem_new,
...@@ -955,7 +955,7 @@ nv86_chipset = { ...@@ -955,7 +955,7 @@ nv86_chipset = {
.clk = { 0x00000001, g84_clk_new }, .clk = { 0x00000001, g84_clk_new },
.devinit = { 0x00000001, g84_devinit_new }, .devinit = { 0x00000001, g84_devinit_new },
.fb = { 0x00000001, g84_fb_new }, .fb = { 0x00000001, g84_fb_new },
.fuse = nv50_fuse_new, .fuse = { 0x00000001, nv50_fuse_new },
.gpio = nv50_gpio_new, .gpio = nv50_gpio_new,
.i2c = nv50_i2c_new, .i2c = nv50_i2c_new,
.imem = nv50_instmem_new, .imem = nv50_instmem_new,
...@@ -987,7 +987,7 @@ nv92_chipset = { ...@@ -987,7 +987,7 @@ nv92_chipset = {
.clk = { 0x00000001, g84_clk_new }, .clk = { 0x00000001, g84_clk_new },
.devinit = { 0x00000001, g84_devinit_new }, .devinit = { 0x00000001, g84_devinit_new },
.fb = { 0x00000001, g84_fb_new }, .fb = { 0x00000001, g84_fb_new },
.fuse = nv50_fuse_new, .fuse = { 0x00000001, nv50_fuse_new },
.gpio = nv50_gpio_new, .gpio = nv50_gpio_new,
.i2c = nv50_i2c_new, .i2c = nv50_i2c_new,
.imem = nv50_instmem_new, .imem = nv50_instmem_new,
...@@ -1019,7 +1019,7 @@ nv94_chipset = { ...@@ -1019,7 +1019,7 @@ nv94_chipset = {
.clk = { 0x00000001, g84_clk_new }, .clk = { 0x00000001, g84_clk_new },
.devinit = { 0x00000001, g84_devinit_new }, .devinit = { 0x00000001, g84_devinit_new },
.fb = { 0x00000001, g84_fb_new }, .fb = { 0x00000001, g84_fb_new },
.fuse = nv50_fuse_new, .fuse = { 0x00000001, nv50_fuse_new },
.gpio = g94_gpio_new, .gpio = g94_gpio_new,
.i2c = g94_i2c_new, .i2c = g94_i2c_new,
.imem = nv50_instmem_new, .imem = nv50_instmem_new,
...@@ -1051,7 +1051,7 @@ nv96_chipset = { ...@@ -1051,7 +1051,7 @@ nv96_chipset = {
.clk = { 0x00000001, g84_clk_new }, .clk = { 0x00000001, g84_clk_new },
.devinit = { 0x00000001, g84_devinit_new }, .devinit = { 0x00000001, g84_devinit_new },
.fb = { 0x00000001, g84_fb_new }, .fb = { 0x00000001, g84_fb_new },
.fuse = nv50_fuse_new, .fuse = { 0x00000001, nv50_fuse_new },
.gpio = g94_gpio_new, .gpio = g94_gpio_new,
.i2c = g94_i2c_new, .i2c = g94_i2c_new,
.imem = nv50_instmem_new, .imem = nv50_instmem_new,
...@@ -1083,7 +1083,7 @@ nv98_chipset = { ...@@ -1083,7 +1083,7 @@ nv98_chipset = {
.clk = { 0x00000001, g84_clk_new }, .clk = { 0x00000001, g84_clk_new },
.devinit = { 0x00000001, g98_devinit_new }, .devinit = { 0x00000001, g98_devinit_new },
.fb = { 0x00000001, g84_fb_new }, .fb = { 0x00000001, g84_fb_new },
.fuse = nv50_fuse_new, .fuse = { 0x00000001, nv50_fuse_new },
.gpio = g94_gpio_new, .gpio = g94_gpio_new,
.i2c = g94_i2c_new, .i2c = g94_i2c_new,
.imem = nv50_instmem_new, .imem = nv50_instmem_new,
...@@ -1115,7 +1115,7 @@ nva0_chipset = { ...@@ -1115,7 +1115,7 @@ nva0_chipset = {
.clk = { 0x00000001, g84_clk_new }, .clk = { 0x00000001, g84_clk_new },
.devinit = { 0x00000001, g84_devinit_new }, .devinit = { 0x00000001, g84_devinit_new },
.fb = { 0x00000001, g84_fb_new }, .fb = { 0x00000001, g84_fb_new },
.fuse = nv50_fuse_new, .fuse = { 0x00000001, nv50_fuse_new },
.gpio = g94_gpio_new, .gpio = g94_gpio_new,
.i2c = nv50_i2c_new, .i2c = nv50_i2c_new,
.imem = nv50_instmem_new, .imem = nv50_instmem_new,
...@@ -1147,7 +1147,7 @@ nva3_chipset = { ...@@ -1147,7 +1147,7 @@ nva3_chipset = {
.clk = { 0x00000001, gt215_clk_new }, .clk = { 0x00000001, gt215_clk_new },
.devinit = { 0x00000001, gt215_devinit_new }, .devinit = { 0x00000001, gt215_devinit_new },
.fb = { 0x00000001, gt215_fb_new }, .fb = { 0x00000001, gt215_fb_new },
.fuse = nv50_fuse_new, .fuse = { 0x00000001, nv50_fuse_new },
.gpio = g94_gpio_new, .gpio = g94_gpio_new,
.i2c = g94_i2c_new, .i2c = g94_i2c_new,
.imem = nv50_instmem_new, .imem = nv50_instmem_new,
...@@ -1181,7 +1181,7 @@ nva5_chipset = { ...@@ -1181,7 +1181,7 @@ nva5_chipset = {
.clk = { 0x00000001, gt215_clk_new }, .clk = { 0x00000001, gt215_clk_new },
.devinit = { 0x00000001, gt215_devinit_new }, .devinit = { 0x00000001, gt215_devinit_new },
.fb = { 0x00000001, gt215_fb_new }, .fb = { 0x00000001, gt215_fb_new },
.fuse = nv50_fuse_new, .fuse = { 0x00000001, nv50_fuse_new },
.gpio = g94_gpio_new, .gpio = g94_gpio_new,
.i2c = g94_i2c_new, .i2c = g94_i2c_new,
.imem = nv50_instmem_new, .imem = nv50_instmem_new,
...@@ -1214,7 +1214,7 @@ nva8_chipset = { ...@@ -1214,7 +1214,7 @@ nva8_chipset = {
.clk = { 0x00000001, gt215_clk_new }, .clk = { 0x00000001, gt215_clk_new },
.devinit = { 0x00000001, gt215_devinit_new }, .devinit = { 0x00000001, gt215_devinit_new },
.fb = { 0x00000001, gt215_fb_new }, .fb = { 0x00000001, gt215_fb_new },
.fuse = nv50_fuse_new, .fuse = { 0x00000001, nv50_fuse_new },
.gpio = g94_gpio_new, .gpio = g94_gpio_new,
.i2c = g94_i2c_new, .i2c = g94_i2c_new,
.imem = nv50_instmem_new, .imem = nv50_instmem_new,
...@@ -1247,7 +1247,7 @@ nvaa_chipset = { ...@@ -1247,7 +1247,7 @@ nvaa_chipset = {
.clk = { 0x00000001, mcp77_clk_new }, .clk = { 0x00000001, mcp77_clk_new },
.devinit = { 0x00000001, g98_devinit_new }, .devinit = { 0x00000001, g98_devinit_new },
.fb = { 0x00000001, mcp77_fb_new }, .fb = { 0x00000001, mcp77_fb_new },
.fuse = nv50_fuse_new, .fuse = { 0x00000001, nv50_fuse_new },
.gpio = g94_gpio_new, .gpio = g94_gpio_new,
.i2c = g94_i2c_new, .i2c = g94_i2c_new,
.imem = nv50_instmem_new, .imem = nv50_instmem_new,
...@@ -1279,7 +1279,7 @@ nvac_chipset = { ...@@ -1279,7 +1279,7 @@ nvac_chipset = {
.clk = { 0x00000001, mcp77_clk_new }, .clk = { 0x00000001, mcp77_clk_new },
.devinit = { 0x00000001, g98_devinit_new }, .devinit = { 0x00000001, g98_devinit_new },
.fb = { 0x00000001, mcp77_fb_new }, .fb = { 0x00000001, mcp77_fb_new },
.fuse = nv50_fuse_new, .fuse = { 0x00000001, nv50_fuse_new },
.gpio = g94_gpio_new, .gpio = g94_gpio_new,
.i2c = g94_i2c_new, .i2c = g94_i2c_new,
.imem = nv50_instmem_new, .imem = nv50_instmem_new,
...@@ -1311,7 +1311,7 @@ nvaf_chipset = { ...@@ -1311,7 +1311,7 @@ nvaf_chipset = {
.clk = { 0x00000001, gt215_clk_new }, .clk = { 0x00000001, gt215_clk_new },
.devinit = { 0x00000001, mcp89_devinit_new }, .devinit = { 0x00000001, mcp89_devinit_new },
.fb = { 0x00000001, mcp89_fb_new }, .fb = { 0x00000001, mcp89_fb_new },
.fuse = nv50_fuse_new, .fuse = { 0x00000001, nv50_fuse_new },
.gpio = g94_gpio_new, .gpio = g94_gpio_new,
.i2c = g94_i2c_new, .i2c = g94_i2c_new,
.imem = nv50_instmem_new, .imem = nv50_instmem_new,
...@@ -1344,7 +1344,7 @@ nvc0_chipset = { ...@@ -1344,7 +1344,7 @@ nvc0_chipset = {
.clk = { 0x00000001, gf100_clk_new }, .clk = { 0x00000001, gf100_clk_new },
.devinit = { 0x00000001, gf100_devinit_new }, .devinit = { 0x00000001, gf100_devinit_new },
.fb = { 0x00000001, gf100_fb_new }, .fb = { 0x00000001, gf100_fb_new },
.fuse = gf100_fuse_new, .fuse = { 0x00000001, gf100_fuse_new },
.gpio = g94_gpio_new, .gpio = g94_gpio_new,
.i2c = g94_i2c_new, .i2c = g94_i2c_new,
.ibus = gf100_ibus_new, .ibus = gf100_ibus_new,
...@@ -1381,7 +1381,7 @@ nvc1_chipset = { ...@@ -1381,7 +1381,7 @@ nvc1_chipset = {
.clk = { 0x00000001, gf100_clk_new }, .clk = { 0x00000001, gf100_clk_new },
.devinit = { 0x00000001, gf100_devinit_new }, .devinit = { 0x00000001, gf100_devinit_new },
.fb = { 0x00000001, gf108_fb_new }, .fb = { 0x00000001, gf108_fb_new },
.fuse = gf100_fuse_new, .fuse = { 0x00000001, gf100_fuse_new },
.gpio = g94_gpio_new, .gpio = g94_gpio_new,
.i2c = g94_i2c_new, .i2c = g94_i2c_new,
.ibus = gf100_ibus_new, .ibus = gf100_ibus_new,
...@@ -1417,7 +1417,7 @@ nvc3_chipset = { ...@@ -1417,7 +1417,7 @@ nvc3_chipset = {
.clk = { 0x00000001, gf100_clk_new }, .clk = { 0x00000001, gf100_clk_new },
.devinit = { 0x00000001, gf100_devinit_new }, .devinit = { 0x00000001, gf100_devinit_new },
.fb = { 0x00000001, gf100_fb_new }, .fb = { 0x00000001, gf100_fb_new },
.fuse = gf100_fuse_new, .fuse = { 0x00000001, gf100_fuse_new },
.gpio = g94_gpio_new, .gpio = g94_gpio_new,
.i2c = g94_i2c_new, .i2c = g94_i2c_new,
.ibus = gf100_ibus_new, .ibus = gf100_ibus_new,
...@@ -1453,7 +1453,7 @@ nvc4_chipset = { ...@@ -1453,7 +1453,7 @@ nvc4_chipset = {
.clk = { 0x00000001, gf100_clk_new }, .clk = { 0x00000001, gf100_clk_new },
.devinit = { 0x00000001, gf100_devinit_new }, .devinit = { 0x00000001, gf100_devinit_new },
.fb = { 0x00000001, gf100_fb_new }, .fb = { 0x00000001, gf100_fb_new },
.fuse = gf100_fuse_new, .fuse = { 0x00000001, gf100_fuse_new },
.gpio = g94_gpio_new, .gpio = g94_gpio_new,
.i2c = g94_i2c_new, .i2c = g94_i2c_new,
.ibus = gf100_ibus_new, .ibus = gf100_ibus_new,
...@@ -1490,7 +1490,7 @@ nvc8_chipset = { ...@@ -1490,7 +1490,7 @@ nvc8_chipset = {
.clk = { 0x00000001, gf100_clk_new }, .clk = { 0x00000001, gf100_clk_new },
.devinit = { 0x00000001, gf100_devinit_new }, .devinit = { 0x00000001, gf100_devinit_new },
.fb = { 0x00000001, gf100_fb_new }, .fb = { 0x00000001, gf100_fb_new },
.fuse = gf100_fuse_new, .fuse = { 0x00000001, gf100_fuse_new },
.gpio = g94_gpio_new, .gpio = g94_gpio_new,
.i2c = g94_i2c_new, .i2c = g94_i2c_new,
.ibus = gf100_ibus_new, .ibus = gf100_ibus_new,
...@@ -1527,7 +1527,7 @@ nvce_chipset = { ...@@ -1527,7 +1527,7 @@ nvce_chipset = {
.clk = { 0x00000001, gf100_clk_new }, .clk = { 0x00000001, gf100_clk_new },
.devinit = { 0x00000001, gf100_devinit_new }, .devinit = { 0x00000001, gf100_devinit_new },
.fb = { 0x00000001, gf100_fb_new }, .fb = { 0x00000001, gf100_fb_new },
.fuse = gf100_fuse_new, .fuse = { 0x00000001, gf100_fuse_new },
.gpio = g94_gpio_new, .gpio = g94_gpio_new,
.i2c = g94_i2c_new, .i2c = g94_i2c_new,
.ibus = gf100_ibus_new, .ibus = gf100_ibus_new,
...@@ -1564,7 +1564,7 @@ nvcf_chipset = { ...@@ -1564,7 +1564,7 @@ nvcf_chipset = {
.clk = { 0x00000001, gf100_clk_new }, .clk = { 0x00000001, gf100_clk_new },
.devinit = { 0x00000001, gf100_devinit_new }, .devinit = { 0x00000001, gf100_devinit_new },
.fb = { 0x00000001, gf100_fb_new }, .fb = { 0x00000001, gf100_fb_new },
.fuse = gf100_fuse_new, .fuse = { 0x00000001, gf100_fuse_new },
.gpio = g94_gpio_new, .gpio = g94_gpio_new,
.i2c = g94_i2c_new, .i2c = g94_i2c_new,
.ibus = gf100_ibus_new, .ibus = gf100_ibus_new,
...@@ -1600,7 +1600,7 @@ nvd7_chipset = { ...@@ -1600,7 +1600,7 @@ nvd7_chipset = {
.clk = { 0x00000001, gf100_clk_new }, .clk = { 0x00000001, gf100_clk_new },
.devinit = { 0x00000001, gf100_devinit_new }, .devinit = { 0x00000001, gf100_devinit_new },
.fb = { 0x00000001, gf100_fb_new }, .fb = { 0x00000001, gf100_fb_new },
.fuse = gf100_fuse_new, .fuse = { 0x00000001, gf100_fuse_new },
.gpio = gf119_gpio_new, .gpio = gf119_gpio_new,
.i2c = gf117_i2c_new, .i2c = gf117_i2c_new,
.ibus = gf117_ibus_new, .ibus = gf117_ibus_new,
...@@ -1635,7 +1635,7 @@ nvd9_chipset = { ...@@ -1635,7 +1635,7 @@ nvd9_chipset = {
.clk = { 0x00000001, gf100_clk_new }, .clk = { 0x00000001, gf100_clk_new },
.devinit = { 0x00000001, gf100_devinit_new }, .devinit = { 0x00000001, gf100_devinit_new },
.fb = { 0x00000001, gf100_fb_new }, .fb = { 0x00000001, gf100_fb_new },
.fuse = gf100_fuse_new, .fuse = { 0x00000001, gf100_fuse_new },
.gpio = gf119_gpio_new, .gpio = gf119_gpio_new,
.i2c = gf119_i2c_new, .i2c = gf119_i2c_new,
.ibus = gf117_ibus_new, .ibus = gf117_ibus_new,
...@@ -1671,7 +1671,7 @@ nve4_chipset = { ...@@ -1671,7 +1671,7 @@ nve4_chipset = {
.clk = { 0x00000001, gk104_clk_new }, .clk = { 0x00000001, gk104_clk_new },
.devinit = { 0x00000001, gf100_devinit_new }, .devinit = { 0x00000001, gf100_devinit_new },
.fb = { 0x00000001, gk104_fb_new }, .fb = { 0x00000001, gk104_fb_new },
.fuse = gf100_fuse_new, .fuse = { 0x00000001, gf100_fuse_new },
.gpio = gk104_gpio_new, .gpio = gk104_gpio_new,
.i2c = gk104_i2c_new, .i2c = gk104_i2c_new,
.ibus = gk104_ibus_new, .ibus = gk104_ibus_new,
...@@ -1710,7 +1710,7 @@ nve6_chipset = { ...@@ -1710,7 +1710,7 @@ nve6_chipset = {
.clk = { 0x00000001, gk104_clk_new }, .clk = { 0x00000001, gk104_clk_new },
.devinit = { 0x00000001, gf100_devinit_new }, .devinit = { 0x00000001, gf100_devinit_new },
.fb = { 0x00000001, gk104_fb_new }, .fb = { 0x00000001, gk104_fb_new },
.fuse = gf100_fuse_new, .fuse = { 0x00000001, gf100_fuse_new },
.gpio = gk104_gpio_new, .gpio = gk104_gpio_new,
.i2c = gk104_i2c_new, .i2c = gk104_i2c_new,
.ibus = gk104_ibus_new, .ibus = gk104_ibus_new,
...@@ -1749,7 +1749,7 @@ nve7_chipset = { ...@@ -1749,7 +1749,7 @@ nve7_chipset = {
.clk = { 0x00000001, gk104_clk_new }, .clk = { 0x00000001, gk104_clk_new },
.devinit = { 0x00000001, gf100_devinit_new }, .devinit = { 0x00000001, gf100_devinit_new },
.fb = { 0x00000001, gk104_fb_new }, .fb = { 0x00000001, gk104_fb_new },
.fuse = gf100_fuse_new, .fuse = { 0x00000001, gf100_fuse_new },
.gpio = gk104_gpio_new, .gpio = gk104_gpio_new,
.i2c = gk104_i2c_new, .i2c = gk104_i2c_new,
.ibus = gk104_ibus_new, .ibus = gk104_ibus_new,
...@@ -1786,7 +1786,7 @@ nvea_chipset = { ...@@ -1786,7 +1786,7 @@ nvea_chipset = {
.bus = { 0x00000001, gf100_bus_new }, .bus = { 0x00000001, gf100_bus_new },
.clk = { 0x00000001, gk20a_clk_new }, .clk = { 0x00000001, gk20a_clk_new },
.fb = { 0x00000001, gk20a_fb_new }, .fb = { 0x00000001, gk20a_fb_new },
.fuse = gf100_fuse_new, .fuse = { 0x00000001, gf100_fuse_new },
.ibus = gk20a_ibus_new, .ibus = gk20a_ibus_new,
.imem = gk20a_instmem_new, .imem = gk20a_instmem_new,
.ltc = gk104_ltc_new, .ltc = gk104_ltc_new,
...@@ -1813,7 +1813,7 @@ nvf0_chipset = { ...@@ -1813,7 +1813,7 @@ nvf0_chipset = {
.clk = { 0x00000001, gk104_clk_new }, .clk = { 0x00000001, gk104_clk_new },
.devinit = { 0x00000001, gf100_devinit_new }, .devinit = { 0x00000001, gf100_devinit_new },
.fb = { 0x00000001, gk110_fb_new }, .fb = { 0x00000001, gk110_fb_new },
.fuse = gf100_fuse_new, .fuse = { 0x00000001, gf100_fuse_new },
.gpio = gk104_gpio_new, .gpio = gk104_gpio_new,
.i2c = gk110_i2c_new, .i2c = gk110_i2c_new,
.ibus = gk104_ibus_new, .ibus = gk104_ibus_new,
...@@ -1851,7 +1851,7 @@ nvf1_chipset = { ...@@ -1851,7 +1851,7 @@ nvf1_chipset = {
.clk = { 0x00000001, gk104_clk_new }, .clk = { 0x00000001, gk104_clk_new },
.devinit = { 0x00000001, gf100_devinit_new }, .devinit = { 0x00000001, gf100_devinit_new },
.fb = { 0x00000001, gk110_fb_new }, .fb = { 0x00000001, gk110_fb_new },
.fuse = gf100_fuse_new, .fuse = { 0x00000001, gf100_fuse_new },
.gpio = gk104_gpio_new, .gpio = gk104_gpio_new,
.i2c = gk110_i2c_new, .i2c = gk110_i2c_new,
.ibus = gk104_ibus_new, .ibus = gk104_ibus_new,
...@@ -1889,7 +1889,7 @@ nv106_chipset = { ...@@ -1889,7 +1889,7 @@ nv106_chipset = {
.clk = { 0x00000001, gk104_clk_new }, .clk = { 0x00000001, gk104_clk_new },
.devinit = { 0x00000001, gf100_devinit_new }, .devinit = { 0x00000001, gf100_devinit_new },
.fb = { 0x00000001, gk110_fb_new }, .fb = { 0x00000001, gk110_fb_new },
.fuse = gf100_fuse_new, .fuse = { 0x00000001, gf100_fuse_new },
.gpio = gk104_gpio_new, .gpio = gk104_gpio_new,
.i2c = gk110_i2c_new, .i2c = gk110_i2c_new,
.ibus = gk104_ibus_new, .ibus = gk104_ibus_new,
...@@ -1927,7 +1927,7 @@ nv108_chipset = { ...@@ -1927,7 +1927,7 @@ nv108_chipset = {
.clk = { 0x00000001, gk104_clk_new }, .clk = { 0x00000001, gk104_clk_new },
.devinit = { 0x00000001, gf100_devinit_new }, .devinit = { 0x00000001, gf100_devinit_new },
.fb = { 0x00000001, gk110_fb_new }, .fb = { 0x00000001, gk110_fb_new },
.fuse = gf100_fuse_new, .fuse = { 0x00000001, gf100_fuse_new },
.gpio = gk104_gpio_new, .gpio = gk104_gpio_new,
.i2c = gk110_i2c_new, .i2c = gk110_i2c_new,
.ibus = gk104_ibus_new, .ibus = gk104_ibus_new,
...@@ -1965,7 +1965,7 @@ nv117_chipset = { ...@@ -1965,7 +1965,7 @@ nv117_chipset = {
.clk = { 0x00000001, gk104_clk_new }, .clk = { 0x00000001, gk104_clk_new },
.devinit = { 0x00000001, gm107_devinit_new }, .devinit = { 0x00000001, gm107_devinit_new },
.fb = { 0x00000001, gm107_fb_new }, .fb = { 0x00000001, gm107_fb_new },
.fuse = gm107_fuse_new, .fuse = { 0x00000001, gm107_fuse_new },
.gpio = gk104_gpio_new, .gpio = gk104_gpio_new,
.i2c = gk110_i2c_new, .i2c = gk110_i2c_new,
.ibus = gk104_ibus_new, .ibus = gk104_ibus_new,
...@@ -2001,7 +2001,7 @@ nv118_chipset = { ...@@ -2001,7 +2001,7 @@ nv118_chipset = {
.clk = { 0x00000001, gk104_clk_new }, .clk = { 0x00000001, gk104_clk_new },
.devinit = { 0x00000001, gm107_devinit_new }, .devinit = { 0x00000001, gm107_devinit_new },
.fb = { 0x00000001, gm107_fb_new }, .fb = { 0x00000001, gm107_fb_new },
.fuse = gm107_fuse_new, .fuse = { 0x00000001, gm107_fuse_new },
.gpio = gk104_gpio_new, .gpio = gk104_gpio_new,
.i2c = gk110_i2c_new, .i2c = gk110_i2c_new,
.ibus = gk104_ibus_new, .ibus = gk104_ibus_new,
...@@ -2035,7 +2035,7 @@ nv120_chipset = { ...@@ -2035,7 +2035,7 @@ nv120_chipset = {
.bus = { 0x00000001, gf100_bus_new }, .bus = { 0x00000001, gf100_bus_new },
.devinit = { 0x00000001, gm200_devinit_new }, .devinit = { 0x00000001, gm200_devinit_new },
.fb = { 0x00000001, gm200_fb_new }, .fb = { 0x00000001, gm200_fb_new },
.fuse = gm107_fuse_new, .fuse = { 0x00000001, gm107_fuse_new },
.gpio = gk104_gpio_new, .gpio = gk104_gpio_new,
.i2c = gm200_i2c_new, .i2c = gm200_i2c_new,
.ibus = gm200_ibus_new, .ibus = gm200_ibus_new,
...@@ -2073,7 +2073,7 @@ nv124_chipset = { ...@@ -2073,7 +2073,7 @@ nv124_chipset = {
.bus = { 0x00000001, gf100_bus_new }, .bus = { 0x00000001, gf100_bus_new },
.devinit = { 0x00000001, gm200_devinit_new }, .devinit = { 0x00000001, gm200_devinit_new },
.fb = { 0x00000001, gm200_fb_new }, .fb = { 0x00000001, gm200_fb_new },
.fuse = gm107_fuse_new, .fuse = { 0x00000001, gm107_fuse_new },
.gpio = gk104_gpio_new, .gpio = gk104_gpio_new,
.i2c = gm200_i2c_new, .i2c = gm200_i2c_new,
.ibus = gm200_ibus_new, .ibus = gm200_ibus_new,
...@@ -2111,7 +2111,7 @@ nv126_chipset = { ...@@ -2111,7 +2111,7 @@ nv126_chipset = {
.bus = { 0x00000001, gf100_bus_new }, .bus = { 0x00000001, gf100_bus_new },
.devinit = { 0x00000001, gm200_devinit_new }, .devinit = { 0x00000001, gm200_devinit_new },
.fb = { 0x00000001, gm200_fb_new }, .fb = { 0x00000001, gm200_fb_new },
.fuse = gm107_fuse_new, .fuse = { 0x00000001, gm107_fuse_new },
.gpio = gk104_gpio_new, .gpio = gk104_gpio_new,
.i2c = gm200_i2c_new, .i2c = gm200_i2c_new,
.ibus = gm200_ibus_new, .ibus = gm200_ibus_new,
...@@ -2147,7 +2147,7 @@ nv12b_chipset = { ...@@ -2147,7 +2147,7 @@ nv12b_chipset = {
.bus = { 0x00000001, gf100_bus_new }, .bus = { 0x00000001, gf100_bus_new },
.clk = { 0x00000001, gm20b_clk_new }, .clk = { 0x00000001, gm20b_clk_new },
.fb = { 0x00000001, gm20b_fb_new }, .fb = { 0x00000001, gm20b_fb_new },
.fuse = gm107_fuse_new, .fuse = { 0x00000001, gm107_fuse_new },
.ibus = gk20a_ibus_new, .ibus = gk20a_ibus_new,
.imem = gk20a_instmem_new, .imem = gk20a_instmem_new,
.ltc = gm200_ltc_new, .ltc = gm200_ltc_new,
...@@ -2174,7 +2174,7 @@ nv130_chipset = { ...@@ -2174,7 +2174,7 @@ nv130_chipset = {
.devinit = { 0x00000001, gm200_devinit_new }, .devinit = { 0x00000001, gm200_devinit_new },
.fault = { 0x00000001, gp100_fault_new }, .fault = { 0x00000001, gp100_fault_new },
.fb = { 0x00000001, gp100_fb_new }, .fb = { 0x00000001, gp100_fb_new },
.fuse = gm107_fuse_new, .fuse = { 0x00000001, gm107_fuse_new },
.gpio = gk104_gpio_new, .gpio = gk104_gpio_new,
.i2c = gm200_i2c_new, .i2c = gm200_i2c_new,
.ibus = gm200_ibus_new, .ibus = gm200_ibus_new,
...@@ -2214,7 +2214,7 @@ nv132_chipset = { ...@@ -2214,7 +2214,7 @@ nv132_chipset = {
.devinit = { 0x00000001, gm200_devinit_new }, .devinit = { 0x00000001, gm200_devinit_new },
.fault = { 0x00000001, gp100_fault_new }, .fault = { 0x00000001, gp100_fault_new },
.fb = { 0x00000001, gp102_fb_new }, .fb = { 0x00000001, gp102_fb_new },
.fuse = gm107_fuse_new, .fuse = { 0x00000001, gm107_fuse_new },
.gpio = gk104_gpio_new, .gpio = gk104_gpio_new,
.i2c = gm200_i2c_new, .i2c = gm200_i2c_new,
.ibus = gm200_ibus_new, .ibus = gm200_ibus_new,
...@@ -2252,7 +2252,7 @@ nv134_chipset = { ...@@ -2252,7 +2252,7 @@ nv134_chipset = {
.devinit = { 0x00000001, gm200_devinit_new }, .devinit = { 0x00000001, gm200_devinit_new },
.fault = { 0x00000001, gp100_fault_new }, .fault = { 0x00000001, gp100_fault_new },
.fb = { 0x00000001, gp102_fb_new }, .fb = { 0x00000001, gp102_fb_new },
.fuse = gm107_fuse_new, .fuse = { 0x00000001, gm107_fuse_new },
.gpio = gk104_gpio_new, .gpio = gk104_gpio_new,
.i2c = gm200_i2c_new, .i2c = gm200_i2c_new,
.ibus = gm200_ibus_new, .ibus = gm200_ibus_new,
...@@ -2290,7 +2290,7 @@ nv136_chipset = { ...@@ -2290,7 +2290,7 @@ nv136_chipset = {
.devinit = { 0x00000001, gm200_devinit_new }, .devinit = { 0x00000001, gm200_devinit_new },
.fault = { 0x00000001, gp100_fault_new }, .fault = { 0x00000001, gp100_fault_new },
.fb = { 0x00000001, gp102_fb_new }, .fb = { 0x00000001, gp102_fb_new },
.fuse = gm107_fuse_new, .fuse = { 0x00000001, gm107_fuse_new },
.gpio = gk104_gpio_new, .gpio = gk104_gpio_new,
.i2c = gm200_i2c_new, .i2c = gm200_i2c_new,
.ibus = gm200_ibus_new, .ibus = gm200_ibus_new,
...@@ -2327,7 +2327,7 @@ nv137_chipset = { ...@@ -2327,7 +2327,7 @@ nv137_chipset = {
.devinit = { 0x00000001, gm200_devinit_new }, .devinit = { 0x00000001, gm200_devinit_new },
.fault = { 0x00000001, gp100_fault_new }, .fault = { 0x00000001, gp100_fault_new },
.fb = { 0x00000001, gp102_fb_new }, .fb = { 0x00000001, gp102_fb_new },
.fuse = gm107_fuse_new, .fuse = { 0x00000001, gm107_fuse_new },
.gpio = gk104_gpio_new, .gpio = gk104_gpio_new,
.i2c = gm200_i2c_new, .i2c = gm200_i2c_new,
.ibus = gm200_ibus_new, .ibus = gm200_ibus_new,
...@@ -2365,7 +2365,7 @@ nv138_chipset = { ...@@ -2365,7 +2365,7 @@ nv138_chipset = {
.devinit = { 0x00000001, gm200_devinit_new }, .devinit = { 0x00000001, gm200_devinit_new },
.fault = { 0x00000001, gp100_fault_new }, .fault = { 0x00000001, gp100_fault_new },
.fb = { 0x00000001, gp102_fb_new }, .fb = { 0x00000001, gp102_fb_new },
.fuse = gm107_fuse_new, .fuse = { 0x00000001, gm107_fuse_new },
.gpio = gk104_gpio_new, .gpio = gk104_gpio_new,
.i2c = gm200_i2c_new, .i2c = gm200_i2c_new,
.ibus = gm200_ibus_new, .ibus = gm200_ibus_new,
...@@ -2399,7 +2399,7 @@ nv13b_chipset = { ...@@ -2399,7 +2399,7 @@ nv13b_chipset = {
.bus = { 0x00000001, gf100_bus_new }, .bus = { 0x00000001, gf100_bus_new },
.fault = { 0x00000001, gp10b_fault_new }, .fault = { 0x00000001, gp10b_fault_new },
.fb = { 0x00000001, gp10b_fb_new }, .fb = { 0x00000001, gp10b_fb_new },
.fuse = gm107_fuse_new, .fuse = { 0x00000001, gm107_fuse_new },
.ibus = gp10b_ibus_new, .ibus = gp10b_ibus_new,
.imem = gk20a_instmem_new, .imem = gk20a_instmem_new,
.ltc = gp10b_ltc_new, .ltc = gp10b_ltc_new,
...@@ -2425,7 +2425,7 @@ nv140_chipset = { ...@@ -2425,7 +2425,7 @@ nv140_chipset = {
.devinit = { 0x00000001, gv100_devinit_new }, .devinit = { 0x00000001, gv100_devinit_new },
.fault = { 0x00000001, gv100_fault_new }, .fault = { 0x00000001, gv100_fault_new },
.fb = { 0x00000001, gv100_fb_new }, .fb = { 0x00000001, gv100_fb_new },
.fuse = gm107_fuse_new, .fuse = { 0x00000001, gm107_fuse_new },
.gpio = gk104_gpio_new, .gpio = gk104_gpio_new,
.gsp = gv100_gsp_new, .gsp = gv100_gsp_new,
.i2c = gm200_i2c_new, .i2c = gm200_i2c_new,
...@@ -2469,7 +2469,7 @@ nv162_chipset = { ...@@ -2469,7 +2469,7 @@ nv162_chipset = {
.devinit = { 0x00000001, tu102_devinit_new }, .devinit = { 0x00000001, tu102_devinit_new },
.fault = { 0x00000001, tu102_fault_new }, .fault = { 0x00000001, tu102_fault_new },
.fb = { 0x00000001, gv100_fb_new }, .fb = { 0x00000001, gv100_fb_new },
.fuse = gm107_fuse_new, .fuse = { 0x00000001, gm107_fuse_new },
.gpio = gk104_gpio_new, .gpio = gk104_gpio_new,
.gsp = gv100_gsp_new, .gsp = gv100_gsp_new,
.i2c = gm200_i2c_new, .i2c = gm200_i2c_new,
...@@ -2507,7 +2507,7 @@ nv164_chipset = { ...@@ -2507,7 +2507,7 @@ nv164_chipset = {
.devinit = { 0x00000001, tu102_devinit_new }, .devinit = { 0x00000001, tu102_devinit_new },
.fault = { 0x00000001, tu102_fault_new }, .fault = { 0x00000001, tu102_fault_new },
.fb = { 0x00000001, gv100_fb_new }, .fb = { 0x00000001, gv100_fb_new },
.fuse = gm107_fuse_new, .fuse = { 0x00000001, gm107_fuse_new },
.gpio = gk104_gpio_new, .gpio = gk104_gpio_new,
.gsp = gv100_gsp_new, .gsp = gv100_gsp_new,
.i2c = gm200_i2c_new, .i2c = gm200_i2c_new,
...@@ -2546,7 +2546,7 @@ nv166_chipset = { ...@@ -2546,7 +2546,7 @@ nv166_chipset = {
.devinit = { 0x00000001, tu102_devinit_new }, .devinit = { 0x00000001, tu102_devinit_new },
.fault = { 0x00000001, tu102_fault_new }, .fault = { 0x00000001, tu102_fault_new },
.fb = { 0x00000001, gv100_fb_new }, .fb = { 0x00000001, gv100_fb_new },
.fuse = gm107_fuse_new, .fuse = { 0x00000001, gm107_fuse_new },
.gpio = gk104_gpio_new, .gpio = gk104_gpio_new,
.gsp = gv100_gsp_new, .gsp = gv100_gsp_new,
.i2c = gm200_i2c_new, .i2c = gm200_i2c_new,
...@@ -2586,7 +2586,7 @@ nv167_chipset = { ...@@ -2586,7 +2586,7 @@ nv167_chipset = {
.devinit = { 0x00000001, tu102_devinit_new }, .devinit = { 0x00000001, tu102_devinit_new },
.fault = { 0x00000001, tu102_fault_new }, .fault = { 0x00000001, tu102_fault_new },
.fb = { 0x00000001, gv100_fb_new }, .fb = { 0x00000001, gv100_fb_new },
.fuse = gm107_fuse_new, .fuse = { 0x00000001, gm107_fuse_new },
.gpio = gk104_gpio_new, .gpio = gk104_gpio_new,
.gsp = gv100_gsp_new, .gsp = gv100_gsp_new,
.i2c = gm200_i2c_new, .i2c = gm200_i2c_new,
...@@ -2624,7 +2624,7 @@ nv168_chipset = { ...@@ -2624,7 +2624,7 @@ nv168_chipset = {
.devinit = { 0x00000001, tu102_devinit_new }, .devinit = { 0x00000001, tu102_devinit_new },
.fault = { 0x00000001, tu102_fault_new }, .fault = { 0x00000001, tu102_fault_new },
.fb = { 0x00000001, gv100_fb_new }, .fb = { 0x00000001, gv100_fb_new },
.fuse = gm107_fuse_new, .fuse = { 0x00000001, gm107_fuse_new },
.gpio = gk104_gpio_new, .gpio = gk104_gpio_new,
.gsp = gv100_gsp_new, .gsp = gv100_gsp_new,
.i2c = gm200_i2c_new, .i2c = gm200_i2c_new,
...@@ -3248,7 +3248,6 @@ nvkm_device_ctor(const struct nvkm_device_func *func, ...@@ -3248,7 +3248,6 @@ nvkm_device_ctor(const struct nvkm_device_func *func,
#include <core/layout.h> #include <core/layout.h>
#undef NVKM_LAYOUT_INST #undef NVKM_LAYOUT_INST
#undef NVKM_LAYOUT_ONCE #undef NVKM_LAYOUT_ONCE
_(NVKM_SUBDEV_FUSE , fuse);
_(NVKM_SUBDEV_GPIO , gpio); _(NVKM_SUBDEV_GPIO , gpio);
_(NVKM_SUBDEV_GSP , gsp); _(NVKM_SUBDEV_GSP , gsp);
_(NVKM_SUBDEV_I2C , i2c); _(NVKM_SUBDEV_I2C , i2c);
......
...@@ -42,12 +42,12 @@ nvkm_fuse = { ...@@ -42,12 +42,12 @@ nvkm_fuse = {
int int
nvkm_fuse_new_(const struct nvkm_fuse_func *func, struct nvkm_device *device, nvkm_fuse_new_(const struct nvkm_fuse_func *func, struct nvkm_device *device,
int index, struct nvkm_fuse **pfuse) enum nvkm_subdev_type type, int inst, struct nvkm_fuse **pfuse)
{ {
struct nvkm_fuse *fuse; struct nvkm_fuse *fuse;
if (!(fuse = *pfuse = kzalloc(sizeof(*fuse), GFP_KERNEL))) if (!(fuse = *pfuse = kzalloc(sizeof(*fuse), GFP_KERNEL)))
return -ENOMEM; return -ENOMEM;
nvkm_subdev_ctor(&nvkm_fuse, device, index, &fuse->subdev); nvkm_subdev_ctor(&nvkm_fuse, device, type, inst, &fuse->subdev);
fuse->func = func; fuse->func = func;
spin_lock_init(&fuse->lock); spin_lock_init(&fuse->lock);
return 0; return 0;
......
...@@ -47,7 +47,8 @@ gf100_fuse = { ...@@ -47,7 +47,8 @@ gf100_fuse = {
}; };
int int
gf100_fuse_new(struct nvkm_device *device, int index, struct nvkm_fuse **pfuse) gf100_fuse_new(struct nvkm_device *device, enum nvkm_subdev_type type, int inst,
struct nvkm_fuse **pfuse)
{ {
return nvkm_fuse_new_(&gf100_fuse, device, index, pfuse); return nvkm_fuse_new_(&gf100_fuse, device, type, inst, pfuse);
} }
...@@ -36,7 +36,8 @@ gm107_fuse = { ...@@ -36,7 +36,8 @@ gm107_fuse = {
}; };
int int
gm107_fuse_new(struct nvkm_device *device, int index, struct nvkm_fuse **pfuse) gm107_fuse_new(struct nvkm_device *device, enum nvkm_subdev_type type, int inst,
struct nvkm_fuse **pfuse)
{ {
return nvkm_fuse_new_(&gm107_fuse, device, index, pfuse); return nvkm_fuse_new_(&gm107_fuse, device, type, inst, pfuse);
} }
...@@ -45,7 +45,8 @@ nv50_fuse = { ...@@ -45,7 +45,8 @@ nv50_fuse = {
}; };
int int
nv50_fuse_new(struct nvkm_device *device, int index, struct nvkm_fuse **pfuse) nv50_fuse_new(struct nvkm_device *device, enum nvkm_subdev_type type, int inst,
struct nvkm_fuse **pfuse)
{ {
return nvkm_fuse_new_(&nv50_fuse, device, index, pfuse); return nvkm_fuse_new_(&nv50_fuse, device, type, inst, pfuse);
} }
...@@ -8,6 +8,6 @@ struct nvkm_fuse_func { ...@@ -8,6 +8,6 @@ struct nvkm_fuse_func {
u32 (*read)(struct nvkm_fuse *, u32 addr); u32 (*read)(struct nvkm_fuse *, u32 addr);
}; };
int nvkm_fuse_new_(const struct nvkm_fuse_func *, struct nvkm_device *, int nvkm_fuse_new_(const struct nvkm_fuse_func *, struct nvkm_device *, enum nvkm_subdev_type, int,
int index, struct nvkm_fuse **); struct nvkm_fuse **);
#endif #endif
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