From: "Jorge Ramirez-Ortiz, Foundries" <jorge@foundries.io>
To: Jens Wiklander <jens.wiklander@linaro.org>
Cc: Jorge Ramirez-Ortiz <jorge@foundries.io>,
sumit.garg@linaro.org, ricardo@foundries.io, mike@foundries.io,
tee-dev@lists.linaro.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCHv8] drivers: optee: allow op-tee to access devices on the i2c bus
Date: Thu, 13 Aug 2020 20:03:26 +0200 [thread overview]
Message-ID: <20200813180326.GA20155@trex> (raw)
In-Reply-To: <20200813072835.GA501056@jade>
On 13/08/20, Jens Wiklander wrote:
> On Wed, Aug 12, 2020 at 02:06:52PM +0200, Jorge Ramirez-Ortiz wrote:
> > Some secure elements like NXP's SE050 sit on I2C buses. For OP-TEE to
> > control this type of cryptographic devices it needs coordinated access
> > to the bus, so collisions and RUNTIME_PM dont get in the way.
> >
> > This trampoline driver allow OP-TEE to access them.
> >
> > Signed-off-by: Jorge Ramirez-Ortiz <jorge@foundries.io>
> > ---
> >
> > v8: review fixes
> > fix types and add TEEC_ERROR_NOT_SUPPORTED to GP errors
> > v7: add support for ten bit i2c slave addressing
> > v6: compile out if CONFIG_I2C not enabled
> > v5: alphabetic order of includes
> > v4: remove unnecessary extra line in optee_msg.h
> > v3: use from/to msg param to support all types of memory
> > modify OPTEE_MSG_RPC_CMD_I2C_TRANSFER message id
> >
> > drivers/tee/optee/optee_msg.h | 21 +++++++
> > drivers/tee/optee/optee_private.h | 1 +
> > drivers/tee/optee/rpc.c | 96 +++++++++++++++++++++++++++++++
> > 3 files changed, 118 insertions(+)
> >
>
> This looks good to me. Did you test this with the recently merged
> https://github.com/OP-TEE/optee_os/pull/4024 ?
I am in the process (please hold this until I can validate end to end
as I was doing with the original code).
I had to rebase from 3.6.0 to the tip of op-tee so it is taking me a
bit longer than anticipated.
Also I noticed that unfortunately a bug managed to get in that PR. The
return value is on p[3] not in p[2].
See below.
https://github.com/OP-TEE/optee_os/commit/30c53a72426366d0a4eb4aa396c37b8fd048a82a#r41447494
Also this version v8 also has now a problem (params get updated after
calling optee_to_msg_param hence the i2c return value from the
transfer does never reach optee)
apologies. will fix.
>
> Cheers,
> Jens
prev parent reply other threads:[~2020-08-13 18:03 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-08-12 12:06 [PATCHv8] drivers: optee: allow op-tee to access devices on the i2c bus Jorge Ramirez-Ortiz
2020-08-13 7:28 ` Jens Wiklander
2020-08-13 18:03 ` Jorge Ramirez-Ortiz, Foundries [this message]
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=20200813180326.GA20155@trex \
--to=jorge@foundries.io \
--cc=jens.wiklander@linaro.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mike@foundries.io \
--cc=ricardo@foundries.io \
--cc=sumit.garg@linaro.org \
--cc=tee-dev@lists.linaro.org \
/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 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.