From c2b0f600a1707450ef985e28363893987f36fd8a Mon Sep 17 00:00:00 2001 From: Christophe Ricard Date: Tue, 6 Oct 2015 22:54:43 +0200 Subject: dm: tpm: Remove every compilation switch for TPM driver model As every TPM drivers support UCLASS_TPM, we can only rely on DM_TPM functions. This simplify a bit the code. Signed-off-by: Christophe Ricard Reviewed-by: Tom Rini Acked-by: Simon Glass --- common/cmd_tpm.c | 13 +------------ 1 file changed, 1 insertion(+), 12 deletions(-) (limited to 'common') diff --git a/common/cmd_tpm.c b/common/cmd_tpm.c index 97501cc..add6bfb 100644 --- a/common/cmd_tpm.c +++ b/common/cmd_tpm.c @@ -443,7 +443,6 @@ TPM_COMMAND_NO_ARG(tpm_force_clear) TPM_COMMAND_NO_ARG(tpm_physical_enable) TPM_COMMAND_NO_ARG(tpm_physical_disable) -#ifdef CONFIG_DM_TPM static int get_tpm(struct udevice **devp) { int rc; @@ -476,11 +475,11 @@ static int do_tpm_info(cmd_tbl_t *cmdtp, int flag, int argc, return 0; } -#endif static int do_tpm_raw_transfer(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[]) { + struct udevice *dev; void *command; uint8_t response[1024]; size_t count, response_length = sizeof(response); @@ -492,17 +491,11 @@ static int do_tpm_raw_transfer(cmd_tbl_t *cmdtp, int flag, return CMD_RET_FAILURE; } -#ifdef CONFIG_DM_TPM - struct udevice *dev; - rc = get_tpm(&dev); if (rc) return rc; rc = tpm_xfer(dev, command, count, response, &response_length); -#else - rc = tis_sendrecv(command, count, response, &response_length); -#endif free(command); if (!rc) { puts("tpm response:\n"); @@ -657,9 +650,7 @@ TPM_COMMAND_NO_ARG(tpm_end_oiap) U_BOOT_CMD_MKENT(cmd, 0, 1, do_tpm_ ## cmd, "", "") static cmd_tbl_t tpm_commands[] = { -#ifdef CONFIG_DM_TPM U_BOOT_CMD_MKENT(info, 0, 1, do_tpm_info, "", ""), -#endif U_BOOT_CMD_MKENT(init, 0, 1, do_tpm_init, "", ""), U_BOOT_CMD_MKENT(startup, 0, 1, @@ -730,9 +721,7 @@ U_BOOT_CMD(tpm, CONFIG_SYS_MAXARGS, 1, do_tpm, "cmd args...\n" " - Issue TPM command with arguments .\n" "Admin Startup and State Commands:\n" -#ifdef CONFIG_DM_TPM " info - Show information about the TPM\n" -#endif " init\n" " - Put TPM into a state where it waits for 'startup' command.\n" " startup mode\n" -- cgit v1.1