aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKylene Jo Hall2006-04-22 02:38:55 -0700
committerLinus Torvalds2006-04-22 09:19:54 -0700
commitb09d53009db21228adde29b468eb4583e66cbe7c (patch)
treed845bd9408ab13d8cbff4d49acb218674fce6b6c
parente496f540540f0a0bffcc3f83785f9954dacf1b83 (diff)
[PATCH] tpm: check mem start and len
The memory start and length values obtained from the ACPI entry need to be checked and filled in with the default values from the specification if they don't exist. This patch fills in the default values and uses them appropriately. Signed-off-by: Kylie Hall <kjhall@us.ibm.com> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
-rw-r--r--drivers/char/tpm/tpm_tis.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/drivers/char/tpm/tpm_tis.c b/drivers/char/tpm/tpm_tis.c
index 1cb5a7f0755d..9c0727bf28b7 100644
--- a/drivers/char/tpm/tpm_tis.c
+++ b/drivers/char/tpm/tpm_tis.c
@@ -52,6 +52,8 @@ enum tis_int_flags {
};
enum tis_defaults {
+ TIS_MEM_BASE = 0xFED4000,
+ TIS_MEM_LEN = 0x5000,
TIS_SHORT_TIMEOUT = 750, /* ms */
TIS_LONG_TIMEOUT = 2000, /* 2 sec */
};
@@ -437,6 +439,11 @@ static int __devinit tpm_tis_pnp_init(struct pnp_dev
start = pnp_mem_start(pnp_dev, 0);
len = pnp_mem_len(pnp_dev, 0);
+ if (!start)
+ start = TIS_MEM_BASE;
+ if (!len)
+ len = TIS_MEM_LEN;
+
if (!(chip = tpm_register_hardware(&pnp_dev->dev, &tpm_tis)))
return -ENODEV;