public inbox for devicetree@vger.kernel.org
 help / color / mirror / Atom feed
From: JiaJie Ho <jiajie.ho@starfivetech.com>
To: Herbert Xu <herbert@gondor.apana.org.au>
Cc: "David S . Miller" <davem@davemloft.net>,
	Rob Herring <robh+dt@kernel.org>,
	Krzysztof Kozlowski <krzysztof.kozlowski+dt@linaro.org>,
	Palmer Dabbelt <palmer@dabbelt.com>,
	Emil Renner Berthing <kernel@esmil.dk>,
	Conor Dooley <conor.dooley@microchip.com>,
	"linux-crypto@vger.kernel.org" <linux-crypto@vger.kernel.org>,
	"devicetree@vger.kernel.org" <devicetree@vger.kernel.org>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	"linux-riscv@lists.infradead.org"
	<linux-riscv@lists.infradead.org>
Subject: RE: [PATCH v4 4/4] crypto: starfive - Add hash and HMAC support
Date: Mon, 10 Apr 2023 13:10:29 +0000	[thread overview]
Message-ID: <c1925af208b540c2bd78a16bc593ecae@EXMBX168.cuchost.com> (raw)
In-Reply-To: <ZDPgXyGZtMZw5G4q@gondor.apana.org.au>

> Subject: Re: [PATCH v4 4/4] crypto: starfive - Add hash and HMAC support
> 
> On Mon, Apr 10, 2023 at 04:43:37PM +0800, Jia Jie Ho wrote:
> >
> > The hardware requires user to set a 'final' bit after data transfer completed.
> > This completion is to wait for the interrupt signal from device that
> > the final digest has been populated to the read registers.
> >
> > I'll do the finalize_request call directly in the next version.
> 
> Instead of the IRQ performing a completion, it could instead schedule a tasklet
> and do the callback directly from the tasklet.
> 
> Actually, the ordering between the IRQ and DMA callback is a bit confusing.
> Which one is supposed to occur first and how does it interact with the other
> event?
> 

The sequence of event would be:
1. Wait for DMA transfer to complete.
2. Set bit in device CSR to indicate final block has been transferred.
3. Device will send IRQ once result is ready.
4. Read out final digest value from device.

Thanks,
Jia Jie

  reply	other threads:[~2023-04-10 13:10 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-04-10  7:37 [PATCH v4 0/4] crypto: starfive - Add drivers for crypto engine Jia Jie Ho
2023-04-10  7:37 ` [PATCH v4 1/4] dt-bindings: crypto: Add StarFive crypto module Jia Jie Ho
2023-04-10  7:37 ` [PATCH v4 2/4] crypto: starfive - Add crypto engine support Jia Jie Ho
2023-04-10  7:37 ` [PATCH v4 3/4] riscv: dts: starfive: Add crypto and DMA node for VisionFive 2 Jia Jie Ho
2023-04-10  7:37 ` [PATCH v4 4/4] crypto: starfive - Add hash and HMAC support Jia Jie Ho
2023-04-10  7:50   ` Herbert Xu
2023-04-10  8:43     ` Jia Jie Ho
2023-04-10 10:09       ` Herbert Xu
2023-04-10 13:10         ` JiaJie Ho [this message]
2023-04-10 13:29           ` Herbert Xu
2023-04-10 13:35             ` JiaJie Ho

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=c1925af208b540c2bd78a16bc593ecae@EXMBX168.cuchost.com \
    --to=jiajie.ho@starfivetech.com \
    --cc=conor.dooley@microchip.com \
    --cc=davem@davemloft.net \
    --cc=devicetree@vger.kernel.org \
    --cc=herbert@gondor.apana.org.au \
    --cc=kernel@esmil.dk \
    --cc=krzysztof.kozlowski+dt@linaro.org \
    --cc=linux-crypto@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-riscv@lists.infradead.org \
    --cc=palmer@dabbelt.com \
    --cc=robh+dt@kernel.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox