Received: by 2002:a05:6a10:9e8c:0:0:0:0 with SMTP id y12csp1074263pxx; Tue, 27 Oct 2020 07:42:03 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxFey6rsJPOr9Lw2pHN3D0/bSyOswtscp3vk1tc2KcbI/8wzosix0uxR/RgK2huSK6KsWLJ X-Received: by 2002:a17:906:b010:: with SMTP id v16mr2813811ejy.163.1603809722991; Tue, 27 Oct 2020 07:42:02 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1603809722; cv=none; d=google.com; s=arc-20160816; b=m6Z/h9WCbuG8xRHOjBC3IKZIe2WJzKpcNE1pcCZtRL2kRM2tg61d6S4EyJ5SiUkD+i nR8MkyXVD+kTkl/kPA4wut0unWeh53J3L7DouMfornpoW0vUXppfNCP3+MLQdPZrDpBx ggQlf8MSx3nhIox565d4ERjsZ7XAH32qKya4WFRxFifHHwHomb0qaZBv+Uu2fZHov/rY GUUErL5wv7xnpOIcUT6joRerhAvOb/YcLxXS3aK8dn1eKyUbgQYL507sIuvWxdvpgf+N EsIJf/cXAAY8F1ey0ugbRmT9oozvyz4p++c/YF35z5ULK+Ci2swKzi2TT0L5bglm+/WD JNdQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:message-id:date:subject:to:from; bh=fawWwH4Vh7ESIyJbBlopJmYanZjuIHBdVSc/+6YeZgc=; b=rzw89ywJPnzrAe/T4TXxz79XR0uirRz11eFlOONUc8PcTgKyV4WVYfiTOo7+8/mv+t Mu90DdDOEjT0mcJtroKOJPr8jLb1gyCyTPYJirfqMvjuARq1hyKCE3ug1M1VlokHxpZi o0d7Onf7HoR5dBCVfSy6LFJmgstbdtSJOH/JEU8yW7dWcj4f4gjPlItiVik+7PJdUWBe Uga1kQfLc45sYHZHQymnB60SoknCYf3SX7098iNxLK8HQJz5KqfXj907pQ4cu+MNPETi R+vItCm+D+Ezr2R8HllvTjHZlIUrDYpMOdCZw3HGvd8XbUXskh5WP7BgmgetfBrf0e7F j71g== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id l20si1052632edv.312.2020.10.27.07.41.41; Tue, 27 Oct 2020 07:42:02 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2411719AbgJ0LdZ (ORCPT + 99 others); Tue, 27 Oct 2020 07:33:25 -0400 Received: from szxga07-in.huawei.com ([45.249.212.35]:6398 "EHLO szxga07-in.huawei.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2411573AbgJ0LdY (ORCPT ); Tue, 27 Oct 2020 07:33:24 -0400 Received: from DGGEMS403-HUB.china.huawei.com (unknown [172.30.72.59]) by szxga07-in.huawei.com (SkyGuard) with ESMTP id 4CL8j15Flkz6yjG; Tue, 27 Oct 2020 19:33:25 +0800 (CST) Received: from localhost.localdomain (10.69.192.56) by DGGEMS403-HUB.china.huawei.com (10.3.19.203) with Microsoft SMTP Server id 14.3.487.0; Tue, 27 Oct 2020 19:33:17 +0800 From: Tian Tao To: , , , , Subject: [PATCH] tpm_tis_core: Add the error log when the chip startup failed Date: Tue, 27 Oct 2020 19:33:57 +0800 Message-ID: <1603798437-54591-1-git-send-email-tiantao6@hisilicon.com> X-Mailer: git-send-email 2.7.4 MIME-Version: 1.0 Content-Type: text/plain X-Originating-IP: [10.69.192.56] X-CFilter-Loop: Reflected Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org TPM does not print any log when the startup fails, if there is a problem with the hardware, wait_wartup is the first place to go wrong, so add error log when wait_wartup fails to locate the problem. Signed-off-by: Tian Tao --- drivers/char/tpm/tpm_tis_core.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/char/tpm/tpm_tis_core.c b/drivers/char/tpm/tpm_tis_core.c index 92c51c6..660c0a93 100644 --- a/drivers/char/tpm/tpm_tis_core.c +++ b/drivers/char/tpm/tpm_tis_core.c @@ -991,6 +991,7 @@ int tpm_tis_core_init(struct device *dev, struct tpm_tis_data *priv, int irq, chip->ops->clk_enable(chip, true); if (wait_startup(chip, 0) != 0) { + dev_err(dev, "Could not startup the TPM Chip\n"); rc = -ENODEV; goto out_err; } -- 2.7.4