| .. | .. |
|---|
| 1 | +// SPDX-License-Identifier: GPL-2.0-or-later |
|---|
| 1 | 2 | /* |
|---|
| 2 | 3 | * ATMEL I2C TPM AT97SC3204T |
|---|
| 3 | 4 | * |
|---|
| .. | .. |
|---|
| 13 | 14 | * |
|---|
| 14 | 15 | * TGC status/locality/etc functions seen in the LPC implementation do not |
|---|
| 15 | 16 | * seem to be present. |
|---|
| 16 | | - * |
|---|
| 17 | | - * This program is free software: you can redistribute it and/or modify |
|---|
| 18 | | - * it under the terms of the GNU General Public License as published by |
|---|
| 19 | | - * the Free Software Foundation, either version 2 of the License, or |
|---|
| 20 | | - * (at your option) any later version. |
|---|
| 21 | | - * |
|---|
| 22 | | - * This program is distributed in the hope that it will be useful, |
|---|
| 23 | | - * but WITHOUT ANY WARRANTY; without even the implied warranty of |
|---|
| 24 | | - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|---|
| 25 | | - * GNU General Public License for more details. |
|---|
| 26 | | - * |
|---|
| 27 | | - * You should have received a copy of the GNU General Public License |
|---|
| 28 | | - * along with this program. If not, see http://www.gnu.org/licenses/>. |
|---|
| 29 | 17 | */ |
|---|
| 30 | 18 | #include <linux/init.h> |
|---|
| 31 | 19 | #include <linux/module.h> |
|---|
| .. | .. |
|---|
| 46 | 34 | /* This is the amount we read on the first try. 25 was chosen to fit a |
|---|
| 47 | 35 | * fair number of read responses in the buffer so a 2nd retry can be |
|---|
| 48 | 36 | * avoided in small message cases. */ |
|---|
| 49 | | - u8 buffer[sizeof(struct tpm_output_header) + 25]; |
|---|
| 37 | + u8 buffer[sizeof(struct tpm_header) + 25]; |
|---|
| 50 | 38 | }; |
|---|
| 51 | 39 | |
|---|
| 52 | 40 | static int i2c_atmel_send(struct tpm_chip *chip, u8 *buf, size_t len) |
|---|
| .. | .. |
|---|
| 80 | 68 | { |
|---|
| 81 | 69 | struct priv_data *priv = dev_get_drvdata(&chip->dev); |
|---|
| 82 | 70 | struct i2c_client *client = to_i2c_client(chip->dev.parent); |
|---|
| 83 | | - struct tpm_output_header *hdr = |
|---|
| 84 | | - (struct tpm_output_header *)priv->buffer; |
|---|
| 71 | + struct tpm_header *hdr = (struct tpm_header *)priv->buffer; |
|---|
| 85 | 72 | u32 expected_len; |
|---|
| 86 | 73 | int rc; |
|---|
| 87 | 74 | |
|---|