diff options
author | Taylor Hutt <thutt@chromium.org> | 2013-04-12 10:44:56 +0000 |
---|---|---|
committer | Simon Glass <sjg@chromium.org> | 2013-04-12 14:12:51 -0700 |
commit | af98a70a6bb54513713e4d7e55681dfdbf2b149a (patch) | |
tree | c64a371c3d1fdb3f5a563f5087f97ded028e4d93 /drivers/tpm | |
parent | 785881f775252940185e10fbb2d5299c9ffa6bce (diff) | |
download | u-boot-imx-af98a70a6bb54513713e4d7e55681dfdbf2b149a.zip u-boot-imx-af98a70a6bb54513713e4d7e55681dfdbf2b149a.tar.gz u-boot-imx-af98a70a6bb54513713e4d7e55681dfdbf2b149a.tar.bz2 |
tpm: Add casts for proper compilation
When building for the Sandbox version, the casts in this change are
necessary to avoid compilation issues.
Signed-off-by: Taylor Hutt <thutt@chromium.org>
Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>
Diffstat (limited to 'drivers/tpm')
-rw-r--r-- | drivers/tpm/generic_lpc_tpm.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/drivers/tpm/generic_lpc_tpm.c b/drivers/tpm/generic_lpc_tpm.c index 6c494eb..04ad418 100644 --- a/drivers/tpm/generic_lpc_tpm.c +++ b/drivers/tpm/generic_lpc_tpm.c @@ -135,7 +135,7 @@ static u8 tpm_read_byte(const u8 *ptr) { u8 ret = readb(ptr); debug(PREFIX "Read reg 0x%4.4x returns 0x%2.2x\n", - (u32)ptr - (u32)lpc_tpm_dev, ret); + (u32)(uintptr_t)ptr - (u32)(uintptr_t)lpc_tpm_dev, ret); return ret; } @@ -143,21 +143,21 @@ static u32 tpm_read_word(const u32 *ptr) { u32 ret = readl(ptr); debug(PREFIX "Read reg 0x%4.4x returns 0x%8.8x\n", - (u32)ptr - (u32)lpc_tpm_dev, ret); + (u32)(uintptr_t)ptr - (u32)(uintptr_t)lpc_tpm_dev, ret); return ret; } static void tpm_write_byte(u8 value, u8 *ptr) { debug(PREFIX "Write reg 0x%4.4x with 0x%2.2x\n", - (u32)ptr - (u32)lpc_tpm_dev, value); + (u32)(uintptr_t)ptr - (u32)(uintptr_t)lpc_tpm_dev, value); writeb(value, ptr); } static void tpm_write_word(u32 value, u32 *ptr) { debug(PREFIX "Write reg 0x%4.4x with 0x%8.8x\n", - (u32)ptr - (u32)lpc_tpm_dev, value); + (u32)(uintptr_t)ptr - (u32)(uintptr_t)lpc_tpm_dev, value); writel(value, ptr); } @@ -491,5 +491,5 @@ int tis_sendrecv(const u8 *sendbuf, size_t send_size, return TPM_DRIVER_ERR; } - return tis_readresponse(recvbuf, recv_len); + return tis_readresponse(recvbuf, (u32 *)recv_len); } |