Commit 19b7bf51 authored by Jiandi An's avatar Jiandi An Committed by Jarkko Sakkinen

tpm, tpm_crb: Handle 64-bit resource in crb_check_resource()

crb_check_resource() in TPM CRB driver calls
acpi_dev_resource_memory() which only handles 32-bit resources.
Adding a call to acpi_dev_resource_address_space() in TPM CRB
driver which handles 64-bit resources.
Signed-off-by: default avatarJiandi An <anjiandi@codeaurora.org>
Reviewed-by: default avatarJarkko Sakkinen <jarkko.sakkinen@linux.intel.com>
Tested-by: default avatarJarkko Sakkinen <jarkko.sakkinen@linux.intel.com>
Signed-off-by: default avatarJarkko Sakkinen <jarkko.sakkinen@linux.intel.com>
parent aea7f54f
...@@ -264,10 +264,12 @@ static const struct tpm_class_ops tpm_crb = { ...@@ -264,10 +264,12 @@ static const struct tpm_class_ops tpm_crb = {
static int crb_check_resource(struct acpi_resource *ares, void *data) static int crb_check_resource(struct acpi_resource *ares, void *data)
{ {
struct resource *io_res = data; struct resource *io_res = data;
struct resource res; struct resource_win win;
struct resource *res = &(win.res);
if (acpi_dev_resource_memory(ares, &res)) { if (acpi_dev_resource_memory(ares, res) ||
*io_res = res; acpi_dev_resource_address_space(ares, &win)) {
*io_res = *res;
io_res->name = NULL; io_res->name = NULL;
} }
......
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