Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(132)

Side by Side Diff: drivers/tpm/slb9635_i2c/ifx_v05.c

Issue 6683023: Add Infineon v05 TPM driver (Closed) Base URL: ssh://git@gitrw.chromium.org:9222/u-boot-next.git@chromeos-v2010.09
Patch Set: Fix nits Created 9 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « drivers/tpm/slb9635_i2c/ifx_v03.c ('k') | drivers/tpm/slb9635_i2c/tddl.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
1 /* Copyright (c) 2011 The Chromium OS Authors. All rights reserved.
2 * Use of this source code is governed by a BSD-style license that can be
3 * found in the LICENSE file.
4 */
5
6 #include <config.h>
7 #include <common.h>
8 #include <i2c.h>
9 #include "tddl.h"
10
11 #define TPM_V05_DEFAULT_ADDR (0x20)
12
13 #ifdef CONFIG_TPM_SLB9635_I2C_ADDR
14 #define TPM_V05_ADDR CONFIG_TPM_SLB9635_I2C_ADDR
15 #else
16 #define TPM_V05_ADDR TPM_V05_DEFAULT_ADDR
17 #endif
18
19 int tpm_init_v05(void)
20 {
21 return i2c_probe(TPM_V05_ADDR );
22 }
23
24 int tpm_open_v05(void)
25 {
26 if (TDDL_Open(TPM_V05_ADDR ))
27 return -1;
28 return 0;
29 }
30
31 int tpm_close_v05(void)
32 {
33 if (TDDL_Close())
34 return -1;
35 return 0;
36 }
37
38 int tpm_sendrecv_v05(const uint8_t *sendbuf, size_t buf_size,
39 uint8_t *recvbuf, size_t *recv_len)
40 {
41 if (TDDL_TransmitData((uint8_t*)sendbuf, (uint32_t)buf_size, recvbuf,
42 (uint32_t*)recv_len))
43 return -1;
44 return 0;
45 }
46
OLDNEW
« no previous file with comments | « drivers/tpm/slb9635_i2c/ifx_v03.c ('k') | drivers/tpm/slb9635_i2c/tddl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698