Add i2c TPM driver
cover Add i2c TPM driver
This patchset adds an i2c bus based TPM driver.
Che-Liang Chiou (3):
tpm: Rename generic_lpc_tpm to tpm_tis_lpc
tpm: Add i2c TPM driver
tpm: Update README
Makefile | 2 +-
README | 18 +-
drivers/tpm/Makefile | 5 +-
drivers/tpm/tpm.c | 457 +++++++++++++++++
drivers/tpm/tpm_private.h | 131 +++++
drivers/tpm/tpm_tis_i2c.c | 584 ++++++++++++++++++++++
drivers/tpm/{generic_lpc_tpm.c => tpm_tis_lpc.c} | 0
7 files changed, 1194 insertions(+), 3 deletions(-)
create mode 100644 drivers/tpm/tpm.c
create mode 100644 drivers/tpm/tpm_private.h
create mode 100644 drivers/tpm/tpm_tis_i2c.c
rename drivers/tpm/{generic_lpc_tpm.c => tpm_tis_lpc.c} (100%)Signature · 1 line
1.7.3.1
PATCH 1/3 tpm: Rename generic_lpc_tpm to tpm_tis_lpc
The new name is more aligned with Linux kernel's naming of TPM driver.
---
Makefile | 2 +-
README | 5 ++++-
drivers/tpm/Makefile | 2 +-
drivers/tpm/{generic_lpc_tpm.c => tpm_tis_lpc.c} | 0
4 files changed, 6 insertions(+), 3 deletions(-)
rename drivers/tpm/{generic_lpc_tpm.c => tpm_tis_lpc.c} (100%)Makefile +1 -1
@@ -277,7 +277,7 @@ LIBS += arch/powerpc/cpu/mpc8xxx/lib8xxx.o endif LIBS += drivers/rtc/librtc.o LIBS += drivers/serial/libserial.o -ifeq ($(CONFIG_GENERIC_LPC_TPM),y) +ifeq ($(CONFIG_TPM),y) LIBS += drivers/tpm/libtpm.o endif LIBS += drivers/twserial/libtws.o
README +4 -1
@@ -1073,7 +1073,10 @@ The following options need to be configured: If this option is set, the driver enables cache flush. - TPM Support: - CONFIG_GENERIC_LPC_TPM + CONFIG_TPM + Support TPM devices. + + CONFIG_TPM_TIS_LPC Support for generic parallel port TPM devices. Only one device per system is supported at this time.
drivers/tpm/Makefile +1 -1
@@ -23,7 +23,7 @@ include $(TOPDIR)/config.mk LIB := $(obj)libtpm.o -COBJS-$(CONFIG_GENERIC_LPC_TPM) = generic_lpc_tpm.o +COBJS-$(CONFIG_TPM_TIS_LPC) = tpm_tis_lpc.o COBJS := $(COBJS-y) SRCS := $(COBJS:.o=.c)
drivers/tpm/tpm_tis_lpc.c renamed from drivers/tpm/generic_lpc_tpm.c +0 -0
Signature · 1 line
1.7.3.1
PATCH 1/3 tpm: Rename generic_lpc_tpm to tpm_tis_lpc
-mike
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 836 bytes
Desc: This is a digitally signed message part.
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20111213/16cde0e4/attachment.pgp>
PATCH 1/3 tpm: Rename generic_lpc_tpm to tpm_tis_lpc
In reply to Che-Liang Chiou-----Original Message-----
From: Che-Liang Chiou [mailto:clchiou at chromium.org]
Sent: Tuesday, December 13, 2011 12:51 PM
To: U-Boot Mailing List
Cc: Simon Glass; Mike Frysinger; Huewe Peter (IFAG CCS TI SWT SW ESW); Che-Liang Chiou
Subject: [PATCH 1/3] tpm: Rename generic_lpc_tpm to tpm_tis_lpc
The new name is more aligned with Linux kernel's naming of TPM driver.
I'm fine with this
(please note my email has changed)
PATCH 2/3 tpm: Add i2c TPM driver
In reply to Che-Liang ChiouPeter Huewe implemented the original driver; this patch only reorganizes the code structure of the driver, and does not make logical changes.
tpm.c implements the interface defined in tpm.h based on underlying LPC or i2C TPM driver. tpm.c and the underlying driver communicate throught tpm_private.h.
This patch is tested on a tegra2-based machine, where the i2c driver is not upstreamed yet.
Note: Merging the LPC driver with tpm.c is left to future patches.
--- drivers/tpm/Makefile | 5 +- drivers/tpm/tpm.c | 457 +++++++++++++++++++++++++++++++++++ drivers/tpm/tpm_private.h | 131 ++++++++++ drivers/tpm/tpm_tis_i2c.c | 584 +++++++++++++++++++++++++++++++++++++++++++++ 4 files changed, 1176 insertions(+), 1 deletions(-) create mode 100644 drivers/tpm/tpm.c create mode 100644 drivers/tpm/tpm_private.h create mode 100644 drivers/tpm/tpm_tis_i2c.c
drivers/tpm/Makefile +4 -1
@@ -23,7 +23,10 @@ include $(TOPDIR)/config.mk LIB := $(obj)libtpm.o -COBJS-$(CONFIG_TPM_TIS_LPC) = tpm_tis_lpc.o +# TODO(clchiou): Merge tpm_tis_lpc.c with tpm.c +COBJS-$(CONFIG_TPM_TIS_I2C) += tpm.o +COBJS-$(CONFIG_TPM_TIS_I2C) += tpm_tis_i2c.o +COBJS-$(CONFIG_TPM_TIS_LPC) += tpm_tis_lpc.o COBJS := $(COBJS-y) SRCS := $(COBJS:.o=.c)
drivers/tpm/tpm.c new file +457 -0
457 lines not on this page · raw message
drivers/tpm/tpm_private.h new file +131 -0
131 lines not on this page · raw message
drivers/tpm/tpm_tis_i2c.c new file +584 -0
584 lines not on this page · raw message
Signature · 1 line
1.7.3.1
PATCH 2/3 tpm: Add i2c TPM driver
Quoted 7 lines · On Tuesday 13 December 2011 06:51:01 Che-Liang Chiou wrote:
Peter Huewe implemented the original driver; this patch only reorganizes the code structure of the driver, and does not make logical changes.
tpm.cimplements the interface defined intpm.hbased on underlying LPC or i2C TPM driver.tpm.cand the underlying driver communicate throughttpm_private.h.
Quoted 6 lines
This patch is tested on a tegra2-based machine, where the i2c driver is not upstreamed yet.
Note: Merging the LPC driver with
tpm.cis left to future patches.Signed-off-by Peter Huewe <[email protected]>
you need to add your own s-o-b tag here since you're submitting it
-mike
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 836 bytes
Desc: This is a digitally signed message part.
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20111213/452928d6/attachment.pgp>
PATCH 2/3 tpm: Add i2c TPM driver
In reply to Che-Liang Chiou-----Original Message-----
From: Che-Liang Chiou [mailto:clchiou at chromium.org]
Sent: Tuesday, December 13, 2011 12:51 PM
To: U-Boot Mailing List
Cc: Simon Glass; Mike Frysinger; Huewe Peter (IFAG CCS TI SWT SW ESW); Che-Liang Chiou
Subject: [PATCH 2/3] tpm: Add i2c TPM driver
Peter Huewe implemented the original driver; this patch only reorganizes the code structure of the driver, and does not make logical changes.
tpm.c implements the interface defined in tpm.h based on underlying LPC or i2C TPM driver. tpm.c and the underlying driver communicate throught tpm_private.h.
This patch is tested on a tegra2-based machine, where the i2c driver is not upstreamed yet.
Note: Merging the LPC driver with tpm.c is left to future patches.
[[[PH]]]
I'm fine with this
(please note my email has changed)
PATCH 3/3 tpm: Update README
In reply to Che-Liang ChiouDocument TPM_TIS_I2C-related config options in README.
--- README | 13 +++++++++++++ 1 files changed, 13 insertions(+), 0 deletions(-)
README +13 -0
@@ -1076,6 +1076,19 @@ The following options need to be configured: CONFIG_TPM Support TPM devices. + CONFIG_TPM_TIS_I2C + Support for i2c bus TPM devices. Only one device + per system is supported at this time. + + CONFIG_TPM_TIS_I2C_BUS_NUMBER + Define the the i2c bus number for the TPM device + + CONFIG_TPM_TIS_I2C_SLAVE_ADDRESS + Define the TPM's address on the i2c bus + + CONFIG_TPM_TIS_I2C_BURST_LIMITATION + Define the burst count bytes upper limit + CONFIG_TPM_TIS_LPC Support for generic parallel port TPM devices. Only one device per system is supported at this time.
Signature · 1 line
1.7.3.1
PATCH 3/3 tpm: Update README
Quoted 1 line · On Tuesday 13 December 2011 06:51:02 Che-Liang Chiou wrote:
Document TPM_TIS_I2C-related config options in README.
this should probably just be squashed into:
[PATCH 2/3] tpm: Add i2c TPM driver
-mike
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 836 bytes
Desc: This is a digitally signed message part.
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20111213/6368486a/attachment.pgp>
PATCH 3/3 tpm: Update README
In reply to Che-Liang Chiou-----Original Message-----
From: Che-Liang Chiou [mailto:clchiou at chromium.org]
Sent: Tuesday, December 13, 2011 12:51 PM
To: U-Boot Mailing List
Cc: Simon Glass; Mike Frysinger; Huewe Peter (IFAG CCS TI SWT SW ESW); Che-Liang Chiou
Subject: [PATCH 3/3] tpm: Update README
Document TPM_TIS_I2C-related config options in README.
I'm fine with this
(please note my email has changed)