From patchwork Tue Sep 15 22:33:48 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Christophe Ricard X-Patchwork-Id: 518130 X-Patchwork-Delegate: sjg@chromium.org Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from theia.denx.de (theia.denx.de [85.214.87.163]) by ozlabs.org (Postfix) with ESMTP id 8B4A414010F for ; Wed, 16 Sep 2015 08:43:48 +1000 (AEST) Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.b=dYoKq8gY; dkim-atps=neutral Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 5360E4B624; Wed, 16 Sep 2015 00:43:46 +0200 (CEST) Received: from theia.denx.de ([127.0.0.1]) by localhost (theia.denx.de [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 0cT3Mbra9W1h; Wed, 16 Sep 2015 00:43:46 +0200 (CEST) Received: from theia.denx.de (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 2F26E4B74E; Wed, 16 Sep 2015 00:43:32 +0200 (CEST) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id B94464B73E for ; Wed, 16 Sep 2015 00:34:07 +0200 (CEST) Received: from theia.denx.de ([127.0.0.1]) by localhost (theia.denx.de [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id a6I8BAu7yMD2 for ; Wed, 16 Sep 2015 00:34:07 +0200 (CEST) X-policyd-weight: NOT_IN_SBL_XBL_SPAMHAUS=-1.5 NOT_IN_SPAMCOP=-1.5 NOT_IN_BL_NJABL=-1.5 (only DNSBL check requested) Received: from mail-wi0-f171.google.com (mail-wi0-f171.google.com [209.85.212.171]) by theia.denx.de (Postfix) with ESMTPS id 254524B742 for ; Wed, 16 Sep 2015 00:33:59 +0200 (CEST) Received: by wiclk2 with SMTP id lk2so46712396wic.1 for ; Tue, 15 Sep 2015 15:33:58 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=1+WPbejIaq1F6QKq+x28D6s0q4PUSaPWbOOPOOdkLVs=; b=dYoKq8gYIcaj/3AX6W/syQZnK6ek3/LY+0XSXoB2hTJjTUamy0E0Ox1NIXUITTqa1j Dy+jz/V2XS0qicQiDsd/4fMYYKkWbI8vYRagkIE3iVVWs5F0XrduyDdt0tXuYhDtBSoG Aaz7nZBCZQ4BY0Ariz84f3wDDEGgTOsfhrYVH9fI6AIfKL1Vz3vSDzCDxMD6SDRLwWjk 8J3U+GtzsGovFmkr17G1CG/2rh3vhcOKkY6aMxbPqZnNC9rdHyDOtPxB8vJKPjsoho9Y 7ulh4TpkCl3NayoYHmSx4iugAOczVO0b/M8rH0EWwWCjWYg0l2SDP9WX2luxqcVjM7YR wEoQ== X-Received: by 10.180.35.199 with SMTP id k7mr12366704wij.13.1442356437965; Tue, 15 Sep 2015 15:33:57 -0700 (PDT) Received: from localhost.localdomain (ax113-6-78-236-204-66.fbx.proxad.net. [78.236.204.66]) by smtp.gmail.com with ESMTPSA id p8sm23271276wjr.39.2015.09.15.15.33.56 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Tue, 15 Sep 2015 15:33:57 -0700 (PDT) From: Christophe Ricard X-Google-Original-From: Christophe Ricard To: u-boot@lists.denx.de Date: Wed, 16 Sep 2015 00:33:48 +0200 Message-Id: <1442356431-11969-2-git-send-email-christophe-h.ricard@st.com> X-Mailer: git-send-email 2.1.4 In-Reply-To: <1442356431-11969-1-git-send-email-christophe-h.ricard@st.com> References: <1442356431-11969-1-git-send-email-christophe-h.ricard@st.com> Cc: Thierry Reding , Akshay Saraswat , Tom Rini , Joe Hershberger , York Sun , Christophe Ricard , Peter Huewe , Benoit Houyere Subject: [U-Boot] [PATCH v2 1/4] dm: tpm: Move tpm_tis_i2c to tpm_i2c_infineon X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.15 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" As there is no TCG specification or recommendation for i2c TPM 1.2, move tpm_tis_i2c driver to tpm_i2c_infineon. Other tpm vendors like Atmel or STMicroelectronics may have a different transport protocol for i2c. Signed-off-by: Christophe Ricard Reviewed-by: Tom Rini --- Changes in v2: - Change existing users of config to use renamed Kconfig README | 4 ++-- configs/nyan-big_defconfig | 2 +- configs/peach-pi_defconfig | 2 +- configs/peach-pit_defconfig | 2 +- configs/snow_defconfig | 2 +- configs/spring_defconfig | 2 +- drivers/tpm/Kconfig | 4 ++-- drivers/tpm/Makefile | 2 +- drivers/tpm/{tpm_tis_i2c.c => tpm_tis_infineon.c} | 4 ++-- drivers/tpm/{tpm_tis_i2c.h => tpm_tis_infineon.h} | 0 10 files changed, 12 insertions(+), 12 deletions(-) rename drivers/tpm/{tpm_tis_i2c.c => tpm_tis_infineon.c} (99%) rename drivers/tpm/{tpm_tis_i2c.h => tpm_tis_infineon.h} (100%) diff --git a/README b/README index 1acc355..f8fb46a 100644 --- a/README +++ b/README @@ -1490,8 +1490,8 @@ The following options need to be configured: CONFIG_TPM Support TPM devices. - CONFIG_TPM_TIS_I2C - Support for i2c bus TPM devices. Only one device + CONFIG_TPM_TIS_INFINEON + Support for Infineon i2c bus TPM devices. Only one device per system is supported at this time. CONFIG_TPM_TIS_I2C_BURST_LIMITATION diff --git a/configs/nyan-big_defconfig b/configs/nyan-big_defconfig index 6464c37..04c6a21 100644 --- a/configs/nyan-big_defconfig +++ b/configs/nyan-big_defconfig @@ -18,7 +18,7 @@ CONFIG_CROS_EC=y CONFIG_CROS_EC_SPI=y CONFIG_CROS_EC_KEYB=y CONFIG_DM_TPM=y -CONFIG_TPM_TIS_I2C=y +CONFIG_TPM_TIS_INFINEON=y CONFIG_TEGRA114_SPI=y CONFIG_DISPLAY_PORT=y CONFIG_VIDEO_TEGRA124=y diff --git a/configs/peach-pi_defconfig b/configs/peach-pi_defconfig index 56a5185..1a0837e 100644 --- a/configs/peach-pi_defconfig +++ b/configs/peach-pi_defconfig @@ -15,7 +15,7 @@ CONFIG_CROS_EC=y CONFIG_CROS_EC_SPI=y CONFIG_CROS_EC_KEYB=y CONFIG_DM_TPM=y -CONFIG_TPM_TIS_I2C=y +CONFIG_TPM_TIS_INFINEON=y CONFIG_DM_I2C=y CONFIG_DM_I2C_COMPAT=y CONFIG_I2C_CROS_EC_TUNNEL=y diff --git a/configs/peach-pit_defconfig b/configs/peach-pit_defconfig index 1934bf3..6567226 100644 --- a/configs/peach-pit_defconfig +++ b/configs/peach-pit_defconfig @@ -15,7 +15,7 @@ CONFIG_CROS_EC=y CONFIG_CROS_EC_SPI=y CONFIG_CROS_EC_KEYB=y CONFIG_DM_TPM=y -CONFIG_TPM_TIS_I2C=y +CONFIG_TPM_TIS_INFINEON=y CONFIG_DM_I2C=y CONFIG_DM_I2C_COMPAT=y CONFIG_I2C_CROS_EC_TUNNEL=y diff --git a/configs/snow_defconfig b/configs/snow_defconfig index 32c7c5d..583a838 100644 --- a/configs/snow_defconfig +++ b/configs/snow_defconfig @@ -20,7 +20,7 @@ CONFIG_DEBUG_UART_S5P=y CONFIG_DEBUG_UART_BASE=0x12c30000 CONFIG_DEBUG_UART_CLOCK=100000000 CONFIG_DM_TPM=y -CONFIG_TPM_TIS_I2C=y +CONFIG_TPM_TIS_INFINEON=y CONFIG_DM_I2C=y CONFIG_DM_I2C_COMPAT=y CONFIG_I2C_CROS_EC_LDO=y diff --git a/configs/spring_defconfig b/configs/spring_defconfig index b20bfed..112afa1 100644 --- a/configs/spring_defconfig +++ b/configs/spring_defconfig @@ -20,7 +20,7 @@ CONFIG_DEBUG_UART_S5P=y CONFIG_DEBUG_UART_BASE=0x12c30000 CONFIG_DEBUG_UART_CLOCK=100000000 CONFIG_DM_TPM=y -CONFIG_TPM_TIS_I2C=y +CONFIG_TPM_TIS_INFINEON=y CONFIG_DM_I2C=y CONFIG_DM_I2C_COMPAT=y CONFIG_I2C_CROS_EC_LDO=y diff --git a/drivers/tpm/Kconfig b/drivers/tpm/Kconfig index 6bc8fdd..dacb847 100644 --- a/drivers/tpm/Kconfig +++ b/drivers/tpm/Kconfig @@ -31,7 +31,7 @@ config TPM_ATMEL_TWI to the device using the standard TPM Interface Specification (TIS) protocol -config TPM_TIS_I2C +config TPM_TIS_INFINEON bool "Enable support for Infineon SLB9635/45 TPMs on I2C" depends on TPM && DM_I2C help @@ -42,7 +42,7 @@ config TPM_TIS_I2C config TPM_TIS_I2C_BURST_LIMITATION bool "Enable I2C burst length limitation" - depends on TPM_TIS_I2C + depends on TPM_TIS_INFINEON help Some broken TPMs have a limitation on the number of bytes they can receive in one message. Enable this option to allow you to set this diff --git a/drivers/tpm/Makefile b/drivers/tpm/Makefile index 0d328f8..5748145 100644 --- a/drivers/tpm/Makefile +++ b/drivers/tpm/Makefile @@ -6,6 +6,6 @@ obj-$(CONFIG_DM_TPM) += tpm-uclass.o obj-$(CONFIG_TPM_ATMEL_TWI) += tpm_atmel_twi.o -obj-$(CONFIG_TPM_TIS_I2C) += tpm_tis_i2c.o +obj-$(CONFIG_TPM_TIS_INFINEON) += tpm_tis_infineon.o obj-$(CONFIG_TPM_TIS_LPC) += tpm_tis_lpc.o obj-$(CONFIG_TPM_TIS_SANDBOX) += tpm_tis_sandbox.o diff --git a/drivers/tpm/tpm_tis_i2c.c b/drivers/tpm/tpm_tis_infineon.c similarity index 99% rename from drivers/tpm/tpm_tis_i2c.c rename to drivers/tpm/tpm_tis_infineon.c index 9afe46c..88eb786 100644 --- a/drivers/tpm/tpm_tis_i2c.c +++ b/drivers/tpm/tpm_tis_infineon.c @@ -31,7 +31,7 @@ #include #include -#include "tpm_tis_i2c.h" +#include "tpm_tis_infineon.h" #include "tpm_internal.h" DECLARE_GLOBAL_DATA_PTR; @@ -614,7 +614,7 @@ static const struct udevice_id tpm_tis_i2c_ids[] = { }; U_BOOT_DRIVER(tpm_tis_i2c) = { - .name = "tpm_tis_i2c", + .name = "tpm_tis_infineon", .id = UCLASS_TPM, .of_match = tpm_tis_i2c_ids, .ops = &tpm_tis_i2c_ops, diff --git a/drivers/tpm/tpm_tis_i2c.h b/drivers/tpm/tpm_tis_infineon.h similarity index 100% rename from drivers/tpm/tpm_tis_i2c.h rename to drivers/tpm/tpm_tis_infineon.h