From mboxrd@z Thu Jan 1 00:00:00 1970 From: Christophe Ricard Date: Thu, 13 Aug 2015 22:37:50 +0200 Subject: [U-Boot] [PATCH 2/3] tpm: Initial work to introduce TPM driver model In-Reply-To: References: <1439126357-23842-1-git-send-email-christophe-h.ricard@st.com> <1439126357-23842-3-git-send-email-christophe-h.ricard@st.com> Message-ID: <55CD001E.60307@gmail.com> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de Hi Simon, On 13/08/2015 17:55, Simon Glass wrote: > Hi Christophe, > > On 9 August 2015 at 07:19, Christophe Ricard > wrote: >> drivers/tpm/tpm.c is a TPM core driver port from Linux. >> So far in u-boot only infineon i2c driver is using it but it could fit >> for others... >> >> Introduce a new tpm uclass so that every TPM driver can register against it and >> and take benefit of common functions and data such as tpm_transmit, >> tpm_register_hardware & tpm_remove_hardware. >> Finally tis_init, tis_open, tis_close, tis_sendrecv are using ops allowing >> to introduce proprietary instructions. >> Also this patch convert tpm_i2c_infineon for using this tpm uclass. >> >> Signed-off-by: Christophe Ricard >> --- >> >> README | 8 +- >> drivers/tpm/Makefile | 2 +- >> drivers/tpm/tpm.c | 275 +++++++--------------------- >> drivers/tpm/tpm_i2c_infineon.c | 271 ++++++++++++++++----------- >> drivers/tpm/tpm_private.h | 23 ++- >> include/dm/platform_data/tpm_i2c_infineon.h | 23 +++ >> include/dm/uclass-id.h | 1 + >> 7 files changed, 270 insertions(+), 333 deletions(-) >> create mode 100644 include/dm/platform_data/tpm_i2c_infineon.h > There is a lot going on in this patch - in general I think it is > better to split things up so that each patch does one thing. I understand. I have basically seen in your work more or less the same approach as far as TPM class. I believe, according to your plan, i can wait for you to update you tree integrating my first comments on tpm-working branch or if you prefer i can send a merge between your work and my comments. What's your prefered option ? Best Regards Christophe > Regards, > Simon