All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] adding tpm2.0 support to nuvoton drivers and adding npct6xx
@ 2016-06-02 11:06 andrew
  2016-06-03  8:30 ` Jarkko Sakkinen
  0 siblings, 1 reply; 3+ messages in thread
From: andrew @ 2016-06-02 11:06 UTC (permalink / raw)
  To: jgunthorpe-ePGOBjL8dl3ta4EC/59zMFaTQe2KTcn/,
	jarkko.sakkinen-VuQAYsv1563Yd54FQh9/CA
  Cc: andrew.zamansky-KrzQf0k3Iz9BDgjK7y7TUQ,
	Dan.Morav-KrzQf0k3Iz9BDgjK7y7TUQ,
	tpmdd-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f,
	gcwilson-r/Jw6+rmf7HQT0dZR+AlfA, stimpy1-Re5JQEeQqe8AvxtiuMwx3w

From 401214bfbece31e3ef783f13b762da6f83d10f84 Mon Sep 17 00:00:00 2001
From: andrew azmansky <andrew.zamansky@nuvoton.com>
Date: Thu, 2 Jun 2016 09:13:28 +0300
Subject: [PATCH] adding tpm2.0 support to nuvoton drivers and adding npct6xx
 to device tree

Signed-off-by: Andrew Zamansky <andrew.zamansky@nuvoton.com>

---
 Documentation/devicetree/bindings/i2c/trivial-devices.txt | 1 +
 drivers/char/tpm/tpm_i2c_nuvoton.c                        | 5 +++--
 drivers/char/tpm/tpm_tis.c                                | 2 +-
 3 files changed, 5 insertions(+), 3 deletions(-)

diff --git a/Documentation/devicetree/bindings/i2c/trivial-devices.txt b/Documentation/devicetree/bindings/i2c/trivial-devices.txt
index 5398744..0a07cbc 100644
--- a/Documentation/devicetree/bindings/i2c/trivial-devices.txt
+++ b/Documentation/devicetree/bindings/i2c/trivial-devices.txt
@@ -62,6 +62,7 @@ national,lm80		Serial Interface ACPI-Compatible Microprocessor System Hardware M
 national,lm85		Temperature sensor with integrated fan control
 national,lm92		±0.33°C Accurate, 12-Bit + Sign Temperature Sensor and Thermal Window Comparator with Two-Wire Interface
 nuvoton,npct501		i2c trusted platform module (TPM)
+nuvoton,npct6xx		i2c trusted platform module (TPM) 6xx series
 nxp,pca9556		Octal SMBus and I2C registered interface
 nxp,pca9557		8-bit I2C-bus and SMBus I/O port with reset
 nxp,pcf8563		Real-time clock/calendar
diff --git a/drivers/char/tpm/tpm_i2c_nuvoton.c b/drivers/char/tpm/tpm_i2c_nuvoton.c
index b64effc..7fb0e6c 100644
--- a/drivers/char/tpm/tpm_i2c_nuvoton.c
+++ b/drivers/char/tpm/tpm_i2c_nuvoton.c
@@ -1,5 +1,5 @@
 /******************************************************************************
- * Nuvoton TPM I2C Device Driver Interface for WPCT301/NPCT501,
+ * Nuvoton TPM I2C Device Driver Interface for WPCT301/NPCT501/NPCT6XX,
  * based on the TCG TPM Interface Spec version 1.2.
  * Specifications at www.trustedcomputinggroup.org
  *
@@ -456,7 +456,7 @@ static bool i2c_nuvoton_req_canceled(struct tpm_chip *chip, u8 status)
 }
 
 static const struct tpm_class_ops tpm_i2c = {
-	.flags = TPM_OPS_AUTO_STARTUP,
+	.flags = TPM_OPS_AUTO_STARTUP | TPM_OPS_PROBE_TPM2,
 	.status = i2c_nuvoton_read_status,
 	.recv = i2c_nuvoton_recv,
 	.send = i2c_nuvoton_send,
@@ -623,6 +623,7 @@ MODULE_DEVICE_TABLE(i2c, i2c_nuvoton_id);
 static const struct of_device_id i2c_nuvoton_of_match[] = {
 	{.compatible = "nuvoton,npct501"},
 	{.compatible = "winbond,wpct301"},
+	{.compatible = "nuvoton,npct6xx"},
 	{},
 };
 MODULE_DEVICE_TABLE(of, i2c_nuvoton_of_match);
diff --git a/drivers/char/tpm/tpm_tis.c b/drivers/char/tpm/tpm_tis.c
index 30aff5b..bc5fba3 100644
--- a/drivers/char/tpm/tpm_tis.c
+++ b/drivers/char/tpm/tpm_tis.c
@@ -524,7 +524,7 @@ static bool tpm_tis_req_canceled(struct tpm_chip *chip, u8 status)
 }
 
 static const struct tpm_class_ops tpm_tis = {
-	.flags = TPM_OPS_AUTO_STARTUP,
+	.flags = TPM_OPS_AUTO_STARTUP  | TPM_OPS_PROBE_TPM2,
 	.status = tpm_tis_status,
 	.recv = tpm_tis_recv,
 	.send = tpm_tis_send,
-- 
1.9.1

this patch requires Jason's latest patch 

------------------------------------------------------------------------------
What NetFlow Analyzer can do for you? Monitors network bandwidth and traffic
patterns at an interface-level. Reveals which users, apps, and protocols are 
consuming the most bandwidth. Provides multi-vendor support for NetFlow, 
J-Flow, sFlow and other flows. Make informed decisions using capacity 
planning reports. https://ad.doubleclick.net/ddm/clk/305295220;132659582;e
_______________________________________________
tpmdd-devel mailing list
tpmdd-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/tpmdd-devel

^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH] adding tpm2.0 support to nuvoton drivers and adding npct6xx
  2016-06-02 11:06 [PATCH] adding tpm2.0 support to nuvoton drivers and adding npct6xx andrew
@ 2016-06-03  8:30 ` Jarkko Sakkinen
       [not found]   ` <20160603083001.GA30613-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>
  0 siblings, 1 reply; 3+ messages in thread
From: Jarkko Sakkinen @ 2016-06-03  8:30 UTC (permalink / raw)
  To: andrew
  Cc: Dan.Morav-KrzQf0k3Iz9BDgjK7y7TUQ,
	tpmdd-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f,
	gcwilson-r/Jw6+rmf7HQT0dZR+AlfA, stimpy1-Re5JQEeQqe8AvxtiuMwx3w

On Thu, Jun 02, 2016 at 02:06:34PM +0300, andrew wrote:
> From 401214bfbece31e3ef783f13b762da6f83d10f84 Mon Sep 17 00:00:00 2001
> From: andrew azmansky <andrew.zamansky-KrzQf0k3Iz9BDgjK7y7TUQ@public.gmane.org>
> Date: Thu, 2 Jun 2016 09:13:28 +0300
> Subject: [PATCH] adding tpm2.0 support to nuvoton drivers and adding npct6xx
>  to device tree
> 
> Signed-off-by: Andrew Zamansky <andrew.zamansky-KrzQf0k3Iz9BDgjK7y7TUQ@public.gmane.org>
> 
> ---
>  Documentation/devicetree/bindings/i2c/trivial-devices.txt | 1 +
>  drivers/char/tpm/tpm_i2c_nuvoton.c                        | 5 +++--
>  drivers/char/tpm/tpm_tis.c                                | 2 +-
>  3 files changed, 5 insertions(+), 3 deletions(-)
> 
> diff --git a/Documentation/devicetree/bindings/i2c/trivial-devices.txt b/Documentation/devicetree/bindings/i2c/trivial-devices.txt
> index 5398744..0a07cbc 100644
> --- a/Documentation/devicetree/bindings/i2c/trivial-devices.txt
> +++ b/Documentation/devicetree/bindings/i2c/trivial-devices.txt
> @@ -62,6 +62,7 @@ national,lm80		Serial Interface ACPI-Compatible Microprocessor System Hardware M
>  national,lm85		Temperature sensor with integrated fan control
>  national,lm92		±0.33°C Accurate, 12-Bit + Sign Temperature Sensor and Thermal Window Comparator with Two-Wire Interface
>  nuvoton,npct501		i2c trusted platform module (TPM)
> +nuvoton,npct6xx		i2c trusted platform module (TPM) 6xx series
>  nxp,pca9556		Octal SMBus and I2C registered interface
>  nxp,pca9557		8-bit I2C-bus and SMBus I/O port with reset
>  nxp,pcf8563		Real-time clock/calendar
> diff --git a/drivers/char/tpm/tpm_i2c_nuvoton.c b/drivers/char/tpm/tpm_i2c_nuvoton.c
> index b64effc..7fb0e6c 100644
> --- a/drivers/char/tpm/tpm_i2c_nuvoton.c
> +++ b/drivers/char/tpm/tpm_i2c_nuvoton.c
> @@ -1,5 +1,5 @@
>  /******************************************************************************
> - * Nuvoton TPM I2C Device Driver Interface for WPCT301/NPCT501,
> + * Nuvoton TPM I2C Device Driver Interface for WPCT301/NPCT501/NPCT6XX,
>   * based on the TCG TPM Interface Spec version 1.2.
>   * Specifications at www.trustedcomputinggroup.org
>   *
> @@ -456,7 +456,7 @@ static bool i2c_nuvoton_req_canceled(struct tpm_chip *chip, u8 status)
>  }
>  
>  static const struct tpm_class_ops tpm_i2c = {
> -	.flags = TPM_OPS_AUTO_STARTUP,
> +	.flags = TPM_OPS_AUTO_STARTUP | TPM_OPS_PROBE_TPM2,
>  	.status = i2c_nuvoton_read_status,
>  	.recv = i2c_nuvoton_recv,
>  	.send = i2c_nuvoton_send,
> @@ -623,6 +623,7 @@ MODULE_DEVICE_TABLE(i2c, i2c_nuvoton_id);
>  static const struct of_device_id i2c_nuvoton_of_match[] = {
>  	{.compatible = "nuvoton,npct501"},
>  	{.compatible = "winbond,wpct301"},
> +	{.compatible = "nuvoton,npct6xx"},
>  	{},
>  };
>  MODULE_DEVICE_TABLE(of, i2c_nuvoton_of_match);
> diff --git a/drivers/char/tpm/tpm_tis.c b/drivers/char/tpm/tpm_tis.c
> index 30aff5b..bc5fba3 100644
> --- a/drivers/char/tpm/tpm_tis.c
> +++ b/drivers/char/tpm/tpm_tis.c
> @@ -524,7 +524,7 @@ static bool tpm_tis_req_canceled(struct tpm_chip *chip, u8 status)
>  }
>  
>  static const struct tpm_class_ops tpm_tis = {
> -	.flags = TPM_OPS_AUTO_STARTUP,
> +	.flags = TPM_OPS_AUTO_STARTUP  | TPM_OPS_PROBE_TPM2,
>  	.status = tpm_tis_status,
>  	.recv = tpm_tis_recv,
>  	.send = tpm_tis_send,
> -- 
> 1.9.1
> 
> this patch requires Jason's latest patch 

Then you should create a proper patch set with a cover letter.

/Jarkko

------------------------------------------------------------------------------
What NetFlow Analyzer can do for you? Monitors network bandwidth and traffic
patterns at an interface-level. Reveals which users, apps, and protocols are 
consuming the most bandwidth. Provides multi-vendor support for NetFlow, 
J-Flow, sFlow and other flows. Make informed decisions using capacity 
planning reports. https://ad.doubleclick.net/ddm/clk/305295220;132659582;e

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] adding tpm2.0 support to nuvoton drivers and adding npct6xx
       [not found]   ` <20160603083001.GA30613-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>
