On Wed, Jun 8, 2016 at 2:02 AM, Jarkko Sakkinen
wrote:
> The register TPM_CRB_CTRL_REQ_0 contains bits goIdle and cmdReady for
> invoking the chip to suspend and resume. This commit implements runtime
> PM for tpm_crb by using these bits.
>
> The legacy ACPI start (SMI + DMA) based devices do not
On Thu, Jun 16, 2016 at 10:57 PM, Jarkko Sakkinen
wrote:
> Hi Thomas,
>
> I'm on a vacation this week but I'll give you quick answers :)
>
> On Tue, Jun 14, 2016 at 04:14:58PM +0300, Tomas Winkler wrote:
>> On Wed, Jun 8, 2016 at 2:02 AM, Jarkko Sakkin
the series:
'Small fixes and cleanups for tpm_crb'
Tomas Winkler (3):
tpm/tpm_crb: implement tpm crb idle state
tmp/tpm_crb: fix Intel PTT hw bug during idle state
tpm/tpm_crb: cache cmd_size register value.
drivers/char/tpm/tpm-interface.c | 21 +++
drivers/char/tpm
ned-off-by: Tomas Winkler
---
drivers/char/tpm/tpm-interface.c | 21 +++
drivers/char/tpm/tpm_crb.c | 77
include/linux/tpm.h | 3 +-
3 files changed, 100 insertions(+), 1 deletion(-)
diff --git a/drivers/char/tpm/tpm-interface.c b/dr
registers. The fix brings device to ready state before trying to read
command and response buffer addresses in order to remap the for access.
Signed-off-by: Tomas Winkler
---
drivers/char/tpm/tpm_crb.c | 37 +++--
1 file changed, 27 insertions(+), 10 deletions
Instead of expensive register access on retrieving cmd_size
on each send, save the value during initialization in the private
context. The value doesn't change.
Signed-off-by: Tomas Winkler
---
drivers/char/tpm/tpm_crb.c | 10 +-
1 file changed, 5 insertions(+), 5 deletions(-)
Fixes the warning:
drivers/char/tpm/tpm_tis_core.c:443:7: warning: variable ‘itpm’ set but
not used [-Wunused-but-set-variable]
bool itpm;
^~~~
Signed-off-by: Tomas Winkler
---
drivers/char/tpm/tpm_tis_core.c | 5 -
1 file changed, 5 deletions(-)
diff --git a/drivers/char/tpm
Fixes the warning:
drivers/char/tpm/tpm_tis_core.c:443:7: warning: variable ‘itpm’ set but
not used [-Wunused-but-set-variable]
bool itpm;
^~~~
Signed-off-by: Tomas Winkler
---
V2: fix typos in the subject
drivers/char/tpm/tpm_tis_core.c | 5 -
1 file changed, 5 deletions(-)
diff
Straighten unneeded line brake and drop useless cast to void.
Signed-off-by: Tomas Winkler
---
drivers/char/tpm/tpm-dev.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/drivers/char/tpm/tpm-dev.c b/drivers/char/tpm/tpm-dev.c
index 912ad30be585..9782df406345 100644
--- a
A set of cleanup patches, w/o any significant functional change.
Tomas Winkler (4):
tmp/tpm_crb: drop include to platform_device
tpm/tpm_crb: cache cmd_size register value.
tpm/tpm_crb: drop useless cpu_to_le32 when writing to registers
tpm/tpm_crb: fix the over 80 characters checkpatch
resource\n");
Signed-off-by: Tomas Winkler
---
drivers/char/tpm/tpm_crb.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/drivers/char/tpm/tpm_crb.c b/drivers/char/tpm/tpm_crb.c
index 0c9989d0106e..6e9d1bca712f 100644
--- a/drivers/char/tpm/tpm_crb.c
+++ b/drivers/char/tpm/tpm_
Instead of expensive register access on retrieving cmd_size
on each send, save the value during initialization in the private
context. The value doesn't change.
Signed-off-by: Tomas Winkler
Reviewed-by: Jarkko Sakkinen
Tested-by: Jarkko Sakkinen
---
V2: rebased
drivers/char/tpm/tpm_
The platform device is not used in this driver, drop the
include to linux/platform_device.h
Signed-off-by: Tomas Winkler
---
drivers/char/tpm/tpm_crb.c | 1 -
1 file changed, 1 deletion(-)
diff --git a/drivers/char/tpm/tpm_crb.c b/drivers/char/tpm/tpm_crb.c
index 82a3ccd52a3a..6a4b32599869
Don't apply endianity conversion when writing to the registers
this is already handled by the system.
Signed-off-by: Tomas Winkler
---
drivers/char/tpm/tpm_crb.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/char/tpm/tpm_crb.c b/drivers/char/tpm/tpm_crb.c
will be in
ready state.
Signed-off-by: Tomas Winkler
---
V2 new in the series
drivers/char/tpm/tpm-interface.c | 5 +
drivers/char/tpm/tpm_crb.c | 37 ++---
2 files changed, 39 insertions(+), 3 deletions(-)
diff --git a/drivers/char/tpm/tpm-interface.c b
This is preparation step for implementing tpm crb
runtime pm. We need to have tpm chip allocated
and populated before we access the runtime handlers.
Signed-off-by: Tomas Winkler
---
V2: new in the series
drivers/char/tpm/tpm_crb.c | 26 ++
1 file changed, 10 insertions
states.
Tomas Winkler (4):
tpm/tpm_crb: implement tpm crb idle state
tmp/tpm_crb: fix Intel PTT hw bug during idle state
tpm/tpm_crb: open code the crb_init into acpi_add
tmp/tpm_crb: implment runtime pm for tpm_crb
drivers/char/tpm/tpm-interface.c | 5 ++
drivers/char/tpm/tpm_crb.c
functionality only is enabled only for a CRB start (MMIO)
based devices.
Based on Jarkko Sakkinen
oringal patch:
'tpm_crb: implement power tpm crb power management'
Signed-off-by: Tomas Winkler
---
V2: do not export the functions via tpm ops
drivers/char/tpm/tpm_
. The fix brings device to ready state before trying to read
command and response buffer addresses in order to remap the for access.
Signed-off-by: Tomas Winkler
---
V2: cmd read need to be called also before crb_init as this will run
self test.
drivers/char/tpm/tpm_crb.c | 47
states.
V3. fix lower case corruption in the first patch
Tomas Winkler (4):
tpm/tpm_crb: implement tpm crb idle state
tmp/tpm_crb: fix Intel PTT hw bug during idle state
tpm/tpm_crb: open code the crb_init into acpi_add
tmp/tpm_crb: implment runtime pm for tpm_crb
drivers/char/tpm/tpm
will be in
ready state.
Signed-off-by: Tomas Winkler
---
V2: new in the series
V3: resend
drivers/char/tpm/tpm-interface.c | 5 +
drivers/char/tpm/tpm_crb.c | 37 ++---
2 files changed, 39 insertions(+), 3 deletions(-)
diff --git a/drivers/char/tpm/tpm
This is preparation step for implementing tpm crb
runtime pm. We need to have tpm chip allocated
and populated before we access the runtime handlers.
Signed-off-by: Tomas Winkler
---
V2: new in the series
V3: resend
drivers/char/tpm/tpm_crb.c | 26 ++
1 file changed, 10
. The fix brings device to ready state before trying to read
command and response buffer addresses in order to remap the for access.
Signed-off-by: Tomas Winkler
---
V2: cmd read need to be called also before crb_init as this will run
self test.
V3: resend.
drivers/char/tpm/tpm_crb.c | 47
functionality only is enabled only for a CRB start (MMIO)
based devices.
Based on Jarkko Sakkinen
oringal patch:
'tpm_crb: implement power tpm crb power management'
Signed-off-by: Tomas Winkler
---
V2: do not export the functions via tpm ops
V3: fix lower case corruption; adjust function doc
the series:
'Small fixes and cleanups for tpm_crb'
Tomas Winkler (3):
tpm/tpm_crb: implement tpm crb idle state
tmp/tpm_crb: fix Intel PTT hw bug during idle state
tpm/tpm_crb: cache cmd_size register value.
drivers/char/tpm/tpm-interface.c | 21 +++
drivers/char/tpm
ned-off-by: Tomas Winkler
---
drivers/char/tpm/tpm-interface.c | 21 +++
drivers/char/tpm/tpm_crb.c | 77
include/linux/tpm.h | 3 +-
3 files changed, 100 insertions(+), 1 deletion(-)
diff --git a/drivers/char/tpm/tpm-interface.c b/dr
registers. The fix brings device to ready state before trying to read
command and response buffer addresses in order to remap the for access.
Signed-off-by: Tomas Winkler
---
drivers/char/tpm/tpm_crb.c | 37 +++--
1 file changed, 27 insertions(+), 10 deletions
Instead of expensive register access on retrieving cmd_size
on each send, save the value during initialization in the private
context. The value doesn't change.
Signed-off-by: Tomas Winkler
---
drivers/char/tpm/tpm_crb.c | 10 +-
1 file changed, 5 insertions(+), 5 deletions(-)
functionality only is enabled only for a CRB start (MMIO)
based devices.
Based on Jarkko Sakkinen
original patch:
'tpm_crb: implement power tpm crb power management'
To keep the implementation local to the hw we don't use wait_for_tpm_stat
for polling the TPM_CRB_CTRL_REQ.
Signed-off-by
e parent device while it still in use.
Fixes: 20e0152393b41 ("tpm: fix crash in tpm_tis deinitialization")
Signed-off-by: Tomas Winkler
---
drivers/char/tpm/tpm-chip.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/drivers/char/tpm/tpm-chip.c b/drivers/char/tp
Encapsulate the start method parsing in a single function
and add needed debug printouts.
It eliminates small issue with useless double checking for
ACPI_TPM2_MEMORY_MAPPED.
Signed-off-by: Tomas Winkler
---
drivers/char/tpm/tpm_crb.c | 65 +++---
1 file
From: "Winkler, Tomas"
This is preparation step for implementing tpm crb
runtime pm. We need to have tpm chip allocated
and populated before we access the runtime handlers.
Signed-off-by: Tomas Winkler
Reviewed-by: Jarkko Sakkinen
Signed-off-by: Jarkko Sakkinen
---
V2: new in the
eady state before accessing the other
registers. The fix brings device to ready state before trying to read
command and response buffer addresses in order to remap the for access.
Signed-off-by: Tomas Winkler
---
V2: cmd read need to be called also before crb_init as this will run
self test.
V3: resen
states.
V3. fix lower case corruption in the first patch
V4. Fix unbalanced runtime pm get and put
Tomas Winkler (4):
tpm/tpm_crb: implement tpm crb idle state
tmp/tpm_crb: fix Intel PTT hw bug during idle state
tpm/tpm_crb: open code the crb_init into acpi_add
tmp/tpm_crb: implement
amework is not compiled in or enabled, the device
will be in the permanent ready state.
Signed-off-by: Tomas Winkler
---
V2: new in the series
V3: resend
V4: fix unbalanced runtime pm put and get
drivers/char/tpm/tpm-interface.c | 5 +
drivers/char/tpm/tpm_crb.c
TPM_CRB_CTRL_REQ.
Signed-off-by: Tomas Winkler
Reviewed-by: Jarkko Sakkinen
Signed-off-by: Jarkko Sakkinen
---
V2: do not export the functions via tpm ops
V3: fix lower case corruption; adjust function documentation
V4: resend
drivers/char/tpm/tpm_crb.c | 70 +
The tpm stack uses pdev name convention for the parent device.
Fix that also in tpm_chip_alloc().
Fixes: 3897cd9c8d1d ("tpm: Split out the devm stuff from tpmm_chip_alloc")'
Signed-off-by: Tomas Winkler
---
drivers/char/tpm/tpm-chip.c | 8
1 file changed, 4 insertions(
Use correct kdoc format, describe correct parameters and return values.
Signed-off-by: Tomas Winkler
---
drivers/char/tpm/tpm2-cmd.c | 107 +++-
1 file changed, 66 insertions(+), 41 deletions(-)
diff --git a/drivers/char/tpm/tpm2-cmd.c b/drivers/char/tpm
Tomas Winkler (2):
tpm/tpm-interface: place kdoc just above tpm_pcr_extend
tpm/tpm2-chip: fix kdoc errors
drivers/char/tpm/tpm-interface.c | 16 +++---
drivers/char/tpm/tpm2-cmd.c | 107 ---
2 files changed, 74 insertions(+), 49 deletions
Place kdoc just above tpm_pcr_extend so it can be parsed
correctly.
Signed-off-by: Tomas Winkler
---
drivers/char/tpm/tpm-interface.c | 16
1 file changed, 8 insertions(+), 8 deletions(-)
diff --git a/drivers/char/tpm/tpm-interface.c b/drivers/char/tpm/tpm-interface.c
index
Functions tpm_transmit and transmit_cmd are referenced
from other functions kdoc hence deserve documentation.
Signed-off-by: Tomas Winkler
---
drivers/char/tpm/tpm-interface.c | 33 -
1 file changed, 28 insertions(+), 5 deletions(-)
diff --git a/drivers/char/tpm
Use corret kdoc format for function description and eliminate warning
of type:
tpm_ibmvtpm.c:66: warning: No description found for parameter 'count'
Signed-off-by: Tomas Winkler
---
drivers/char/tpm/tpm_ibmvtpm.c| 51 +++
driver
The tpm stack uses pdev name convention for the parent device.
Fix that also in tpm_chip_alloc().
Fixes: 3897cd9c8d1d ("tpm: Split out the devm stuff from tpmm_chip_alloc")'
Signed-off-by: Tomas Winkler
---
Resend.
drivers/char/tpm/tpm-chip.c | 8
1 file changed, 4 i
Use correct kdoc format, describe correct parameters and return values.
Signed-off-by: Tomas Winkler
---
V2: rework and rebase of tpm_transmit_cmd kdoc fix
drivers/char/tpm/tpm2-cmd.c | 104
1 file changed, 57 insertions(+), 47 deletions(-)
diff
Use correct kdoc format, describe correct parameters and return values.
Signed-off-by: Tomas Winkler
---
V2: Add missing '.'
drivers/char/tpm/tpm2-cmd.c | 105
1 file changed, 57 insertions(+), 48 deletions(-)
diff --git a/drivers/cha
The tpm stack uses pdev name convention for the parent device.
Fix that also in tpm_chip_alloc().
Fixes: 3897cd9c8d1d ("tpm: Split out the devm stuff from tpmm_chip_alloc")'
Signed-off-by: Tomas Winkler
---
V2: resend
drivers/char/tpm/tpm-chip.c | 8
1 file changed, 4 i
Cleanup tpm in-code documentation.
Tomas Winkler (4):
tpm: add kdoc for tpm_transmit and tpm_transmit_cmd
tpm/tpm2-chip: fix kdoc errors
tmp: use pdev for parent device in tpm_chip_alloc
tpm/vtpm: fix kdoc warnings
drivers/char/tpm/tpm-chip.c | 8 +--
drivers/char/tpm/tpm
Use corret kdoc format for function description and eliminate warning
of type:
tpm_ibmvtpm.c:66: warning: No description found for parameter 'count'
Signed-off-by: Tomas Winkler
---
V2: more fixes
drivers/char/tpm/tpm_ibmvtpm.c| 106 --
driver
Functions tpm_transmit and transmit_cmd are referenced
from other functions kdoc hence deserve documentation.
Signed-off-by: Tomas Winkler
---
V2: Add some missing '.'
drivers/char/tpm/tpm-interface.c | 33 -
1 file changed, 28 insertions(+), 5 deletion
Use get_unaligned_be32 as b32_to_cpu doesn't work correctly on
all platforms for unaligned access.
The fix doesn't cover all the cases as also some cast
structures have members on unaligned addresses.
Signed-off-by: Tomas Winkler
---
drivers/char/tpm/tpm-interface.c| 4 ++--
dr
leave
the device in low power state. Symmetrically cmdReady is called
upon resume.
Signed-off-by: Tomas Winkler
---
drivers/char/tpm/tpm_crb.c | 25 -
1 file changed, 24 insertions(+), 1 deletion(-)
diff --git a/drivers/char/tpm/tpm_crb.c b/drivers/char/tpm/tpm_crb.c
index
51 matches
Mail list logo