[Nouveau] [PATCH 8/8] secboot: remove nvkm_secboot_start()

Alexandre Courbot acourbot at nvidia.com
Tue Dec 6 05:35:45 UTC 2016


Since GR has moved to using the falcon library to start the falcons,
this function is not needed anymore.

Signed-off-by: Alexandre Courbot <acourbot at nvidia.com>
---
 drm/nouveau/include/nvkm/subdev/secboot.h |  1 +-
 drm/nouveau/nvkm/subdev/secboot/base.c    | 15 +--------------
 drm/nouveau/nvkm/subdev/secboot/gm200.c   | 25 +------------------------
 drm/nouveau/nvkm/subdev/secboot/gm20b.c   |  1 +-
 drm/nouveau/nvkm/subdev/secboot/priv.h    |  1 +-
 5 files changed, 0 insertions(+), 43 deletions(-)

diff --git a/drm/nouveau/include/nvkm/subdev/secboot.h b/drm/nouveau/include/nvkm/subdev/secboot.h
index 7ead4cab363b..905c76a29393 100644
--- a/drm/nouveau/include/nvkm/subdev/secboot.h
+++ b/drm/nouveau/include/nvkm/subdev/secboot.h
@@ -41,7 +41,6 @@ struct nvkm_secboot {
 
 bool nvkm_secboot_is_managed(struct nvkm_secboot *, enum nvkm_falconidx);
 int nvkm_secboot_reset(struct nvkm_secboot *, u32 falcon);
-int nvkm_secboot_start(struct nvkm_secboot *, u32 falcon);
 
 int gm200_secboot_new(struct nvkm_device *, int, struct nvkm_secboot **);
 int gm20b_secboot_new(struct nvkm_device *, int, struct nvkm_secboot **);
diff --git a/drm/nouveau/nvkm/subdev/secboot/base.c b/drm/nouveau/nvkm/subdev/secboot/base.c
index bf23349e1edd..65a240ba237c 100644
--- a/drm/nouveau/nvkm/subdev/secboot/base.c
+++ b/drm/nouveau/nvkm/subdev/secboot/base.c
@@ -40,21 +40,6 @@ nvkm_secboot_reset(struct nvkm_secboot *sb, u32 falcon)
 }
 
 /**
- * nvkm_secboot_start() - start specified falcon
- */
-int
-nvkm_secboot_start(struct nvkm_secboot *sb, u32 falcon)
-{
-	/* Unmanaged falcon? */
-	if (!(BIT(falcon) & sb->func->managed_falcons)) {
-		nvkm_error(&sb->subdev, "cannot start unmanaged falcon!\n");
-		return -EINVAL;
-	}
-
-	return sb->func->start(sb, falcon);
-}
-
-/**
  * nvkm_secboot_is_managed() - check whether a given falcon is securely-managed
  */
 bool
diff --git a/drm/nouveau/nvkm/subdev/secboot/gm200.c b/drm/nouveau/nvkm/subdev/secboot/gm200.c
index b82e8072e332..ea935e15357f 100644
--- a/drm/nouveau/nvkm/subdev/secboot/gm200.c
+++ b/drm/nouveau/nvkm/subdev/secboot/gm200.c
@@ -1248,30 +1248,6 @@ end:
 	return 0;
 }
 
-int
-gm200_secboot_start(struct nvkm_secboot *sb, enum nvkm_falconidx falcon)
-{
-	struct gm200_secboot *gsb = gm200_secboot(sb);
-	int base;
-
-	switch (falcon) {
-	case NVKM_FALCON_FECS:
-		base = 0x409000;
-		break;
-	case NVKM_FALCON_GPCCS:
-		base = 0x41a000;
-		break;
-	default:
-		nvkm_error(&sb->subdev, "cannot start unhandled falcon!\n");
-		return -EINVAL;
-	}
-
-	nvkm_wr32(sb->subdev.device, base + 0x130, 0x00000002);
-	gsb->falcon_state[falcon] = RUNNING;
-
-	return 0;
-}
-
 
 
 int
@@ -1357,7 +1333,6 @@ gm200_secboot = {
 	.init = gm200_secboot_init,
 	.fini = gm200_secboot_fini,
 	.reset = gm200_secboot_reset,
-	.start = gm200_secboot_start,
 	.managed_falcons = BIT(NVKM_FALCON_FECS) |
 			   BIT(NVKM_FALCON_GPCCS),
 	.boot_falcon = NVKM_FALCON_PMU,
diff --git a/drm/nouveau/nvkm/subdev/secboot/gm20b.c b/drm/nouveau/nvkm/subdev/secboot/gm20b.c
index 66a1d01f45ce..e7cc1e984848 100644
--- a/drm/nouveau/nvkm/subdev/secboot/gm20b.c
+++ b/drm/nouveau/nvkm/subdev/secboot/gm20b.c
@@ -191,7 +191,6 @@ gm20b_secboot = {
 	.dtor = gm200_secboot_dtor,
 	.init = gm20b_secboot_init,
 	.reset = gm200_secboot_reset,
-	.start = gm200_secboot_start,
 	.managed_falcons = BIT(NVKM_FALCON_FECS),
 	.boot_falcon = NVKM_FALCON_PMU,
 };
diff --git a/drm/nouveau/nvkm/subdev/secboot/priv.h b/drm/nouveau/nvkm/subdev/secboot/priv.h
index 2123539a7ae5..1bd0abea0843 100644
--- a/drm/nouveau/nvkm/subdev/secboot/priv.h
+++ b/drm/nouveau/nvkm/subdev/secboot/priv.h
@@ -32,7 +32,6 @@ struct nvkm_secboot_func {
 	int (*fini)(struct nvkm_secboot *, bool suspend);
 	void *(*dtor)(struct nvkm_secboot *);
 	int (*reset)(struct nvkm_secboot *, enum nvkm_falconidx);
-	int (*start)(struct nvkm_secboot *, enum nvkm_falconidx);
 
 	/* ID of the falcon that will perform secure boot */
 	enum nvkm_falconidx boot_falcon;
-- 
git-series 0.8.10


More information about the Nouveau mailing list