Commit b09d5300 authored by Kylene Jo Hall's avatar Kylene Jo Hall Committed by Linus Torvalds

[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: default avatarKylie Hall <kjhall@us.ibm.com>
Signed-off-by: default avatarAndrew Morton <akpm@osdl.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@osdl.org>
parent e496f540
...@@ -52,6 +52,8 @@ enum tis_int_flags { ...@@ -52,6 +52,8 @@ enum tis_int_flags {
}; };
enum tis_defaults { enum tis_defaults {
TIS_MEM_BASE = 0xFED4000,
TIS_MEM_LEN = 0x5000,
TIS_SHORT_TIMEOUT = 750, /* ms */ TIS_SHORT_TIMEOUT = 750, /* ms */
TIS_LONG_TIMEOUT = 2000, /* 2 sec */ TIS_LONG_TIMEOUT = 2000, /* 2 sec */
}; };
...@@ -437,6 +439,11 @@ static int __devinit tpm_tis_pnp_init(struct pnp_dev ...@@ -437,6 +439,11 @@ static int __devinit tpm_tis_pnp_init(struct pnp_dev
start = pnp_mem_start(pnp_dev, 0); start = pnp_mem_start(pnp_dev, 0);
len = pnp_mem_len(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))) if (!(chip = tpm_register_hardware(&pnp_dev->dev, &tpm_tis)))
return -ENODEV; return -ENODEV;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment