Commit 808d6efd authored by Alexandre Courbot's avatar Alexandre Courbot Committed by Ben Skeggs

drm/nouveau/secboot: rename init() hook to oneinit()

The init() hook is called by the subdev's oneinit(). Rename it
accordingly to avoid confusion about the lifetime of objects allocated
in it.
Signed-off-by: default avatarAlexandre Courbot <acourbot@nvidia.com>
Signed-off-by: default avatarBen Skeggs <bskeggs@redhat.com>
parent c8225b54
...@@ -78,8 +78,8 @@ nvkm_secboot_oneinit(struct nvkm_subdev *subdev) ...@@ -78,8 +78,8 @@ nvkm_secboot_oneinit(struct nvkm_subdev *subdev)
} }
/* Call chip-specific init function */ /* Call chip-specific init function */
if (sb->func->init) if (sb->func->oneinit)
ret = sb->func->init(sb); ret = sb->func->oneinit(sb);
if (ret) { if (ret) {
nvkm_error(subdev, "Secure Boot initialization failed: %d\n", nvkm_error(subdev, "Secure Boot initialization failed: %d\n",
ret); ret);
......
...@@ -1253,7 +1253,7 @@ gm200_secboot_reset(struct nvkm_secboot *sb, enum nvkm_secboot_falcon falcon) ...@@ -1253,7 +1253,7 @@ gm200_secboot_reset(struct nvkm_secboot *sb, enum nvkm_secboot_falcon falcon)
} }
int int
gm200_secboot_init(struct nvkm_secboot *sb) gm200_secboot_oneinit(struct nvkm_secboot *sb)
{ {
struct gm200_secboot *gsb = gm200_secboot(sb); struct gm200_secboot *gsb = gm200_secboot(sb);
struct nvkm_device *device = sb->subdev.device; struct nvkm_device *device = sb->subdev.device;
...@@ -1332,7 +1332,7 @@ gm200_secboot_dtor(struct nvkm_secboot *sb) ...@@ -1332,7 +1332,7 @@ gm200_secboot_dtor(struct nvkm_secboot *sb)
static const struct nvkm_secboot_func static const struct nvkm_secboot_func
gm200_secboot = { gm200_secboot = {
.dtor = gm200_secboot_dtor, .dtor = gm200_secboot_dtor,
.init = gm200_secboot_init, .oneinit = gm200_secboot_oneinit,
.fini = gm200_secboot_fini, .fini = gm200_secboot_fini,
.reset = gm200_secboot_reset, .reset = gm200_secboot_reset,
.managed_falcons = BIT(NVKM_SECBOOT_FALCON_FECS) | .managed_falcons = BIT(NVKM_SECBOOT_FALCON_FECS) |
......
...@@ -174,7 +174,7 @@ gm20b_tegra_read_wpr(struct gm200_secboot *gsb) ...@@ -174,7 +174,7 @@ gm20b_tegra_read_wpr(struct gm200_secboot *gsb)
#endif #endif
static int static int
gm20b_secboot_init(struct nvkm_secboot *sb) gm20b_secboot_oneinit(struct nvkm_secboot *sb)
{ {
struct gm200_secboot *gsb = gm200_secboot(sb); struct gm200_secboot *gsb = gm200_secboot(sb);
int ret; int ret;
...@@ -183,13 +183,13 @@ gm20b_secboot_init(struct nvkm_secboot *sb) ...@@ -183,13 +183,13 @@ gm20b_secboot_init(struct nvkm_secboot *sb)
if (ret) if (ret)
return ret; return ret;
return gm200_secboot_init(sb); return gm200_secboot_oneinit(sb);
} }
static const struct nvkm_secboot_func static const struct nvkm_secboot_func
gm20b_secboot = { gm20b_secboot = {
.dtor = gm200_secboot_dtor, .dtor = gm200_secboot_dtor,
.init = gm20b_secboot_init, .oneinit = gm20b_secboot_oneinit,
.reset = gm200_secboot_reset, .reset = gm200_secboot_reset,
.managed_falcons = BIT(NVKM_SECBOOT_FALCON_FECS), .managed_falcons = BIT(NVKM_SECBOOT_FALCON_FECS),
.boot_falcon = NVKM_SECBOOT_FALCON_PMU, .boot_falcon = NVKM_SECBOOT_FALCON_PMU,
......
...@@ -27,7 +27,7 @@ ...@@ -27,7 +27,7 @@
#include <subdev/mmu.h> #include <subdev/mmu.h>
struct nvkm_secboot_func { struct nvkm_secboot_func {
int (*init)(struct nvkm_secboot *); int (*oneinit)(struct nvkm_secboot *);
int (*fini)(struct nvkm_secboot *, bool suspend); int (*fini)(struct nvkm_secboot *, bool suspend);
void *(*dtor)(struct nvkm_secboot *); void *(*dtor)(struct nvkm_secboot *);
int (*reset)(struct nvkm_secboot *, enum nvkm_secboot_falcon); int (*reset)(struct nvkm_secboot *, enum nvkm_secboot_falcon);
...@@ -221,7 +221,7 @@ struct gm200_secboot_func { ...@@ -221,7 +221,7 @@ struct gm200_secboot_func {
int (*prepare_blobs)(struct gm200_secboot *); int (*prepare_blobs)(struct gm200_secboot *);
}; };
int gm200_secboot_init(struct nvkm_secboot *); int gm200_secboot_oneinit(struct nvkm_secboot *);
void *gm200_secboot_dtor(struct nvkm_secboot *); void *gm200_secboot_dtor(struct nvkm_secboot *);
int gm200_secboot_reset(struct nvkm_secboot *, enum nvkm_secboot_falcon); int gm200_secboot_reset(struct nvkm_secboot *, enum nvkm_secboot_falcon);
int gm200_secboot_start(struct nvkm_secboot *, enum nvkm_secboot_falcon); int gm200_secboot_start(struct nvkm_secboot *, enum nvkm_secboot_falcon);
......
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