OLD | NEW |
(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 int tpm_init_v05(void) |
| 12 { |
| 13 return i2c_probe(0x20); |
| 14 } |
| 15 |
| 16 int tpm_open_v05(void) |
| 17 { |
| 18 if (TDDL_Open()) |
| 19 return -1; |
| 20 return 0; |
| 21 } |
| 22 |
| 23 int tpm_close_v05(void) |
| 24 { |
| 25 if (TDDL_Close()) |
| 26 return -1; |
| 27 return 0; |
| 28 } |
| 29 |
| 30 int tpm_sendrecv_v05(const uint8_t *sendbuf, size_t buf_size, |
| 31 uint8_t *recvbuf, size_t *recv_len) |
| 32 { |
| 33 if (TDDL_TransmitData((uint8_t*)sendbuf, (uint32_t)buf_size, recvbuf, |
| 34 (uint32_t*)recv_len)) |
| 35 return -1; |
| 36 return 0; |
| 37 } |
| 38 |
OLD | NEW |