diff mbox series

tpm: Fix autostart for TPM1.2 devices

Message ID 20230908203723.5702-1-ilias.apalodimas@linaro.org
State Accepted
Commit edce82c8228d3056a5075c460ffa9d600cf88e6d
Headers show
Series tpm: Fix autostart for TPM1.2 devices | expand

Commit Message

Ilias Apalodimas Sept. 8, 2023, 8:37 p.m. UTC
On commit e663b2ff4ba2("tpm: Add 'tpm autostart' shell command") an
autostart function was added for both TPM1.2 and 2.0 devices.  Instead
of correctly wiring the autostart command for TPM1.2 devices that patch
mistakenly added it on 'tpm init'

Fixes: commit e663b2ff4ba2("tpm: Add 'tpm autostart' shell command")
Signed-off-by: Ilias Apalodimas <ilias.apalodimas@linaro.org>
---
 cmd/tpm-v1.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

--
2.37.2

Comments

Heinrich Schuchardt Sept. 9, 2023, 4:08 a.m. UTC | #1
On 9/8/23 22:37, Ilias Apalodimas wrote:
> On commit e663b2ff4ba2("tpm: Add 'tpm autostart' shell command") an
> autostart function was added for both TPM1.2 and 2.0 devices.  Instead
> of correctly wiring the autostart command for TPM1.2 devices that patch
> mistakenly added it on 'tpm init'
>
> Fixes: commit e663b2ff4ba2("tpm: Add 'tpm autostart' shell command")
> Signed-off-by: Ilias Apalodimas <ilias.apalodimas@linaro.org>

Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>

> ---
>   cmd/tpm-v1.c | 2 +-
>   1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/cmd/tpm-v1.c b/cmd/tpm-v1.c
> index 3b95c950cc96..1b1efcd204d2 100644
> --- a/cmd/tpm-v1.c
> +++ b/cmd/tpm-v1.c
> @@ -655,7 +655,7 @@ TPM_COMMAND_NO_ARG(tpm_physical_disable)
>   static struct cmd_tbl tpm1_commands[] = {
>   	U_BOOT_CMD_MKENT(device, 0, 1, do_tpm_device, "", ""),
>   	U_BOOT_CMD_MKENT(info, 0, 1, do_tpm_info, "", ""),
> -	U_BOOT_CMD_MKENT(init, 0, 1, do_tpm_autostart, "", ""),
> +	U_BOOT_CMD_MKENT(autostart, 0, 1, do_tpm_autostart, "", ""),
>   	U_BOOT_CMD_MKENT(init, 0, 1, do_tpm_init, "", ""),
>   	U_BOOT_CMD_MKENT(startup, 0, 1,
>   			 do_tpm_startup, "", ""),
> --
> 2.37.2
>
Simon Glass Sept. 10, 2023, 7:13 p.m. UTC | #2
On Fri, 8 Sept 2023 at 22:07, Heinrich Schuchardt <xypron.glpk@gmx.de> wrote:
>
> On 9/8/23 22:37, Ilias Apalodimas wrote:
> > On commit e663b2ff4ba2("tpm: Add 'tpm autostart' shell command") an
> > autostart function was added for both TPM1.2 and 2.0 devices.  Instead
> > of correctly wiring the autostart command for TPM1.2 devices that patch
> > mistakenly added it on 'tpm init'
> >
> > Fixes: commit e663b2ff4ba2("tpm: Add 'tpm autostart' shell command")
> > Signed-off-by: Ilias Apalodimas <ilias.apalodimas@linaro.org>
>
> Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
>
> > ---
> >   cmd/tpm-v1.c | 2 +-
> >   1 file changed, 1 insertion(+), 1 deletion(-)

Reviewed-by: Simon Glass <sjg@chromium.org>
diff mbox series

Patch

diff --git a/cmd/tpm-v1.c b/cmd/tpm-v1.c
index 3b95c950cc96..1b1efcd204d2 100644
--- a/cmd/tpm-v1.c
+++ b/cmd/tpm-v1.c
@@ -655,7 +655,7 @@  TPM_COMMAND_NO_ARG(tpm_physical_disable)
 static struct cmd_tbl tpm1_commands[] = {
 	U_BOOT_CMD_MKENT(device, 0, 1, do_tpm_device, "", ""),
 	U_BOOT_CMD_MKENT(info, 0, 1, do_tpm_info, "", ""),
-	U_BOOT_CMD_MKENT(init, 0, 1, do_tpm_autostart, "", ""),
+	U_BOOT_CMD_MKENT(autostart, 0, 1, do_tpm_autostart, "", ""),
 	U_BOOT_CMD_MKENT(init, 0, 1, do_tpm_init, "", ""),
 	U_BOOT_CMD_MKENT(startup, 0, 1,
 			 do_tpm_startup, "", ""),