From b22da3d8526a935aa31e086e63f60ff3246cb61c Mon Sep 17 00:00:00 2001 From: hc <hc@nodka.com> Date: Sat, 09 Dec 2023 07:24:11 +0000 Subject: [PATCH] add stmac read mac form eeprom --- kernel/drivers/char/tpm/tpm_i2c_nuvoton.c | 22 ++++------------------ 1 files changed, 4 insertions(+), 18 deletions(-) diff --git a/kernel/drivers/char/tpm/tpm_i2c_nuvoton.c b/kernel/drivers/char/tpm/tpm_i2c_nuvoton.c index 2803080..b77c18e 100644 --- a/kernel/drivers/char/tpm/tpm_i2c_nuvoton.c +++ b/kernel/drivers/char/tpm/tpm_i2c_nuvoton.c @@ -1,3 +1,4 @@ +// SPDX-License-Identifier: GPL-2.0-or-later /****************************************************************************** * Nuvoton TPM I2C Device Driver Interface for WPCT301/NPCT501/NPCT6XX, * based on the TCG TPM Interface Spec version 1.2. @@ -7,19 +8,6 @@ * Dan Morav <dan.morav@nuvoton.com> * Copyright (C) 2013, Obsidian Research Corp. * Jason Gunthorpe <jgunthorpe@obsidianresearch.com> - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see http://www.gnu.org/licenses/>. * * Nuvoton contact information: APC.Support@nuvoton.com *****************************************************************************/ @@ -454,14 +442,12 @@ return rc; } ordinal = be32_to_cpu(*((__be32 *) (buf + 6))); - if (chip->flags & TPM_CHIP_FLAG_TPM2) - duration = tpm2_calc_ordinal_duration(chip, ordinal); - else - duration = tpm_calc_ordinal_duration(chip, ordinal); + duration = tpm_calc_ordinal_duration(chip, ordinal); rc = i2c_nuvoton_wait_for_data_avail(chip, duration, &priv->read_queue); if (rc) { - dev_err(dev, "%s() timeout command duration\n", __func__); + dev_err(dev, "%s() timeout command duration %ld\n", + __func__, duration); i2c_nuvoton_ready(chip); return rc; } -- Gitblit v1.6.2