mirror of
git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2025-08-05 16:54:27 +00:00
tpm/ppi: rename TPM_PPI_REVISION_ID to TPM_PPI_REVISION_ID_1
TPM PPI 1.3 introduces a function revision 2 for some functions. So, rename the existing TPM_PPI_REVISION_ID to TPM_PPI_REVISION_ID_1. Signed-off-by: Stefan Berger <stefanb@linux.ibm.com> Tested-by: David Safford <david.safford@ge.com> Reviewed-by: Jarkko Sakkinen <jarkko.sakkinen@linux.intel.com> Signed-off-by: Jarkko Sakkinen <jarkko.sakkinen@linux.intel.com>
This commit is contained in:
parent
587bad77e9
commit
09fe1b4258
1 changed files with 11 additions and 10 deletions
|
@ -20,7 +20,7 @@
|
||||||
#include <linux/acpi.h>
|
#include <linux/acpi.h>
|
||||||
#include "tpm.h"
|
#include "tpm.h"
|
||||||
|
|
||||||
#define TPM_PPI_REVISION_ID 1
|
#define TPM_PPI_REVISION_ID_1 1
|
||||||
#define TPM_PPI_FN_VERSION 1
|
#define TPM_PPI_FN_VERSION 1
|
||||||
#define TPM_PPI_FN_SUBREQ 2
|
#define TPM_PPI_FN_SUBREQ 2
|
||||||
#define TPM_PPI_FN_GETREQ 3
|
#define TPM_PPI_FN_GETREQ 3
|
||||||
|
@ -61,7 +61,7 @@ static ssize_t tpm_show_ppi_request(struct device *dev,
|
||||||
struct tpm_chip *chip = to_tpm_chip(dev);
|
struct tpm_chip *chip = to_tpm_chip(dev);
|
||||||
|
|
||||||
obj = tpm_eval_dsm(chip->acpi_dev_handle, TPM_PPI_FN_GETREQ,
|
obj = tpm_eval_dsm(chip->acpi_dev_handle, TPM_PPI_FN_GETREQ,
|
||||||
ACPI_TYPE_PACKAGE, NULL, TPM_PPI_REVISION_ID);
|
ACPI_TYPE_PACKAGE, NULL, TPM_PPI_REVISION_ID_1);
|
||||||
if (!obj)
|
if (!obj)
|
||||||
return -ENXIO;
|
return -ENXIO;
|
||||||
|
|
||||||
|
@ -103,7 +103,7 @@ static ssize_t tpm_store_ppi_request(struct device *dev,
|
||||||
* version 1.1
|
* version 1.1
|
||||||
*/
|
*/
|
||||||
if (acpi_check_dsm(chip->acpi_dev_handle, &tpm_ppi_guid,
|
if (acpi_check_dsm(chip->acpi_dev_handle, &tpm_ppi_guid,
|
||||||
TPM_PPI_REVISION_ID, 1 << TPM_PPI_FN_SUBREQ2))
|
TPM_PPI_REVISION_ID_1, 1 << TPM_PPI_FN_SUBREQ2))
|
||||||
func = TPM_PPI_FN_SUBREQ2;
|
func = TPM_PPI_FN_SUBREQ2;
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
@ -125,7 +125,7 @@ static ssize_t tpm_store_ppi_request(struct device *dev,
|
||||||
}
|
}
|
||||||
|
|
||||||
obj = tpm_eval_dsm(chip->acpi_dev_handle, func, ACPI_TYPE_INTEGER,
|
obj = tpm_eval_dsm(chip->acpi_dev_handle, func, ACPI_TYPE_INTEGER,
|
||||||
&argv4, TPM_PPI_REVISION_ID);
|
&argv4, TPM_PPI_REVISION_ID_1);
|
||||||
if (!obj) {
|
if (!obj) {
|
||||||
return -ENXIO;
|
return -ENXIO;
|
||||||
} else {
|
} else {
|
||||||
|
@ -169,7 +169,7 @@ static ssize_t tpm_show_ppi_transition_action(struct device *dev,
|
||||||
if (strcmp(chip->ppi_version, "1.2") < 0)
|
if (strcmp(chip->ppi_version, "1.2") < 0)
|
||||||
obj = &tmp;
|
obj = &tmp;
|
||||||
obj = tpm_eval_dsm(chip->acpi_dev_handle, TPM_PPI_FN_GETACT,
|
obj = tpm_eval_dsm(chip->acpi_dev_handle, TPM_PPI_FN_GETACT,
|
||||||
ACPI_TYPE_INTEGER, obj, TPM_PPI_REVISION_ID);
|
ACPI_TYPE_INTEGER, obj, TPM_PPI_REVISION_ID_1);
|
||||||
if (!obj) {
|
if (!obj) {
|
||||||
return -ENXIO;
|
return -ENXIO;
|
||||||
} else {
|
} else {
|
||||||
|
@ -195,7 +195,7 @@ static ssize_t tpm_show_ppi_response(struct device *dev,
|
||||||
struct tpm_chip *chip = to_tpm_chip(dev);
|
struct tpm_chip *chip = to_tpm_chip(dev);
|
||||||
|
|
||||||
obj = tpm_eval_dsm(chip->acpi_dev_handle, TPM_PPI_FN_GETRSP,
|
obj = tpm_eval_dsm(chip->acpi_dev_handle, TPM_PPI_FN_GETRSP,
|
||||||
ACPI_TYPE_PACKAGE, NULL, TPM_PPI_REVISION_ID);
|
ACPI_TYPE_PACKAGE, NULL, TPM_PPI_REVISION_ID_1);
|
||||||
if (!obj)
|
if (!obj)
|
||||||
return -ENXIO;
|
return -ENXIO;
|
||||||
|
|
||||||
|
@ -263,7 +263,7 @@ static ssize_t show_ppi_operations(acpi_handle dev_handle, char *buf, u32 start,
|
||||||
"User not required",
|
"User not required",
|
||||||
};
|
};
|
||||||
|
|
||||||
if (!acpi_check_dsm(dev_handle, &tpm_ppi_guid, TPM_PPI_REVISION_ID,
|
if (!acpi_check_dsm(dev_handle, &tpm_ppi_guid, TPM_PPI_REVISION_ID_1,
|
||||||
1 << TPM_PPI_FN_GETOPR))
|
1 << TPM_PPI_FN_GETOPR))
|
||||||
return -EPERM;
|
return -EPERM;
|
||||||
|
|
||||||
|
@ -272,7 +272,7 @@ static ssize_t show_ppi_operations(acpi_handle dev_handle, char *buf, u32 start,
|
||||||
tmp.integer.value = i;
|
tmp.integer.value = i;
|
||||||
obj = tpm_eval_dsm(dev_handle, TPM_PPI_FN_GETOPR,
|
obj = tpm_eval_dsm(dev_handle, TPM_PPI_FN_GETOPR,
|
||||||
ACPI_TYPE_INTEGER, &argv,
|
ACPI_TYPE_INTEGER, &argv,
|
||||||
TPM_PPI_REVISION_ID);
|
TPM_PPI_REVISION_ID_1);
|
||||||
if (!obj) {
|
if (!obj) {
|
||||||
return -ENOMEM;
|
return -ENOMEM;
|
||||||
} else {
|
} else {
|
||||||
|
@ -338,12 +338,13 @@ void tpm_add_ppi(struct tpm_chip *chip)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
if (!acpi_check_dsm(chip->acpi_dev_handle, &tpm_ppi_guid,
|
if (!acpi_check_dsm(chip->acpi_dev_handle, &tpm_ppi_guid,
|
||||||
TPM_PPI_REVISION_ID, 1 << TPM_PPI_FN_VERSION))
|
TPM_PPI_REVISION_ID_1, 1 << TPM_PPI_FN_VERSION))
|
||||||
return;
|
return;
|
||||||
|
|
||||||
/* Cache PPI version string. */
|
/* Cache PPI version string. */
|
||||||
obj = acpi_evaluate_dsm_typed(chip->acpi_dev_handle, &tpm_ppi_guid,
|
obj = acpi_evaluate_dsm_typed(chip->acpi_dev_handle, &tpm_ppi_guid,
|
||||||
TPM_PPI_REVISION_ID, TPM_PPI_FN_VERSION,
|
TPM_PPI_REVISION_ID_1,
|
||||||
|
TPM_PPI_FN_VERSION,
|
||||||
NULL, ACPI_TYPE_STRING);
|
NULL, ACPI_TYPE_STRING);
|
||||||
if (obj) {
|
if (obj) {
|
||||||
strlcpy(chip->ppi_version, obj->string.pointer,
|
strlcpy(chip->ppi_version, obj->string.pointer,
|
||||||
|
|
Loading…
Add table
Reference in a new issue