tpm_atmel.c (1da177e4c3f41524e886b7f1b8a0c1fc7321cac2) tpm_atmel.c (3122a88a242454efe72930e56a3e4d56ee534f3c)
1/*
2 * Copyright (C) 2004 IBM Corporation
3 *
4 * Authors:
5 * Leendert van Doorn <leendert@watson.ibm.com>
6 * Dave Safford <safford@watson.ibm.com>
7 * Reiner Sailer <sailer@watson.ibm.com>
8 * Kylene Hall <kjhall@us.ibm.com>

--- 8 unchanged lines hidden (view full) ---

17 * published by the Free Software Foundation, version 2 of the
18 * License.
19 *
20 */
21
22#include "tpm.h"
23
24/* Atmel definitions */
1/*
2 * Copyright (C) 2004 IBM Corporation
3 *
4 * Authors:
5 * Leendert van Doorn <leendert@watson.ibm.com>
6 * Dave Safford <safford@watson.ibm.com>
7 * Reiner Sailer <sailer@watson.ibm.com>
8 * Kylene Hall <kjhall@us.ibm.com>

--- 8 unchanged lines hidden (view full) ---

17 * published by the Free Software Foundation, version 2 of the
18 * License.
19 *
20 */
21
22#include "tpm.h"
23
24/* Atmel definitions */
25#define TPM_ATML_BASE 0x400
25enum tpm_atmel_addr{
26 TPM_ATML_BASE = 0x400
27};
26
27/* write status bits */
28
29/* write status bits */
28#define ATML_STATUS_ABORT 0x01
29#define ATML_STATUS_LASTBYTE 0x04
30
30enum tpm_atmel_write_status {
31 ATML_STATUS_ABORT = 0x01,
32 ATML_STATUS_LASTBYTE = 0x04
33};
31/* read status bits */
34/* read status bits */
32#define ATML_STATUS_BUSY 0x01
33#define ATML_STATUS_DATA_AVAIL 0x02
34#define ATML_STATUS_REWRITE 0x04
35enum tpm_atmel_read_status {
36 ATML_STATUS_BUSY = 0x01,
37 ATML_STATUS_DATA_AVAIL = 0x02,
38 ATML_STATUS_REWRITE = 0x04,
39 ATML_STATUS_READY = 0x08
40};
35
41
36
37static int tpm_atml_recv(struct tpm_chip *chip, u8 * buf, size_t count)
38{
39 u8 status, *hdr = buf;
40 u32 size;
41 int i;
42 __be32 *native_size;
43
44 /* start reading header */

--- 172 unchanged lines hidden ---
42static int tpm_atml_recv(struct tpm_chip *chip, u8 * buf, size_t count)
43{
44 u8 status, *hdr = buf;
45 u32 size;
46 int i;
47 __be32 *native_size;
48
49 /* start reading header */

--- 172 unchanged lines hidden ---