public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
From: Wolfgang Denk <wd@denx.de>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH 1/1] TPM: STMicroelectronics u-boot driver I2C
Date: Mon, 08 Apr 2013 20:25:02 +0200	[thread overview]
Message-ID: <20130408182502.7A2342016C2@gemini.denx.de> (raw)
In-Reply-To: <1365429818-2090-1-git-send-email-mathias.leblanc@st.com>

Dear Mathias leblanc,

In message <1365429818-2090-1-git-send-email-mathias.leblanc@st.com> you wrote:
> 
>  * STMicroelectronics version 1.2.0, Copyright (C) 2013

Who exactly is the copyright holder?

>  * STMicroelectronics comes with ABSOLUTELY NO WARRANTY.
>  * This is free software, and you are welcome to redistribute it
>  * under certain conditions.

And these would be what exactly?

Sorry, this makes no sense.  Such statements must be precise to the
finest detail , and they belong into the code, and not into the commit
message.

In the next step, please run your patch through checkpatch and fix the
reported issues.

Please make sure to get rid of all these "__attribute__ ((packed))"
stuff.  Make sure that structs are properly aligned, and use explicit
conversion where and if necessary.


> diff --git a/Makefile b/Makefile
> index 12763ce..ef954a4 100644
> --- a/Makefile
> +++ b/Makefile
> @@ -314,7 +314,7 @@ endif
>  LIBS-y += drivers/rtc/librtc.o
>  LIBS-y += drivers/serial/libserial.o
>  LIBS-y += drivers/sound/libsound.o
> -LIBS-$(CONFIG_GENERIC_LPC_TPM) += drivers/tpm/libtpm.o
> +LIBS-$(CONFIG_TPM) += drivers/tpm/libtpm.o

If you change this, you must also update the realted documentation (in
the README) and _all_ related code (I think you missed at least
include/configs/coreboot.h).

ALso please make sure to add the documentation to the proper groups,
i. e. CONFIG_CMD_TPM should be added to the CONFIG_CMD_* group.

> +	if (tis_init()) {
> +		puts("tis_init() failed!\n");
> +		return -1;
> +	}
> +
> +	if (tis_open()) {
> +		puts("tis_open() failed!\n");
> +		return -1;

Can we have some better diagnostics, for example including the rason
for the failure?

> +	rv = tis_sendrecv(Startup, sizeof(Startup), &response, &rlength);
> +	if (rv) {
> +		printf("tpm test Startup failed\n");
> +		CHECK(tis_close());
> +	}
> +
> +	rv = tis_sendrecv(SelfTestFull, sizeof(SelfTestFull), &response,

Startup, SelfTestFull, ...

We do not allow CamelCase indentifiers.

> +U_BOOT_CMD(tpm_hash, MAX_TRANSACTION_SIZE, 1, do_tpm_hash,
...
> +U_BOOT_CMD(tpm_get_flag, 1, 1, do_tpm_get_flag,

Instead of adding a number of different commands, this should be
implemented as sub-commands under a common one, i. e. make this:

	tpm_hash     --> tpm hash ...
	tpm_get_flag --> tpm get_flag ...

[eventually there is even a better name than "get_flag"?]

...
> +++ b/drivers/tpm/tis_i2c.c
> @@ -0,0 +1,211 @@
> +/*
> + * Copyright (c) 2012 The Chromium OS Authors. All rights reserved.
> + * Use of this source code is governed by a BSD-style license that can be
> + * found in the LICENSE file.

This is not acceptable.  Please be precise here.  We need to know
exacly which license terms apply.  Please see item # 1 at
http://www.denx.de/wiki/view/U-Boot/Patches#Notes  for details.


> diff --git a/drivers/tpm/tpm.c b/drivers/tpm/tpm.c
> new file mode 100644
> index 0000000..3f4f66e
> --- /dev/null
> +++ b/drivers/tpm/tpm.c
> @@ -0,0 +1,472 @@
> +/*
> + * Copyright (C) 2011 Infineon Technologies
> + *
> + * Authors:
> + * Peter Huewe <huewe.external@infineon.com>
> + *
> + * Description:
> + * Device driver for TCG/TCPA TPM (trusted platform module).
> + * Specifications at www.trustedcomputinggroup.org
> + *
> + * It is based on the Linux kernel driver tpm.c from Leendert van
> + * Dorn, Dave Safford, Reiner Sailer, and Kyleen Hall.

Do you have a more precise reference where the code is coming from?
What we would like to see is described in bullet # 4 at
http://www.denx.de/wiki/view/U-Boot/Patches#Attributing_Code_Copyrights_Sign


Best regards,

Wolfgang Denk

-- 
DENX Software Engineering GmbH,     MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de
It's hard to think of you as the end result of millions of  years  of
evolution.

  reply	other threads:[~2013-04-08 18:25 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-04-08 14:03 [U-Boot] [PATCH 1/1] TPM: STMicroelectronics u-boot driver I2C Mathias leblanc
2013-04-08 18:25 ` Wolfgang Denk [this message]
  -- strict thread matches above, loose matches on Subject: below --
2013-05-15 13:58 Mathias leblanc
2013-10-22 15:48 ` Simon Glass
2014-02-16 22:46   ` Simon Glass
2014-02-16 22:47     ` Simon Glass
2014-02-17 22:23   ` Simon Glass
     [not found]     ` <C56FB217EE26FF4AB56DA86C1AB6A2724E40EAD190@SAFEX1MAIL3.st.com>
2014-03-31 18:31       ` Simon Glass
2013-04-22 15:55 Mathias leblanc
2013-04-22 18:53 ` Tom Rini
2013-04-23  2:33 ` Simon Glass
2013-03-22 16:28 Mathias leblanc
2013-05-11 21:04 ` Simon Glass

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20130408182502.7A2342016C2@gemini.denx.de \
    --to=wd@denx.de \
    --cc=u-boot@lists.denx.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox