From patchwork Sat Jan 16 21:51:28 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Simon Glass X-Patchwork-Id: 1427587 X-Patchwork-Delegate: trini@ti.com Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=lists.denx.de (client-ip=85.214.62.61; helo=phobos.denx.de; envelope-from=u-boot-bounces@lists.denx.de; receiver=) Authentication-Results: ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=chromium.org header.i=@chromium.org header.a=rsa-sha256 header.s=google header.b=Ty7U2Yua; dkim-atps=neutral Received: from phobos.denx.de (phobos.denx.de [85.214.62.61]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 4DJBbd07Tzz9sWL for ; Sun, 17 Jan 2021 08:52:07 +1100 (AEDT) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 34849829A1; Sat, 16 Jan 2021 22:51:54 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=chromium.org Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Authentication-Results: phobos.denx.de; dkim=pass (1024-bit key; unprotected) header.d=chromium.org header.i=@chromium.org header.b="Ty7U2Yua"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 3C47882994; Sat, 16 Jan 2021 22:51:50 +0100 (CET) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on phobos.denx.de X-Spam-Level: X-Spam-Status: No, score=-2.2 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,RCVD_IN_DNSWL_NONE,SPF_HELO_NONE autolearn=ham autolearn_force=no version=3.4.2 Received: from mail-io1-xd32.google.com (mail-io1-xd32.google.com [IPv6:2607:f8b0:4864:20::d32]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits)) (No client certificate requested) by phobos.denx.de (Postfix) with ESMTPS id 3096982986 for ; Sat, 16 Jan 2021 22:51:47 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=chromium.org Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=sjg@chromium.org Received: by mail-io1-xd32.google.com with SMTP id x21so7172713iog.10 for ; Sat, 16 Jan 2021 13:51:47 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=KidVpYx8euSgNbPwTXoj5kjfhjt/tDrHClMgvK8OOFA=; b=Ty7U2Yua0X77LE2AAQB3K7gdda0JDIMCCk+sVLNCBg6f/85o21meKyz1C+HTWCJ9us xLVDRmHPEgNIzrg8EdLxjj7hgzP9V7dzS/bzaJ8Xj4lGvD9ZCJ3A92L+/Eh0n5lSZof5 qJKRbYmUtUkl2ONOhKU0rc/15lIGOhD6jbi+E= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=KidVpYx8euSgNbPwTXoj5kjfhjt/tDrHClMgvK8OOFA=; b=sfquYiGtHI0w0kaWF3Hy4FGiDGGw8dueVNCXEyVBH3SRgiBNtvUFs8CoftRz5zK7z+ jia7HyHIb6d6WcOtoXd9iKYXw88rcHoS11axxUQA4OP1uqY9dyHs8k3sE+TtHmqXi3BH lUjJdms8NJbF2iItjczuzyiF3ROZSX6F6mT6ku13gcqYFpapLcGTVKi1JDZHBKcdsY3s C4TQaRV0AiBONTuHLyRLaEkoTQoKUqmlocr4PqCd9XJX3xgN4dowSm1AttsouUYq4rHQ AmaqLqFTmfkvFVsnHaZrSwflVp1awxQg5026kF+g4X3y9eOVuo9eVepsAiK2LrXjyu2Q kKWw== X-Gm-Message-State: AOAM530b4upW7LZwEteSkkjsUVySo/yVY+/1ec9GnRagevcUhtgjhCw1 uSzzxFjDfv9vy1Eb6hf9ilEJuXo7DaqFFcTH X-Google-Smtp-Source: ABdhPJyhGBG2EE4yH4xJ+LOXOEOGrPeAYseH2Dbo0hY/8tdSkGeOZXWl7or2tPsboRFXD5/8ntcziQ== X-Received: by 2002:a5d:8d95:: with SMTP id b21mr12602295ioj.152.1610833905786; Sat, 16 Jan 2021 13:51:45 -0800 (PST) Received: from localhost.localdomain (c-67-190-101-114.hsd1.co.comcast.net. [67.190.101.114]) by smtp.gmail.com with ESMTPSA id r19sm7519665ila.70.2021.01.16.13.51.44 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 16 Jan 2021 13:51:45 -0800 (PST) From: Simon Glass To: U-Boot Mailing List Cc: Simon Glass , Bin Meng , Thirupathaiah Annapureddy Subject: [PATCH 01/11] tpm: Don't include cr50 in TPL/SPL Date: Sat, 16 Jan 2021 14:51:28 -0700 Message-Id: <20210116215138.1218256-2-sjg@chromium.org> X-Mailer: git-send-email 2.30.0.284.gd98b1dd5eaa7-goog In-Reply-To: <20210116215138.1218256-1-sjg@chromium.org> References: <20210116215138.1218256-1-sjg@chromium.org> MIME-Version: 1.0 X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.34 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" X-Virus-Scanned: clamav-milter 0.102.3 at phobos.denx.de X-Virus-Status: Clean At present the security chip is not used in these U-Boot phases. Update the Makefile to exclude it. Fix a few logging statements while we are here. Signed-off-by: Simon Glass --- drivers/tpm/Makefile | 2 +- drivers/tpm/cr50_i2c.c | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/tpm/Makefile b/drivers/tpm/Makefile index 8f075b9f45f..f64d20067f8 100644 --- a/drivers/tpm/Makefile +++ b/drivers/tpm/Makefile @@ -10,7 +10,7 @@ obj-$(CONFIG_TPM_TIS_SANDBOX) += tpm_tis_sandbox.o obj-$(CONFIG_TPM_ST33ZP24_I2C) += tpm_tis_st33zp24_i2c.o obj-$(CONFIG_TPM_ST33ZP24_SPI) += tpm_tis_st33zp24_spi.o -obj-$(CONFIG_TPM2_CR50_I2C) += cr50_i2c.o +obj-$(CONFIG_$(SPL_TPL_)TPM2_CR50_I2C) += cr50_i2c.o obj-$(CONFIG_TPM2_TIS_SANDBOX) += tpm2_tis_sandbox.o obj-$(CONFIG_TPM2_TIS_SPI) += tpm2_tis_spi.o obj-$(CONFIG_TPM2_FTPM_TEE) += tpm2_ftpm_tee.o diff --git a/drivers/tpm/cr50_i2c.c b/drivers/tpm/cr50_i2c.c index b103a6fdc39..76432bdec1f 100644 --- a/drivers/tpm/cr50_i2c.c +++ b/drivers/tpm/cr50_i2c.c @@ -309,7 +309,7 @@ static int cr50_i2c_recv(struct udevice *dev, u8 *buf, size_t buf_len) int status; int ret; - log_debug("%s: len=%x\n", __func__, buf_len); + log_debug("%s: buf_len=%x\n", __func__, buf_len); if (buf_len < TPM_HEADER_SIZE) return -E2BIG; @@ -386,7 +386,7 @@ static int cr50_i2c_send(struct udevice *dev, const u8 *buf, size_t len) ulong timeout; int ret; - log_debug("%s: len=%x\n", __func__, len); + log_debug("len=%x\n", len); timeout = timer_get_us() + TIMEOUT_LONG_US; do { ret = cr50_i2c_status(dev);