@ 2016-06-05  4:52     ` andrew.zamansky-KrzQf0k3Iz9BDgjK7y7TUQ
  0 siblings, 0 replies; 3+ messages in thread
From: andrew.zamansky-KrzQf0k3Iz9BDgjK7y7TUQ @ 2016-06-05  4:52 UTC (permalink / raw)
  To: jarkko.sakkinen-VuQAYsv1563Yd54FQh9/CA
  Cc: Dan.Morav-KrzQf0k3Iz9BDgjK7y7TUQ,
	tpmdd-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f,
	gcwilson-r/Jw6+rmf7HQT0dZR+AlfA, stimpy1-Re5JQEeQqe8AvxtiuMwx3w

hi Jarrko ,

what does it mean "proper patch set" ?
this is patch that was created in follow way :
1)i have downloaded kernel 4.6-rc7 .
2)applied Jason's patch .
3)created git repo.
4)made my changes
5)created patch with "git format-patch master -1"

andrew

> -----Original Message-----
> From: Jarkko Sakkinen [mailto:jarkko.sakkinen-VuQAYsv1563Yd54FQh9/CA@public.gmane.org]
> Sent: Friday, 03 June, 2016 11:30
> To: IS10 Andrew Zamansky Partner
> Cc: jgunthorpe-ePGOBjL8dl3ta4EC/59zMFaTQe2KTcn/@public.gmane.org; tpmdd-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org;
> gcwilson-r/Jw6+rmf7HQT0dZR+AlfA@public.gmane.org; IS30 Dan Morav; stimpy1-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org
> Subject: Re: [PATCH] adding tpm2.0 support to nuvoton drivers and adding npct6xx
>
> On Thu, Jun 02, 2016 at 02:06:34PM +0300, andrew wrote:
> > From 401214bfbece31e3ef783f13b762da6f83d10f84 Mon Sep 17 00:00:00 2001
> > From: andrew azmansky <andrew.zamansky-KrzQf0k3Iz9BDgjK7y7TUQ@public.gmane.org>
> > Date: Thu, 2 Jun 2016 09:13:28 +0300
> > Subject: [PATCH] adding tpm2.0 support to nuvoton drivers and adding npct6xx
> >  to device tree
> >
> > Signed-off-by: Andrew Zamansky <andrew.zamansky-KrzQf0k3Iz9BDgjK7y7TUQ@public.gmane.org>
> >
> > ---
> >  Documentation/devicetree/bindings/i2c/trivial-devices.txt | 1 +
> >  drivers/char/tpm/tpm_i2c_nuvoton.c                        | 5 +++--
> >  drivers/char/tpm/tpm_tis.c                                | 2 +-
> >  3 files changed, 5 insertions(+), 3 deletions(-)
> >
> > diff --git a/Documentation/devicetree/bindings/i2c/trivial-devices.txt
> b/Documentation/devicetree/bindings/i2c/trivial-devices.txt
> > index 5398744..0a07cbc 100644
> > --- a/Documentation/devicetree/bindings/i2c/trivial-devices.txt
> > +++ b/Documentation/devicetree/bindings/i2c/trivial-devices.txt
> > @@ -62,6 +62,7 @@ national,lm80Serial Interface ACPI-Compatible Microprocessor
> System Hardware M
> >  national,lm85Temperature sensor with integrated fan control
> >  national,lm92±0.33°C Accurate, 12-Bit + Sign Temperature Sensor and Thermal
> Window Comparator with Two-Wire Interface
> >  nuvoton,npct501i2c trusted platform module (TPM)
> > +nuvoton,npct6xxi2c trusted platform module (TPM) 6xx series
> >  nxp,pca9556Octal SMBus and I2C registered interface
> >  nxp,pca95578-bit I2C-bus and SMBus I/O port with reset
> >  nxp,pcf8563Real-time clock/calendar
> > diff --git a/drivers/char/tpm/tpm_i2c_nuvoton.c b/drivers/char/tpm/tpm_i2c_nuvoton.c
> > index b64effc..7fb0e6c 100644
> > --- a/drivers/char/tpm/tpm_i2c_nuvoton.c
> > +++ b/drivers/char/tpm/tpm_i2c_nuvoton.c
> > @@ -1,5 +1,5 @@
> >
> /*************************************************************************
> *****
> > - * Nuvoton TPM I2C Device Driver Interface for WPCT301/NPCT501,
> > + * Nuvoton TPM I2C Device Driver Interface for WPCT301/NPCT501/NPCT6XX,
> >   * based on the TCG TPM Interface Spec version 1.2.
> >   * Specifications at www.trustedcomputinggroup.org
> >   *
> > @@ -456,7 +456,7 @@ static bool i2c_nuvoton_req_canceled(struct tpm_chip *chip, u8 status)
> >  }
> >
> >  static const struct tpm_class_ops tpm_i2c = {
> > -.flags = TPM_OPS_AUTO_STARTUP,
> > +.flags = TPM_OPS_AUTO_STARTUP | TPM_OPS_PROBE_TPM2,
> >  .status = i2c_nuvoton_read_status,
> >  .recv = i2c_nuvoton_recv,
> >  .send = i2c_nuvoton_send,
> > @@ -623,6 +623,7 @@ MODULE_DEVICE_TABLE(i2c, i2c_nuvoton_id);
> >  static const struct of_device_id i2c_nuvoton_of_match[] = {
> >  {.compatible = "nuvoton,npct501"},
> >  {.compatible = "winbond,wpct301"},
> > +{.compatible = "nuvoton,npct6xx"},
> >  {},
> >  };
> >  MODULE_DEVICE_TABLE(of, i2c_nuvoton_of_match);
> > diff --git a/drivers/char/tpm/tpm_tis.c b/drivers/char/tpm/tpm_tis.c
> > index 30aff5b..bc5fba3 100644
> > --- a/drivers/char/tpm/tpm_tis.c
> > +++ b/drivers/char/tpm/tpm_tis.c
> > @@ -524,7 +524,7 @@ static bool tpm_tis_req_canceled(struct tpm_chip *chip, u8 status)
> >  }
> >
> >  static const struct tpm_class_ops tpm_tis = {
> > -.flags = TPM_OPS_AUTO_STARTUP,
> > +.flags = TPM_OPS_AUTO_STARTUP  | TPM_OPS_PROBE_TPM2,
> >  .status = tpm_tis_status,
> >  .recv = tpm_tis_recv,
> >  .send = tpm_tis_send,
> > --
> > 1.9.1
> >
> > this patch requires Jason's latest patch
>
> Then you should create a proper patch set with a cover letter.
>
> /Jarkko


===========================================================================================
The privileged confidential information contained in this email is intended for use only by the addressees as indicated by the original sender of this email. If you are not the addressee indicated in this email or are not responsible for delivery of the email to such a person, please kindly reply to the sender indicating this fact and delete all copies of it from your computer and network server immediately. Your cooperation is highly appreciated. It is advised that any unauthorized use of confidential information of Nuvoton is strictly prohibited; and any information in this email irrelevant to the official business of Nuvoton shall be deemed as neither given nor endorsed by Nuvoton.

------------------------------------------------------------------------------
What NetFlow Analyzer can do for you? Monitors network bandwidth and traffic
patterns at an interface-level. Reveals which users, apps, and protocols are 
consuming the most bandwidth. Provides multi-vendor support for NetFlow, 
J-Flow, sFlow and other flows. Make informed decisions using capacity 
planning reports. https://ad.doubleclick.net/ddm/clk/305295220;132659582;e

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2016-06-05  4:52 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-06-02 11:06 [PATCH] adding tpm2.0 support to nuvoton drivers and adding npct6xx andrew
2016-06-03  8:30 ` Jarkko Sakkinen
     [not found]   ` <20160603083001.GA30613-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>
2016-06-05  4:52     ` andrew.zamansky-KrzQf0k3Iz9BDgjK7y7TUQ

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.